Skip to content

Commit

Permalink
Merge pull request #81 from epage/template
Browse files Browse the repository at this point in the history
chore: Update from _rust template
  • Loading branch information
epage authored Sep 27, 2024
2 parents 6d9c904 + 8c8cb12 commit db89d6b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
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/[email protected]
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 src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mod test {
("added", Some(false)),
];
for (word, expected) in cases.iter() {
println!("Checking {}", word);
println!("Checking {word}");
assert_eq!(mood.is_imperative(word), expected.clone());
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn generate<W: std::io::Write>(file: &mut W) {
builder.entry(word);
}
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, "{codegenned}").unwrap();
writeln!(file, ";").unwrap();
writeln!(file).unwrap();
}
Expand All @@ -61,11 +61,11 @@ fn generate<W: std::io::Write>(file: &mut W) {
.unwrap();
let mut builder = phf_codegen::Map::new();
for stem in stems {
let value = format!("&{}_stem", stem).to_uppercase();
let value = format!("&{stem}_stem").to_uppercase();
builder.entry(stem.as_str(), &value);
}
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, "{codegenned}").unwrap();
writeln!(file, ";").unwrap();

let mut blacklist: Vec<_> = parse_wordlist(BLACKLIST).collect();
Expand All @@ -81,7 +81,7 @@ fn generate<W: std::io::Write>(file: &mut W) {
builder.entry(word);
}
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, "{codegenned}").unwrap();
writeln!(file, ";").unwrap();
}

Expand Down

0 comments on commit db89d6b

Please sign in to comment.