From 202b51bc7b6999900e06ec2cfb8d72fe9aa4af29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 21 Mar 2021 15:33:18 +0100 Subject: a lot of clippy::style fixes --- xtask/src/codegen/gen_syntax.rs | 2 +- xtask/src/main.rs | 2 +- xtask/src/tidy.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'xtask') diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 80f26e8f5..ba4b24848 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -707,7 +707,7 @@ fn extract_struct_trait(node: &mut AstNodeSrc, trait_name: &str, methods: &[&str let mut to_remove = Vec::new(); for (i, field) in node.fields.iter().enumerate() { let method_name = field.method_name().to_string(); - if methods.iter().any(|&it| it == &method_name) { + if methods.iter().any(|&it| it == method_name) { to_remove.push(i); } } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 915aae71a..960927fc0 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -37,7 +37,7 @@ fn main() -> Result<()> { match flags.subcommand { flags::XtaskCmd::Help(_) => { println!("{}", flags::Xtask::HELP); - return Ok(()); + Ok(()) } flags::XtaskCmd::Install(cmd) => cmd.run(), flags::XtaskCmd::FuzzTests(_) => run_fuzzer(), diff --git a/xtask/src/tidy.rs b/xtask/src/tidy.rs index 1352d1218..50d9efccd 100644 --- a/xtask/src/tidy.rs +++ b/xtask/src/tidy.rs @@ -193,7 +193,7 @@ https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/#redo-after- } } -fn deny_clippy(path: &PathBuf, text: &String) { +fn deny_clippy(path: &Path, text: &str) { let ignore = &[ // The documentation in string literals may contain anything for its own purposes "ide_completion/src/generated_lint_completions.rs", -- cgit v1.2.3