mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Minor clippy performance suggestions
This commit is contained in:
parent
7c9ae771bc
commit
82d6cfd495
6 changed files with 7 additions and 7 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue