Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update from _rust template #175

Merged
merged 9 commits into from
Sep 27, 2024
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
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
Loading