From c9b4ac5be4daaabc062ab1ee663eba8594750003 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:24:16 +0530 Subject: clippy::redudant_borrow --- xtask/src/codegen/gen_lint_completions.rs | 2 +- xtask/src/codegen/gen_syntax.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'xtask/src/codegen') diff --git a/xtask/src/codegen/gen_lint_completions.rs b/xtask/src/codegen/gen_lint_completions.rs index 3b54b2489..4aebb02bd 100644 --- a/xtask/src/codegen/gen_lint_completions.rs +++ b/xtask/src/codegen/gen_lint_completions.rs @@ -28,7 +28,7 @@ pub(crate) fn generate_lint_completions() -> Result<()> { contents.push('\n'); cmd!("curl https://rust-lang.github.io/rust-clippy/master/lints.json --output ./target/clippy_lints.json").run()?; - generate_descriptor_clippy(&mut contents, &Path::new("./target/clippy_lints.json"))?; + generate_descriptor_clippy(&mut contents, Path::new("./target/clippy_lints.json"))?; let contents = reformat(&contents)?; let destination = project_root().join("crates/ide_db/src/helpers/generated_lints.rs"); diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index b0b9e30db..5435da76e 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -258,7 +258,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result { for chunk in ast.split("# [pretty_doc_comment_placeholder_workaround] ") { res.push_str(chunk); if let Some(doc) = docs.next() { - write_doc_comment(&doc, &mut res); + write_doc_comment(doc, &mut res); } } @@ -294,14 +294,14 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result { let full_keywords_values = &grammar.keywords; let full_keywords = - full_keywords_values.iter().map(|kw| format_ident!("{}_KW", to_upper_snake_case(&kw))); + full_keywords_values.iter().map(|kw| format_ident!("{}_KW", to_upper_snake_case(kw))); let all_keywords_values = grammar.keywords.iter().chain(grammar.contextual_keywords.iter()).collect::>(); let all_keywords_idents = all_keywords_values.iter().map(|kw| format_ident!("{}", kw)); let all_keywords = all_keywords_values .iter() - .map(|name| format_ident!("{}_KW", to_upper_snake_case(&name))) + .map(|name| format_ident!("{}_KW", to_upper_snake_case(name))) .collect::>(); let literals = -- cgit v1.2.3