Minor clippy performance suggestions

This commit is contained in:
kjeremy 2020-09-30 15:22:49 -04:00
parent 7c9ae771bc
commit 82d6cfd495
6 changed files with 7 additions and 7 deletions

View file

@ -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<SyntaxNode> {
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<hir::PathResolution> {