aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-13 08:18:49 +0100
committerGitHub <[email protected]>2021-06-13 08:18:49 +0100
commitadbee621a75f47e0da4f30d7205dfce009138865 (patch)
treeed8dcbba37de566f00d119817e141bb8293ce164 /crates/ide/src/diagnostics
parentf107b0f1e223dba33cb9850ce44bcbb4345eef52 (diff)
parent5ac6804bb3a07b959e8c2c3534255a8d6bb4948c (diff)
Merge #9242
9242: Clippy r=matklad a=Maan2003 Best viewed commit wise Co-authored-by: Maan2003 <[email protected]>
Diffstat (limited to 'crates/ide/src/diagnostics')
-rw-r--r--crates/ide/src/diagnostics/fixes/create_field.rs2
-rw-r--r--crates/ide/src/diagnostics/fixes/fill_missing_fields.rs4
2 files changed, 3 insertions, 3 deletions
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 {
18 ) -> Option<Vec<Assist>> { 18 ) -> Option<Vec<Assist>> {
19 let root = sema.db.parse_or_expand(self.file)?; 19 let root = sema.db.parse_or_expand(self.file)?;
20 missing_record_expr_field_fixes( 20 missing_record_expr_field_fixes(
21 &sema, 21 sema,
22 self.file.original_file(sema.db), 22 self.file.original_file(sema.db),
23 &self.field.to_node(&root), 23 &self.field.to_node(&root),
24 ) 24 )
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 {
37 37
38 let edit = { 38 let edit = {
39 let mut builder = TextEdit::builder(); 39 let mut builder = TextEdit::builder();
40 algo::diff(&old_field_list.syntax(), &new_field_list.syntax()) 40 algo::diff(old_field_list.syntax(), new_field_list.syntax())
41 .into_text_edit(&mut builder); 41 .into_text_edit(&mut builder);
42 builder.finish() 42 builder.finish()
43 }; 43 };
@@ -45,7 +45,7 @@ impl DiagnosticWithFixes for MissingFields {
45 "fill_missing_fields", 45 "fill_missing_fields",
46 "Fill struct fields", 46 "Fill struct fields",
47 SourceChange::from_text_edit(self.file.original_file(sema.db), edit), 47 SourceChange::from_text_edit(self.file.original_file(sema.db), edit),
48 sema.original_range(&field_list_parent.syntax()).range, 48 sema.original_range(field_list_parent.syntax()).range,
49 )]) 49 )])
50 } 50 }
51} 51}