From 831bd7e91d1f97f565d6ea15d816e638a983ad00 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 1 Nov 2021 22:34:22 -0400 Subject: apply clippy lints --- lib/src/lints/eta_reduction.rs | 4 ++-- lib/src/lints/unquoted_splice.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/src/lints/eta_reduction.rs b/lib/src/lints/eta_reduction.rs index 9df3f1e..454c78f 100644 --- a/lib/src/lints/eta_reduction.rs +++ b/lib/src/lints/eta_reduction.rs @@ -67,7 +67,7 @@ impl Rule for EtaReduction { let message = format!( "Found eta-reduction: `{}`", - replacement.text().to_string() + replacement.text() ); Some(self.report().suggest(at, message, Suggestion::new(at, replacement))) } else { @@ -81,6 +81,6 @@ fn mentions_ident(ident: &Ident, node: &SyntaxNode) -> bool { if let Some(node_ident) = Ident::cast(node.clone()) { node_ident.as_str() == ident.as_str() } else { - node.children().any(|child| mentions_ident(&ident, &child)) + node.children().any(|child| mentions_ident(ident, &child)) } } diff --git a/lib/src/lints/unquoted_splice.rs b/lib/src/lints/unquoted_splice.rs index 4700d31..ce269b6 100644 --- a/lib/src/lints/unquoted_splice.rs +++ b/lib/src/lints/unquoted_splice.rs @@ -46,7 +46,7 @@ impl Rule for UnquotedSplice { if Dynamic::cast(node.clone()).is_some(); then { let at = node.text_range(); - let replacement = make::quote(&node).node().clone(); + let replacement = make::quote(node).node().clone(); let message = "Consider quoting this splice expression"; Some(self.report().suggest(at, message, Suggestion::new(at, replacement))) } else { -- cgit v1.2.3