aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/expand_glob_import.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-09-29 11:29:33 +0100
committerGitHub <[email protected]>2020-09-29 11:29:33 +0100
commit18c62c8a39d95ce3bb10ff5446bb589b1128a090 (patch)
treef829779003722fb50082b5aa55a725aed841d449 /crates/assists/src/handlers/expand_glob_import.rs
parent7b674f9ab491fdd01278c21f539e65239518e296 (diff)
parentf2ae412ccfa96c4bde42f0b004594c4d6fa54634 (diff)
Merge #6019
6019: Remove make::path_from_text r=matklad a=Veykril This removes the `make::path_from_text` function, which according to a note should've been private. I removed it since it didn't really serve a purpose as it was simply wrapping `make::ast_from_text`. Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/assists/src/handlers/expand_glob_import.rs')
-rw-r--r--crates/assists/src/handlers/expand_glob_import.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/assists/src/handlers/expand_glob_import.rs b/crates/assists/src/handlers/expand_glob_import.rs
index e14ac7f65..d1adff972 100644
--- a/crates/assists/src/handlers/expand_glob_import.rs
+++ b/crates/assists/src/handlers/expand_glob_import.rs
@@ -264,12 +264,8 @@ fn replace_ast(
264 match use_trees.as_slice() { 264 match use_trees.as_slice() {
265 [name] => { 265 [name] => {
266 if let Some(end_path) = name.path() { 266 if let Some(end_path) = name.path() {
267 let replacement = make::use_tree( 267 let replacement =
268 make::path_from_text(&format!("{}::{}", path, end_path)), 268 make::use_tree(make::path_concat(path, end_path), None, None, false);
269 None,
270 None,
271 false,
272 );
273 269
274 algo::diff( 270 algo::diff(
275 &parent.either(|n| n.syntax().clone(), |n| n.syntax().clone()), 271 &parent.either(|n| n.syntax().clone(), |n| n.syntax().clone()),