From 82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f Mon Sep 17 00:00:00 2001 From: kjeremy Date: Wed, 30 Sep 2020 15:22:49 -0400 Subject: Minor clippy performance suggestions --- crates/ssr/src/resolving.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ssr/src') diff --git a/crates/ssr/src/resolving.rs b/crates/ssr/src/resolving.rs index 5d2cbec47..347cc4aad 100644 --- a/crates/ssr/src/resolving.rs +++ b/crates/ssr/src/resolving.rs @@ -205,7 +205,7 @@ impl<'db> ResolutionScope<'db> { /// Returns the function in which SSR was invoked, if any. pub(crate) fn current_function(&self) -> Option { - self.node.ancestors().find(|node| node.kind() == SyntaxKind::FN).map(|node| node.clone()) + self.node.ancestors().find(|node| node.kind() == SyntaxKind::FN) } fn resolve_path(&self, path: &ast::Path) -> Option { -- cgit v1.2.3