aboutsummaryrefslogtreecommitdiff
path: root/crates/ssr
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-02 09:07:42 +0100
committerGitHub <[email protected]>2020-10-02 09:07:42 +0100
commite535489f03901ab94a89dd2de67f35714f0c3cfc (patch)
treef3e70f9a42b29d3d01448cc298dc61a0bce04294 /crates/ssr
parentc3bf7659b13a14541ddcff9c243c79b45bfd6829 (diff)
parent82d6cfd495c7e0f230ce1ac61e7a4297fa22f02f (diff)
Merge #6104
6104: Minor clippy performance suggestions r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ssr')
-rw-r--r--crates/ssr/src/resolving.rs2
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> {