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_ssr/src/replacing.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_ssr/src/replacing.rs')
-rw-r--r-- | crates/ra_ssr/src/replacing.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ssr/src/replacing.rs b/crates/ra_ssr/src/replacing.rs index 0943244ff..74f9e7db6 100644 --- a/crates/ra_ssr/src/replacing.rs +++ b/crates/ra_ssr/src/replacing.rs | |||
@@ -4,8 +4,8 @@ use crate::matching::Var; | |||
4 | use crate::{resolving::ResolvedRule, Match, SsrMatches}; | 4 | use crate::{resolving::ResolvedRule, Match, SsrMatches}; |
5 | use ra_syntax::ast::{self, AstToken}; | 5 | use ra_syntax::ast::{self, AstToken}; |
6 | use ra_syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize}; | 6 | use ra_syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken, TextRange, TextSize}; |
7 | use ra_text_edit::TextEdit; | ||
8 | use rustc_hash::{FxHashMap, FxHashSet}; | 7 | use rustc_hash::{FxHashMap, FxHashSet}; |
8 | use text_edit::TextEdit; | ||
9 | 9 | ||
10 | /// Returns a text edit that will replace each match in `matches` with its corresponding replacement | 10 | /// Returns a text edit that will replace each match in `matches` with its corresponding replacement |
11 | /// template. Placeholders in the template will have been substituted with whatever they matched to | 11 | /// template. Placeholders in the template will have been substituted with whatever they matched to |
@@ -24,7 +24,7 @@ fn matches_to_edit_at_offset( | |||
24 | relative_start: TextSize, | 24 | relative_start: TextSize, |
25 | rules: &[ResolvedRule], | 25 | rules: &[ResolvedRule], |
26 | ) -> TextEdit { | 26 | ) -> TextEdit { |
27 | let mut edit_builder = ra_text_edit::TextEditBuilder::default(); | 27 | let mut edit_builder = TextEdit::builder(); |
28 | for m in &matches.matches { | 28 | for m in &matches.matches { |
29 | edit_builder.replace( | 29 | edit_builder.replace( |
30 | m.range.range.checked_sub(relative_start).unwrap(), | 30 | m.range.range.checked_sub(relative_start).unwrap(), |