Skip to content

Commit

Permalink
style: Inline fmt args
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Sep 27, 2024
1 parent 0112e6d commit 3bee433
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/case_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
4 changes: 2 additions & 2 deletions src/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl fmt::Display for EqOps {
EqOps::Equal => "==",
EqOps::NotEqual => "!=",
};
write!(f, "{}", op)
write!(f, "{op}")
}
}

Expand Down Expand Up @@ -148,7 +148,7 @@ impl fmt::Display for OrdOps {
OrdOps::GreaterThanOrEqual => ">=",
OrdOps::GreaterThan => ">",
};
write!(f, "{}", op)
write!(f, "{op}")
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/path/ft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl fmt::Display for FileType {
FileType::Dir => "dir",
FileType::Symlink => "symlink",
};
write!(f, "{}", t)
write!(f, "{t}")
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/str/difference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ impl Predicate<str> 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,
Expand Down

0 comments on commit 3bee433

Please sign in to comment.