From e01052d1f0b8bf70a418a10538528923c5f400d5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 22 Apr 2019 15:56:28 +0300 Subject: move auto-imoprter into IDE auto-import is purely an IDE concern, so it should be done outside of HIR --- crates/ra_assists/src/auto_import.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/auto_import.rs b/crates/ra_assists/src/auto_import.rs index b002d0e4d..7c856c19b 100644 --- a/crates/ra_assists/src/auto_import.rs +++ b/crates/ra_assists/src/auto_import.rs @@ -492,7 +492,6 @@ fn apply_auto_import( } } -#[allow(unused)] pub fn collect_hir_path_segments(path: &hir::Path) -> Vec { let mut ps = Vec::::with_capacity(10); match path.kind { @@ -503,7 +502,7 @@ pub fn collect_hir_path_segments(path: &hir::Path) -> Vec { hir::PathKind::Super => ps.push("super".into()), } for s in path.segments.iter() { - ps.push(s.name.to_smolstr()); + ps.push(s.name.to_string().into()); } ps } @@ -511,7 +510,6 @@ pub fn collect_hir_path_segments(path: &hir::Path) -> Vec { // This function produces sequence of text edits into edit // to import the target path in the most appropriate scope given // the cursor position -#[allow(unused)] pub fn auto_import_text_edit( // Ideally the position of the cursor, used to position: &SyntaxNode, -- cgit v1.2.3