From 3e8055719ba2bccd7a08dfb9df7023bf7a48aaeb Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Sun, 23 Jan 2022 10:10:22 -0800 Subject: Fix most clippy lints --- cortex-m-rt/macros/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cortex-m-rt/macros/src') diff --git a/cortex-m-rt/macros/src/lib.rs b/cortex-m-rt/macros/src/lib.rs index 817e9a1..f7d6e7e 100644 --- a/cortex-m-rt/macros/src/lib.rs +++ b/cortex-m-rt/macros/src/lib.rs @@ -159,7 +159,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream { Exception::DefaultHandler | Exception::HardFault | Exception::NonMaskableInt => { // These are unsafe to define. let name = if exn == Exception::DefaultHandler { - format!("`DefaultHandler`") + "`DefaultHandler`".to_string() } else { format!("`{:?}` handler", exn) }; @@ -557,7 +557,7 @@ fn extract_static_muts( let mut seen = HashSet::new(); let mut statics = vec![]; let mut stmts = vec![]; - while let Some(stmt) = istmts.next() { + for stmt in istmts.by_ref() { match stmt { Stmt::Item(Item::Static(var)) => { if var.mutability.is_some() { @@ -622,7 +622,7 @@ fn check_attr_whitelist(attrs: &[Attribute], caller: WhiteListCaller) -> Result< 'o: for attr in attrs { for val in whitelist { - if eq(&attr, &val) { + if eq(attr, val) { continue 'o; } } -- cgit v1.2.3