From db6dda94a39534bbf20da844a4f221c3d14509c4 Mon Sep 17 00:00:00 2001 From: Phil Ellison Date: Sat, 23 Jan 2021 07:54:45 +0000 Subject: Remove use of SourceFileEdit --- crates/ide/src/diagnostics/fixes.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ide/src') diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 1f112c5b8..cbfc66ab3 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs @@ -161,8 +161,7 @@ impl DiagnosticWithFix for ReplaceFilterMapNextWithFindMap { let edit = TextEdit::replace(range_to_replace, replacement); - let source_change = - SourceFileEdit { file_id: self.file.original_file(sema.db), edit }.into(); + let source_change = SourceChange::from_text_edit(self.file.original_file(sema.db), edit); Some(Fix::new( "Replace filter_map(..).next() with find_map()", -- cgit v1.2.3