mirror of
https://github.com/nftables-rs/nftables-rs.git
synced 2026-10-18 08:01:29 +00:00
fix: clippy string format lint
This commit is contained in:
+3
-3
@@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -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:?}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user