fix: clippy string format lint

This commit is contained in:
jwhb
2025-05-08 15:43:29 +02:00
parent c4def6a60f
commit 94d2a014dd
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -47,7 +47,7 @@ fn deserialize_stdin() {
let mut buffer = String::new();
match io::stdin().read_to_string(&mut buffer) {
Err(error) => panic!("Problem opening the file: {:?}", error),
Err(error) => panic!("Problem opening the file: {error:?}"),
Ok(_) => {
println!("Document: {}", &buffer);
@@ -55,9 +55,9 @@ fn deserialize_stdin() {
let result: Result<Nftables, _> = serde_path_to_error::deserialize(deserializer);
match result {
Ok(_) => println!("Result: {:?}", result),
Ok(_) => println!("Result: {result:?}"),
Err(err) => {
panic!("Deserialization error: {}", err);
panic!("Deserialization error: {err}");
}
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ fn test_deserialize_json_files(path: &Path) -> datatest_stable::Result<()> {
match result {
Ok(nf) => {
println!("Deserialized document: {:?}", nf);
println!("Deserialized document: {nf:?}");
Ok(())
}
Err(err) => Err(serde_json::error::Error::custom(format!(
+2 -2
View File
@@ -50,6 +50,6 @@ fn test_serialize() {
let j = serde_json::to_string(&_a).unwrap();
let result: Nftables = serde_json::from_str(&j).unwrap();
println!("JSON: {}", j);
println!("Parsed: {:?}", result);
println!("JSON: {j}");
println!("Parsed: {result:?}");
}