Skip to content

Commit 0f7d09b

Browse files
alerquewaywardmonkeys
authored andcommitted
chore(clippy): Apply cargo clippy --fix across all features
1 parent 74fa09f commit 0f7d09b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

fluent-syntax/benches/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn get_resources(tests: &[&'static str]) -> HashMap<&'static str, String> {
1818
let path = format!("./benches/{}", test);
1919
ftl_strings.insert(*test, read_file(&path).expect("Couldn't load file"));
2020
}
21-
return ftl_strings;
21+
ftl_strings
2222
}
2323

2424
fn get_ctxs(tests: &[&'static str]) -> HashMap<&'static str, Vec<String>> {

fluent-syntax/tests/helper/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ pub fn adapt_ast(ast: &mut ast::Resource<String>, crlf: bool) {
9494

9595
pub fn strip_comments(ast: &mut ast::Resource<String>) {
9696
ast.body.retain(|entry| match entry {
97+
// an arm that returns false makes clippy's match_like_matches_macro a false positive
9798
ast::Entry::Comment(..)
9899
| ast::Entry::GroupComment(..)
99100
| ast::Entry::ResourceComment(..) => false,

fluent-syntax/tests/parser_fixtures.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn parse_fixtures_compare() {
2727

2828
let reference_path = path.replace(".ftl", ".json");
2929
let reference_file = read_file(&reference_path, true).unwrap();
30-
let ftl_file = read_file(&path, false).unwrap();
30+
let ftl_file = read_file(path, false).unwrap();
3131

3232
println!("Parsing: {:#?}", path);
3333
let target_ast = match parse(ftl_file) {
@@ -72,7 +72,7 @@ fn parse_bench_fixtures() {
7272
file_name.replace(".ftl", ".json")
7373
);
7474
let reference_file = read_file(&reference_path, true).unwrap();
75-
let ftl_file = read_file(&path, false).unwrap();
75+
let ftl_file = read_file(path, false).unwrap();
7676

7777
println!("Parsing: {:#?}", path);
7878
let target_ast = match parse(ftl_file) {
@@ -106,7 +106,7 @@ fn parse_bench_fixtures() {
106106
file_name.replace(".ftl", ".json")
107107
);
108108
let reference_file = read_file(&reference_path, true).unwrap();
109-
let ftl_file = read_file(&path, false).unwrap();
109+
let ftl_file = read_file(path, false).unwrap();
110110

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

0 commit comments

Comments
 (0)