aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/utils/insert_use.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-11-27 16:00:03 +0000
committerKirill Bulatov <[email protected]>2020-11-27 16:00:03 +0000
commitb2e6ca46ca2ad3352ef13154b401e798e9a7d752 (patch)
treea58af78b157d815799c5c3f0a9c30470eb7a751a /crates/assists/src/utils/insert_use.rs
parentc66d477f5a72247b04b9025f6ba9c403ca628d41 (diff)
Profile completions better
Diffstat (limited to 'crates/assists/src/utils/insert_use.rs')
-rw-r--r--crates/assists/src/utils/insert_use.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/assists/src/utils/insert_use.rs b/crates/assists/src/utils/insert_use.rs
index 423782a0e..975a08a20 100644
--- a/crates/assists/src/utils/insert_use.rs
+++ b/crates/assists/src/utils/insert_use.rs
@@ -95,6 +95,7 @@ pub fn insert_use<'a>(
95 path: ast::Path, 95 path: ast::Path,
96 merge: Option<MergeBehaviour>, 96 merge: Option<MergeBehaviour>,
97) -> SyntaxRewriter<'a> { 97) -> SyntaxRewriter<'a> {
98 let _p = profile::span("mod_path_to_ast");
98 let mut rewriter = SyntaxRewriter::default(); 99 let mut rewriter = SyntaxRewriter::default();
99 let use_item = make::use_(make::use_tree(path.clone(), None, None, false)); 100 let use_item = make::use_(make::use_tree(path.clone(), None, None, false));
100 // merge into existing imports if possible 101 // merge into existing imports if possible