Skip to content

Commit

Permalink
chore(clippy): Apply cargo clippy --fix across all features
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque authored and waywardmonkeys committed May 27, 2024
1 parent 74fa09f commit 0f7d09b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fluent-syntax/benches/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn get_resources(tests: &[&'static str]) -> HashMap<&'static str, String> {
let path = format!("./benches/{}", test);
ftl_strings.insert(*test, read_file(&path).expect("Couldn't load file"));
}
return ftl_strings;
ftl_strings
}

fn get_ctxs(tests: &[&'static str]) -> HashMap<&'static str, Vec<String>> {
Expand Down
1 change: 1 addition & 0 deletions fluent-syntax/tests/helper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pub fn adapt_ast(ast: &mut ast::Resource<String>, crlf: bool) {

pub fn strip_comments(ast: &mut ast::Resource<String>) {
ast.body.retain(|entry| match entry {
// an arm that returns false makes clippy's match_like_matches_macro a false positive
ast::Entry::Comment(..)
| ast::Entry::GroupComment(..)
| ast::Entry::ResourceComment(..) => false,
Expand Down
6 changes: 3 additions & 3 deletions fluent-syntax/tests/parser_fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn parse_fixtures_compare() {

let reference_path = path.replace(".ftl", ".json");
let reference_file = read_file(&reference_path, true).unwrap();
let ftl_file = read_file(&path, false).unwrap();
let ftl_file = read_file(path, false).unwrap();

println!("Parsing: {:#?}", path);
let target_ast = match parse(ftl_file) {
Expand Down Expand Up @@ -72,7 +72,7 @@ fn parse_bench_fixtures() {
file_name.replace(".ftl", ".json")
);
let reference_file = read_file(&reference_path, true).unwrap();
let ftl_file = read_file(&path, false).unwrap();
let ftl_file = read_file(path, false).unwrap();

println!("Parsing: {:#?}", path);
let target_ast = match parse(ftl_file) {
Expand Down Expand Up @@ -106,7 +106,7 @@ fn parse_bench_fixtures() {
file_name.replace(".ftl", ".json")
);
let reference_file = read_file(&reference_path, true).unwrap();
let ftl_file = read_file(&path, false).unwrap();
let ftl_file = read_file(path, false).unwrap();

println!("Parsing: {:#?}", path);
let target_ast = match parse(ftl_file.clone()) {
Expand Down

0 comments on commit 0f7d09b

Please sign in to comment.