This commit is contained in:
Christian Schwarz
2025-07-11 15:44:14 +02:00
parent a3e05b5abf
commit 10955dfb52
2 changed files with 6 additions and 6 deletions

View File

@@ -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)");

View File

@@ -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:?}");
}
}