diff --git a/libs/neon_failpoint/examples/context_demo.rs b/libs/neon_failpoint/examples/context_demo.rs index 0fdd8445c8..65a56fa5db 100644 --- a/libs/neon_failpoint/examples/context_demo.rs +++ b/libs/neon_failpoint/examples/context_demo.rs @@ -30,7 +30,7 @@ async fn main() { either::Either::Left(result) => { match result { FailpointResult::Return(value) => { - println!("Failpoint triggered with value: {:?}", value); + println!("Failpoint triggered with value: {value:?}"); } FailpointResult::Continue => { println!("Failpoint not triggered"); @@ -43,7 +43,7 @@ async fn main() { either::Either::Right(future) => { match future.await { FailpointResult::Return(value) => { - println!("Failpoint triggered with value: {:?}", value); + println!("Failpoint triggered with value: {value:?}"); } FailpointResult::Continue => { println!("Failpoint not triggered"); @@ -65,7 +65,7 @@ async fn main() { either::Either::Left(result) => { match result { FailpointResult::Return(value) => { - println!("Failpoint triggered with value: {:?}", value); + println!("Failpoint triggered with value: {value:?}"); } FailpointResult::Continue => { println!("Failpoint not triggered (expected)"); @@ -78,7 +78,7 @@ async fn main() { either::Either::Right(future) => { match future.await { FailpointResult::Return(value) => { - println!("Failpoint triggered with value: {:?}", value); + println!("Failpoint triggered with value: {value:?}"); } FailpointResult::Continue => { println!("Failpoint not triggered (expected)"); diff --git a/libs/neon_failpoint/src/lib.rs b/libs/neon_failpoint/src/lib.rs index ed66f09c09..20e37cc644 100644 --- a/libs/neon_failpoint/src/lib.rs +++ b/libs/neon_failpoint/src/lib.rs @@ -260,7 +260,7 @@ fn execute_action( } FailpointAction::Panic(message) => { tracing::error!("Failpoint {} panicking with message: {}", name, message); - panic!("Failpoint panicked: {}", message); + panic!("Failpoint panicked: {message}"); } FailpointAction::Sleep(millis) => { let millis = *millis; @@ -784,7 +784,7 @@ mod tests { } else if let Some(msg) = panic_msg.downcast_ref::<&str>() { assert!(msg.contains("test message")); } else { - panic!("Expected panic with string message, got: {:?}", panic_msg); + panic!("Expected panic with string message, got: {panic_msg:?}"); } }