aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorPhil Ellison <[email protected]>2020-12-30 17:33:33 +0000
committerPhil Ellison <[email protected]>2021-01-07 19:01:33 +0000
commit554ee6ea0272349b811c81507088f6e95c2b5a00 (patch)
tree6a6049c226ee4a54b5c8dcd56beeeb9a0e93b76a /crates/ide/src
parentb2dbe6e43a28a22be2b5d8631dff83b644520f59 (diff)
cargo fmt
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/diagnostics/fixes.rs3
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 }