From ceb478b3ada99911de60054ec398f6882a7e88ab Mon Sep 17 00:00:00 2001 From: trevyn <230691+trevyn@users.noreply.github.com> Date: Thu, 8 Dec 2022 00:25:22 +0400 Subject: [PATCH] Fix clippy lints (#20) --- examples/fibonacci.rs | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fibonacci.rs b/examples/fibonacci.rs index d3d3aa0..c3dece2 100644 --- a/examples/fibonacci.rs +++ b/examples/fibonacci.rs @@ -25,7 +25,7 @@ fn fibonacci_parallel(n: usize) -> usize { fn main() { rayon::ThreadPoolBuilder::new() - .thread_name(|idx| format!("Worker {}", idx)) + .thread_name(|idx| format!("Worker {idx}")) .build_global() .expect("Failed to build thread pool."); diff --git a/src/lib.rs b/src/lib.rs index f48f280..1b15502 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -609,7 +609,7 @@ struct JsonVisitor<'a> { impl<'a> tracing_subscriber::field::Visit for JsonVisitor<'a> { fn record_debug(&mut self, field: &Field, value: &dyn std::fmt::Debug) { self.object - .insert(field.name(), JsonValue::String(format!("{:?}", value))); + .insert(field.name(), JsonValue::String(format!("{value:?}"))); } }