diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-12 16:04:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-12 16:04:52 +0100 |
commit | a573e088ac64eeeb19e4fc74be2ff019be510477 (patch) | |
tree | 392c214055eab6a713814d46435bc0d91cf84e6c /crates/ra_ide/src/diagnostics.rs | |
parent | 6dba0e1c4de3b225556f7fce70518c8ebff170a6 (diff) | |
parent | 6dafc13f5f776980cd2560fb79d3d4790811c96d (diff) |
Merge #5726
5726: Rename ra_text_edit -> text_edit
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/diagnostics.rs')
-rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index 07bf133bd..54810d5bb 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs | |||
@@ -14,7 +14,7 @@ use ra_syntax::{ | |||
14 | ast::{self, AstNode}, | 14 | ast::{self, AstNode}, |
15 | SyntaxNode, TextRange, T, | 15 | SyntaxNode, TextRange, T, |
16 | }; | 16 | }; |
17 | use ra_text_edit::{TextEdit, TextEditBuilder}; | 17 | use text_edit::TextEdit; |
18 | 18 | ||
19 | use crate::{Diagnostic, FileId, Fix, SourceFileEdit}; | 19 | use crate::{Diagnostic, FileId, Fix, SourceFileEdit}; |
20 | 20 | ||
@@ -103,7 +103,7 @@ fn check_unnecessary_braces_in_use_statement( | |||
103 | text_edit_for_remove_unnecessary_braces_with_self_in_use_statement(&single_use_tree) | 103 | text_edit_for_remove_unnecessary_braces_with_self_in_use_statement(&single_use_tree) |
104 | .unwrap_or_else(|| { | 104 | .unwrap_or_else(|| { |
105 | let to_replace = single_use_tree.syntax().text().to_string(); | 105 | let to_replace = single_use_tree.syntax().text().to_string(); |
106 | let mut edit_builder = TextEditBuilder::default(); | 106 | let mut edit_builder = TextEdit::builder(); |
107 | edit_builder.delete(use_range); | 107 | edit_builder.delete(use_range); |
108 | edit_builder.insert(use_range.start(), to_replace); | 108 | edit_builder.insert(use_range.start(), to_replace); |
109 | edit_builder.finish() | 109 | edit_builder.finish() |
@@ -149,7 +149,7 @@ fn check_struct_shorthand_initialization( | |||
149 | let field_expr = expr.syntax().text().to_string(); | 149 | let field_expr = expr.syntax().text().to_string(); |
150 | let field_name_is_tup_index = name_ref.as_tuple_field().is_some(); | 150 | let field_name_is_tup_index = name_ref.as_tuple_field().is_some(); |
151 | if field_name == field_expr && !field_name_is_tup_index { | 151 | if field_name == field_expr && !field_name_is_tup_index { |
152 | let mut edit_builder = TextEditBuilder::default(); | 152 | let mut edit_builder = TextEdit::builder(); |
153 | edit_builder.delete(record_field.syntax().text_range()); | 153 | edit_builder.delete(record_field.syntax().text_range()); |
154 | edit_builder.insert(record_field.syntax().text_range().start(), field_name); | 154 | edit_builder.insert(record_field.syntax().text_range().start(), field_name); |
155 | let edit = edit_builder.finish(); | 155 | let edit = edit_builder.finish(); |