Merge pull request #115 from djmitche/issue110

Fix clippy warnings and make them all errors
This commit is contained in:
Dustin J. Mitchell
2020-12-24 13:30:39 -05:00
committed by GitHub
12 changed files with 24 additions and 23 deletions

View File

@@ -40,8 +40,8 @@ impl Usage {
"TaskChampion {}: Personal task-tracking\n\n",
env!("CARGO_PKG_VERSION")
)?;
write!(w, "USAGE:\n {} [args]\n\n", command_name)?;
write!(w, "TaskChampion subcommands:\n")?;
writeln!(w, "USAGE:\n {} [args]\n", command_name)?;
writeln!(w, "TaskChampion subcommands:")?;
for subcommand in self.subcommands.iter() {
subcommand.write_help(&mut w, summary)?;
}
@@ -58,7 +58,7 @@ impl Usage {
modification.write_help(&mut w, summary)?;
}
if !summary {
write!(w, "\nSee `task help` for more detail\n")?;
writeln!(w, "\nSee `task help` for more detail")?;
}
Ok(())
}
@@ -84,7 +84,7 @@ pub(crate) struct Subcommand {
impl Subcommand {
fn write_help<W: Write>(&self, mut w: W, summary: bool) -> Result<()> {
if summary {
write!(w, " task {} - {}\n", self.name, self.summary)?;
writeln!(w, " task {} - {}", self.name, self.summary)?;
} else {
write!(
w,