clippy lints
This commit is contained in:
parent
3fa0509319
commit
bc2b96d425
|
@ -70,7 +70,7 @@ impl<'a> Command<'a> for ListCommand {
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
streams.out.write_all(sheets.join("\n").as_bytes())?;
|
streams.out.write_all(sheets.join("\n").as_bytes())?;
|
||||||
streams.out.write(b"\n")?;
|
streams.out.write_all(b"\n")?;
|
||||||
} else {
|
} else {
|
||||||
let mut total_running = Duration::seconds(0);
|
let mut total_running = Duration::seconds(0);
|
||||||
let mut total_today = Duration::seconds(0);
|
let mut total_today = Duration::seconds(0);
|
||||||
|
|
|
@ -71,7 +71,7 @@ impl<'a> Command<'a> for NowCommand {
|
||||||
}.to_string(),
|
}.to_string(),
|
||||||
entry.sheet,
|
entry.sheet,
|
||||||
format_duration(facts.now - entry.start),
|
format_duration(facts.now - entry.start),
|
||||||
entry.note.unwrap_or_else(|| "".to_string())
|
entry.note.unwrap_or_default(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ pub fn print_formatted<W: Write>(entries: Vec<Entry>, out: &mut W, ids: bool) ->
|
||||||
let mut wtr = Writer::from_writer(out);
|
let mut wtr = Writer::from_writer(out);
|
||||||
|
|
||||||
if ids {
|
if ids {
|
||||||
wtr.write_record(&["id", "start", "end", "note", "sheet"])?;
|
wtr.write_record(["id", "start", "end", "note", "sheet"])?;
|
||||||
} else {
|
} else {
|
||||||
wtr.write_record(&["start", "end", "note", "sheet"])?;
|
wtr.write_record(["start", "end", "note", "sheet"])?;
|
||||||
}
|
}
|
||||||
|
|
||||||
for entry in entries {
|
for entry in entries {
|
||||||
|
|
Loading…
Reference in New Issue