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/src/diagnostics/fixes/create_field.rs | 2 +- crates/ide/src/diagnostics/fixes/fill_missing_fields.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide/src/diagnostics') diff --git a/crates/ide/src/diagnostics/fixes/create_field.rs b/crates/ide/src/diagnostics/fixes/create_field.rs index a5f457dce..f6e45967a 100644 --- a/crates/ide/src/diagnostics/fixes/create_field.rs +++ b/crates/ide/src/diagnostics/fixes/create_field.rs @@ -18,7 +18,7 @@ impl DiagnosticWithFixes for NoSuchField { ) -> Option> { let root = sema.db.parse_or_expand(self.file)?; missing_record_expr_field_fixes( - &sema, + sema, self.file.original_file(sema.db), &self.field.to_node(&root), ) diff --git a/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs b/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs index b5dd64c08..c76f6008a 100644 --- a/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs +++ b/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs @@ -37,7 +37,7 @@ impl DiagnosticWithFixes for MissingFields { let edit = { let mut builder = TextEdit::builder(); - algo::diff(&old_field_list.syntax(), &new_field_list.syntax()) + algo::diff(old_field_list.syntax(), new_field_list.syntax()) .into_text_edit(&mut builder); builder.finish() }; @@ -45,7 +45,7 @@ impl DiagnosticWithFixes for MissingFields { "fill_missing_fields", "Fill struct fields", SourceChange::from_text_edit(self.file.original_file(sema.db), edit), - sema.original_range(&field_list_parent.syntax()).range, + sema.original_range(field_list_parent.syntax()).range, )]) } } -- cgit v1.2.3