Cleanup format arguments (#2650)

Inlined format args make code more readable, and code more compact.

I ran this clippy command to fix most cases, and then cleaned up a few trailing commas and uncaught edge cases.

```
cargo clippy --bins --examples  --benches --tests --lib --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
This commit is contained in:
Yuri Astrakhan
2023-07-31 22:27:04 +02:00
committed by GitHub
parent 9463b7592f
commit a824e8468c
80 changed files with 270 additions and 307 deletions

View File

@@ -21,16 +21,16 @@ async fn main() -> anyhow::Result<()> {
match args.cmd {
Some(Command::Add { description }) => {
println!("Adding new todo with description '{}'", &description);
println!("Adding new todo with description '{description}'");
let todo_id = add_todo(&pool, description).await?;
println!("Added new todo with id {}", todo_id);
println!("Added new todo with id {todo_id}");
}
Some(Command::Done { id }) => {
println!("Marking todo {} as done", id);
println!("Marking todo {id} as done");
if complete_todo(&pool, id).await? {
println!("Todo {} is marked as done", id);
println!("Todo {id} is marked as done");
} else {
println!("Invalid id {}", id);
println!("Invalid id {id}");
}
}
None => {