diff --git a/examples/case_tree.rs b/examples/case_tree.rs index f9c75dc..6599117 100644 --- a/examples/case_tree.rs +++ b/examples/case_tree.rs @@ -7,7 +7,7 @@ fn main() { let var = 5; let case = pred.find_case(true, &var); if let Some(case) = case { - println!("var is {}", var); + println!("var is {var}"); println!("{}", case.tree()); } } diff --git a/src/ord.rs b/src/ord.rs index 1a78c8d..4c2305c 100644 --- a/src/ord.rs +++ b/src/ord.rs @@ -26,7 +26,7 @@ impl fmt::Display for EqOps { EqOps::Equal => "==", EqOps::NotEqual => "!=", }; - write!(f, "{}", op) + write!(f, "{op}") } } @@ -148,7 +148,7 @@ impl fmt::Display for OrdOps { OrdOps::GreaterThanOrEqual => ">=", OrdOps::GreaterThan => ">", }; - write!(f, "{}", op) + write!(f, "{op}") } } diff --git a/src/path/ft.rs b/src/path/ft.rs index aceed55..eec09f7 100644 --- a/src/path/ft.rs +++ b/src/path/ft.rs @@ -54,7 +54,7 @@ impl fmt::Display for FileType { FileType::Dir => "dir", FileType::Symlink => "symlink", }; - write!(f, "{}", t) + write!(f, "{t}") } } diff --git a/src/str/difference.rs b/src/str/difference.rs index 81c62b8..0a362dc 100644 --- a/src/str/difference.rs +++ b/src/str/difference.rs @@ -31,8 +31,8 @@ impl Predicate for DifferencePredicate { None } else { let palette = crate::Palette::new(true); - let orig: Vec<_> = self.orig.lines().map(|l| format!("{}\n", l)).collect(); - let variable: Vec<_> = variable.lines().map(|l| format!("{}\n", l)).collect(); + let orig: Vec<_> = self.orig.lines().map(|l| format!("{l}\n")).collect(); + let variable: Vec<_> = variable.lines().map(|l| format!("{l}\n")).collect(); let diff = difflib::unified_diff( &orig, &variable,