Fix new clippy lints
Latest version of clippy (in nightly) contains a new lint.
Change-Id: Ibfcab1eab9e83d22f1cc413450c2516d4205071e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/qg/+/120710
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Pigweed-Auto-Submit: Alexei Frolov <frolv@google.com>
diff --git a/qg-cli/src/hello.rs b/qg-cli/src/hello.rs
index a172e66..1d0114a 100644
--- a/qg-cli/src/hello.rs
+++ b/qg-cli/src/hello.rs
@@ -27,5 +27,5 @@
pub fn run(args: &Command) {
let greeting = if args.emoji { "👋" } else { "Hello" };
- println!("{}, {}!", greeting, args.name);
+ println!("{greeting}, {}!", args.name);
}
diff --git a/qg/src/lib.rs b/qg/src/lib.rs
index 5886c28..25e8584 100644
--- a/qg/src/lib.rs
+++ b/qg/src/lib.rs
@@ -32,7 +32,7 @@
scope.globals.set_item(
"rust_print",
vm.ctx
- .new_function("rust_print", |s: String| println!("[R] {}", s))
+ .new_function("rust_print", |s: String| println!("[R] {s}"))
.into(),
vm,
)?;
@@ -44,7 +44,7 @@
if let Err(e) = py_result {
// Placeholder until qg has an error type
- println!("py_demo error: {:?}", e);
+ println!("py_demo error: {e:?}");
}
}