]> git.lizzy.rs Git - rust.git/blobdiff - crates/ide_completion/src/context.rs
NFC: remove redundant clones (clippy::perf)
[rust.git] / crates / ide_completion / src / context.rs
index 6f685c02f3857514c089f09e9fc88ce8bc5f3d33..cb4f08e535c4234e9dcb67a3302dc30f65599ef8 100644 (file)
@@ -567,7 +567,7 @@ fn classify_name_ref(&mut self, original_file: &SyntaxNode, name_ref: ast::NameR
             None => return,
         };
 
-        if let Some(segment) = ast::PathSegment::cast(parent.clone()) {
+        if let Some(segment) = ast::PathSegment::cast(parent) {
             let path = segment.parent_path();
             self.is_call = path
                 .syntax()