diff options
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 50c18d02b..d7ad88ed5 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -101,7 +101,8 @@ impl DiagnosticWithFix for MissingOkOrSomeInTailExpr { | |||
101 | let tail_expr_range = tail_expr.syntax().text_range(); | 101 | let tail_expr_range = tail_expr.syntax().text_range(); |
102 | let replacement = format!("{}({})", self.required, tail_expr.syntax()); | 102 | let replacement = format!("{}({})", self.required, tail_expr.syntax()); |
103 | let edit = TextEdit::replace(tail_expr_range, replacement); | 103 | let edit = TextEdit::replace(tail_expr_range, replacement); |
104 | let source_change = SourceFileEdit { file_id: self.file.original_file(sema.db), edit }.into(); | 104 | let source_change = |
105 | SourceFileEdit { file_id: self.file.original_file(sema.db), edit }.into(); | ||
105 | let name = if self.required == "Ok" { "Wrap with Ok" } else { "Wrap with Some" }; | 106 | let name = if self.required == "Ok" { "Wrap with Ok" } else { "Wrap with Some" }; |
106 | Some(Fix::new(name, source_change, tail_expr_range)) | 107 | Some(Fix::new(name, source_change, tail_expr_range)) |
107 | } | 108 | } |