diff options
author | Aleksey Kladov <[email protected]> | 2020-05-17 23:11:40 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-19 19:28:27 +0100 |
commit | 2bf6b16a7f174ea3f581f26f642b4febff0b9ce8 (patch) | |
tree | 148ebef7bcd3b5957155c6928287c7d5644817b6 /crates/ra_assists/src | |
parent | a752853350639a915178ea900a51f3c45443795e (diff) |
Server side of SnippetTextEdit
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/assist_context.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/crates/ra_assists/src/assist_context.rs b/crates/ra_assists/src/assist_context.rs index b90bbf8b2..0dcd9df61 100644 --- a/crates/ra_assists/src/assist_context.rs +++ b/crates/ra_assists/src/assist_context.rs | |||
@@ -208,16 +208,6 @@ impl AssistBuilder { | |||
208 | pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) { | 208 | pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) { |
209 | self.edit.replace(range, replace_with.into()) | 209 | self.edit.replace(range, replace_with.into()) |
210 | } | 210 | } |
211 | /// Append specified `text` at the given `offset` | ||
212 | pub(crate) fn replace_snippet( | ||
213 | &mut self, | ||
214 | _cap: SnippetCap, | ||
215 | range: TextRange, | ||
216 | replace_with: impl Into<String>, | ||
217 | ) { | ||
218 | self.is_snippet = true; | ||
219 | self.edit.replace(range, replace_with.into()) | ||
220 | } | ||
221 | pub(crate) fn replace_ast<N: AstNode>(&mut self, old: N, new: N) { | 211 | pub(crate) fn replace_ast<N: AstNode>(&mut self, old: N, new: N) { |
222 | algo::diff(old.syntax(), new.syntax()).into_text_edit(&mut self.edit) | 212 | algo::diff(old.syntax(), new.syntax()).into_text_edit(&mut self.edit) |
223 | } | 213 | } |