From d280737ddfbc430553c58b0d50f6b099a997679c Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sun, 9 Jul 2023 16:47:15 +0000 Subject: [PATCH] Make Clippy happy --- frameworks/build.rs | 4 ++-- frameworks/src/foundry/visitor/visit.rs | 2 +- necessist/tests/trycmd.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/build.rs b/frameworks/build.rs index 4bf244b7..5a976e32 100644 --- a/frameworks/build.rs +++ b/frameworks/build.rs @@ -179,7 +179,7 @@ where writeln!(file, " => {{")?; match fields { Fields::Named(fields) => { - for field in fields.named.iter() { + for field in &fields.named { writeln!( file, " {}.visit(visitor)?;", @@ -234,7 +234,7 @@ where match fields { Fields::Named(fields) => { - for field in fields.named.iter() { + for field in &fields.named { writeln!( file, " {}.{}.visit(visitor)?;", diff --git a/frameworks/src/foundry/visitor/visit.rs b/frameworks/src/foundry/visitor/visit.rs index 61e9bcd1..fae3a58b 100644 --- a/frameworks/src/foundry/visitor/visit.rs +++ b/frameworks/src/foundry/visitor/visit.rs @@ -57,7 +57,7 @@ where where V: Visitor<'ast> + ?Sized, { - for item in self.iter() { + for item in self { item.visit(v)?; } Ok(()) diff --git a/necessist/tests/trycmd.rs b/necessist/tests/trycmd.rs index 4aceefa4..b04422af 100644 --- a/necessist/tests/trycmd.rs +++ b/necessist/tests/trycmd.rs @@ -41,7 +41,7 @@ fn trycmd() { #[test] fn check_stdout() { - let re = Regex::new(r#"\b[0-9]+\.[0-9]+s\b"#).unwrap(); + let re = Regex::new(r"\b[0-9]+\.[0-9]+s\b").unwrap(); let necessist_db_absent = read_dir("tests/necessist_db_absent").unwrap(); let necessist_db_present = read_dir("tests/necessist_db_present").unwrap();