diff options
Diffstat (limited to 'crates/ide/src/diagnostics/fixes/remove_semicolon.rs')
-rw-r--r-- | crates/ide/src/diagnostics/fixes/remove_semicolon.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/diagnostics/fixes/remove_semicolon.rs b/crates/ide/src/diagnostics/fixes/remove_semicolon.rs index 45471da41..f1724d479 100644 --- a/crates/ide/src/diagnostics/fixes/remove_semicolon.rs +++ b/crates/ide/src/diagnostics/fixes/remove_semicolon.rs | |||
@@ -4,14 +4,14 @@ use ide_db::{source_change::SourceChange, RootDatabase}; | |||
4 | use syntax::{ast, AstNode}; | 4 | use syntax::{ast, AstNode}; |
5 | use text_edit::TextEdit; | 5 | use text_edit::TextEdit; |
6 | 6 | ||
7 | use crate::diagnostics::{fix, DiagnosticWithFix}; | 7 | use crate::diagnostics::{fix, DiagnosticWithFixes}; |
8 | 8 | ||
9 | impl DiagnosticWithFix for RemoveThisSemicolon { | 9 | impl DiagnosticWithFixes for RemoveThisSemicolon { |
10 | fn fix( | 10 | fn fixes( |
11 | &self, | 11 | &self, |
12 | sema: &Semantics<RootDatabase>, | 12 | sema: &Semantics<RootDatabase>, |
13 | _resolve: &AssistResolveStrategy, | 13 | _resolve: &AssistResolveStrategy, |
14 | ) -> Option<Assist> { | 14 | ) -> Option<Vec<Assist>> { |
15 | let root = sema.db.parse_or_expand(self.file)?; | 15 | let root = sema.db.parse_or_expand(self.file)?; |
16 | 16 | ||
17 | let semicolon = self | 17 | let semicolon = self |
@@ -26,7 +26,7 @@ impl DiagnosticWithFix for RemoveThisSemicolon { | |||
26 | let edit = TextEdit::delete(semicolon); | 26 | let edit = TextEdit::delete(semicolon); |
27 | let source_change = SourceChange::from_text_edit(self.file.original_file(sema.db), edit); | 27 | let source_change = SourceChange::from_text_edit(self.file.original_file(sema.db), edit); |
28 | 28 | ||
29 | Some(fix("remove_semicolon", "Remove this semicolon", source_change, semicolon)) | 29 | Some(vec![fix("remove_semicolon", "Remove this semicolon", source_change, semicolon)]) |
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||