clippy lints
This commit is contained in:
parent
3fa0509319
commit
bc2b96d425
|
@ -70,7 +70,7 @@ impl<'a> Command<'a> for ListCommand {
|
|||
.collect();
|
||||
|
||||
streams.out.write_all(sheets.join("\n").as_bytes())?;
|
||||
streams.out.write(b"\n")?;
|
||||
streams.out.write_all(b"\n")?;
|
||||
} else {
|
||||
let mut total_running = Duration::seconds(0);
|
||||
let mut total_today = Duration::seconds(0);
|
||||
|
|
|
@ -71,7 +71,7 @@ impl<'a> Command<'a> for NowCommand {
|
|||
}.to_string(),
|
||||
entry.sheet,
|
||||
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);
|
||||
|
||||
if ids {
|
||||
wtr.write_record(&["id", "start", "end", "note", "sheet"])?;
|
||||
wtr.write_record(["id", "start", "end", "note", "sheet"])?;
|
||||
} else {
|
||||
wtr.write_record(&["start", "end", "note", "sheet"])?;
|
||||
wtr.write_record(["start", "end", "note", "sheet"])?;
|
||||
}
|
||||
|
||||
for entry in entries {
|
||||
|
|
Loading…
Reference in New Issue