Fix clippy warnings and make them all errors
This commit is contained in:
@@ -13,7 +13,7 @@ pub(crate) fn execute<W: WriteColor>(
|
||||
_ => "(no description)".to_owned(),
|
||||
};
|
||||
let t = replica.new_task(Status::Pending, description).unwrap();
|
||||
write!(w, "added task {}\n", t.get_uuid())?;
|
||||
writeln!(w, "added task {}", t.get_uuid())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use termcolor::WriteColor;
|
||||
|
||||
pub(crate) fn execute<W: WriteColor>(w: &mut W, replica: &mut Replica) -> Fallible<()> {
|
||||
replica.gc()?;
|
||||
write!(w, "garbage collected.\n")?;
|
||||
writeln!(w, "garbage collected.")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ pub(crate) fn execute<W: WriteColor>(
|
||||
server: &mut Box<dyn Server>,
|
||||
) -> Fallible<()> {
|
||||
replica.sync(server)?;
|
||||
write!(w, "sync complete.\n")?;
|
||||
writeln!(w, "sync complete.")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use termcolor::{ColorSpec, WriteColor};
|
||||
pub(crate) fn execute<W: WriteColor>(w: &mut W) -> Fallible<()> {
|
||||
write!(w, "TaskChampion ")?;
|
||||
w.set_color(ColorSpec::new().set_bold(true))?;
|
||||
write!(w, "{}\n", env!("CARGO_PKG_VERSION"))?;
|
||||
writeln!(w, "{}", env!("CARGO_PKG_VERSION"))?;
|
||||
w.reset()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user