diff options
author | kjeremy <[email protected]> | 2020-09-30 20:22:49 +0100 |
---|---|---|
committer | kjeremy <[email protected]> | 2020-09-30 20:22:49 +0100 |
commit | 82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f (patch) | |
tree | 3a6fceb66786f1b6dd0bf711182b21dd6bd2280a /crates/ssr/src | |
parent | 7c9ae771bca39d511a0ea7395da2b4b91b44ee12 (diff) |
Minor clippy performance suggestions
Diffstat (limited to 'crates/ssr/src')
-rw-r--r-- | crates/ssr/src/resolving.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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> { | |||
205 | 205 | ||
206 | /// Returns the function in which SSR was invoked, if any. | 206 | /// Returns the function in which SSR was invoked, if any. |
207 | pub(crate) fn current_function(&self) -> Option<SyntaxNode> { | 207 | pub(crate) fn current_function(&self) -> Option<SyntaxNode> { |
208 | self.node.ancestors().find(|node| node.kind() == SyntaxKind::FN).map(|node| node.clone()) | 208 | self.node.ancestors().find(|node| node.kind() == SyntaxKind::FN) |
209 | } | 209 | } |
210 | 210 | ||
211 | fn resolve_path(&self, path: &ast::Path) -> Option<hir::PathResolution> { | 211 | fn resolve_path(&self, path: &ast::Path) -> Option<hir::PathResolution> { |