From a898752881779a328462ad9f2db291073f2f134f Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 12 Sep 2020 19:18:14 +0200 Subject: Reimplement import merging by making it recursive properly nesting all levels --- crates/syntax/src/ast/edit.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 8b1c65dd6..45cf31f13 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -347,6 +347,7 @@ impl ast::UseTree { self.clone() } + /// Splits off the given prefix, making it the path component of the use tree, appending the rest of the path to all UseTreeList items. #[must_use] pub fn split_prefix(&self, prefix: &ast::Path) -> ast::UseTree { let suffix = if self.path().as_ref() == Some(prefix) && self.use_tree_list().is_none() { -- cgit v1.2.3