mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-23 10:38:57 +00:00
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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user