From 1fdc9d8e9ee6afa62fe312e18aadaff316265bb8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 8 May 2021 14:38:56 +0300 Subject: internal: remove one more syntax rewriter --- crates/syntax/src/ted.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/syntax/src') diff --git a/crates/syntax/src/ted.rs b/crates/syntax/src/ted.rs index 91a06101f..a50c0dbca 100644 --- a/crates/syntax/src/ted.rs +++ b/crates/syntax/src/ted.rs @@ -125,8 +125,11 @@ pub fn remove_all_iter(range: impl IntoIterator) { } pub fn replace(old: impl Element, new: impl Element) { + replace_with_many(old, vec![new.syntax_element()]) +} +pub fn replace_with_many(old: impl Element, new: Vec) { let old = old.syntax_element(); - replace_all(old.clone()..=old, vec![new.syntax_element()]) + replace_all(old.clone()..=old, new) } pub fn replace_all(range: RangeInclusive, new: Vec) { let start = range.start().index(); -- cgit v1.2.3