Skip to content

Commit 05e1240

Browse files
authored
Merge pull request #175 from epage/template
chore: Update from _rust template
2 parents 16a087b + 3bee433 commit 05e1240

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.x'
2729
- uses: pre-commit/action@v3.0.1

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ We ask that commits are atomic, meaning they are complete and have a single resp
4545
PRs should tell a cohesive story, with test and refactor commits that keep the
4646
fix or feature commits simple and clear.
4747

48-
Specifically, we would encouage
48+
Specifically, we would encourage
4949
- File renames be isolated into their own commit
5050
- Add tests in a commit before their feature or fix, showing the current behavior.
5151
The diff for the feature/fix commit will then show how the behavior changed,

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ string_lit_as_bytes = "warn"
8080
string_to_string = "warn"
8181
todo = "warn"
8282
trait_duplication_in_bounds = "warn"
83+
uninlined_format_args = "warn"
8384
verbose_file_reads = "warn"
8485
wildcard_imports = "warn"
8586
zero_sized_map_values = "warn"

examples/case_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
let var = 5;
88
let case = pred.find_case(true, &var);
99
if let Some(case) = case {
10-
println!("var is {}", var);
10+
println!("var is {var}");
1111
println!("{}", case.tree());
1212
}
1313
}

src/ord.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl fmt::Display for EqOps {
2626
EqOps::Equal => "==",
2727
EqOps::NotEqual => "!=",
2828
};
29-
write!(f, "{}", op)
29+
write!(f, "{op}")
3030
}
3131
}
3232

@@ -148,7 +148,7 @@ impl fmt::Display for OrdOps {
148148
OrdOps::GreaterThanOrEqual => ">=",
149149
OrdOps::GreaterThan => ">",
150150
};
151-
write!(f, "{}", op)
151+
write!(f, "{op}")
152152
}
153153
}
154154

src/path/ft.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl fmt::Display for FileType {
5454
FileType::Dir => "dir",
5555
FileType::Symlink => "symlink",
5656
};
57-
write!(f, "{}", t)
57+
write!(f, "{t}")
5858
}
5959
}
6060

src/str/difference.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ impl Predicate<str> for DifferencePredicate {
3131
None
3232
} else {
3333
let palette = crate::Palette::new(true);
34-
let orig: Vec<_> = self.orig.lines().map(|l| format!("{}\n", l)).collect();
35-
let variable: Vec<_> = variable.lines().map(|l| format!("{}\n", l)).collect();
34+
let orig: Vec<_> = self.orig.lines().map(|l| format!("{l}\n")).collect();
35+
let variable: Vec<_> = variable.lines().map(|l| format!("{l}\n")).collect();
3636
let diff = difflib::unified_diff(
3737
&orig,
3838
&variable,

0 commit comments

Comments
 (0)