diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 3d04055..491030a 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -24,4 +24,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: '3.x' - uses: pre-commit/action@v3.0.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69b1a05..79da848 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ We ask that commits are atomic, meaning they are complete and have a single resp PRs should tell a cohesive story, with test and refactor commits that keep the fix or feature commits simple and clear. -Specifically, we would encouage +Specifically, we would encourage - File renames be isolated into their own commit - Add tests in a commit before their feature or fix, showing the current behavior. The diff for the feature/fix commit will then show how the behavior changed, diff --git a/Cargo.toml b/Cargo.toml index 4094173..2ce0ec2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,7 @@ string_lit_as_bytes = "warn" string_to_string = "warn" todo = "warn" trait_duplication_in_bounds = "warn" +uninlined_format_args = "warn" verbose_file_reads = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" 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,