From c9b4ac5be4daaabc062ab1ee663eba8594750003 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:24:16 +0530 Subject: clippy::redudant_borrow --- crates/ide_completion/src/patterns.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide_completion/src/patterns.rs') diff --git a/crates/ide_completion/src/patterns.rs b/crates/ide_completion/src/patterns.rs index 81d7a1a1d..c567ac63d 100644 --- a/crates/ide_completion/src/patterns.rs +++ b/crates/ide_completion/src/patterns.rs @@ -115,12 +115,12 @@ pub(crate) fn determine_location( ) -> Option { let node = match name_like { ast::NameLike::NameRef(name_ref) => { - if ast::RecordExprField::for_field_name(&name_ref).is_some() { + if ast::RecordExprField::for_field_name(name_ref).is_some() { return sema .find_node_at_offset_with_macros(original_file, offset) .map(ImmediateLocation::RecordExpr); } - if ast::RecordPatField::for_field_name_ref(&name_ref).is_some() { + if ast::RecordPatField::for_field_name_ref(name_ref).is_some() { return sema .find_node_at_offset_with_macros(original_file, offset) .map(ImmediateLocation::RecordPat); @@ -128,7 +128,7 @@ pub(crate) fn determine_location( maximize_name_ref(name_ref) } ast::NameLike::Name(name) => { - if ast::RecordPatField::for_field_name(&name).is_some() { + if ast::RecordPatField::for_field_name(name).is_some() { return sema .find_node_at_offset_with_macros(original_file, offset) .map(ImmediateLocation::RecordPat); -- cgit v1.2.3