diff options
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/auto_import.rs | 4 |
1 files changed, 1 insertions, 3 deletions
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( | |||
492 | } | 492 | } |
493 | } | 493 | } |
494 | 494 | ||
495 | #[allow(unused)] | ||
496 | pub fn collect_hir_path_segments(path: &hir::Path) -> Vec<SmolStr> { | 495 | pub fn collect_hir_path_segments(path: &hir::Path) -> Vec<SmolStr> { |
497 | let mut ps = Vec::<SmolStr>::with_capacity(10); | 496 | let mut ps = Vec::<SmolStr>::with_capacity(10); |
498 | match path.kind { | 497 | match path.kind { |
@@ -503,7 +502,7 @@ pub fn collect_hir_path_segments(path: &hir::Path) -> Vec<SmolStr> { | |||
503 | hir::PathKind::Super => ps.push("super".into()), | 502 | hir::PathKind::Super => ps.push("super".into()), |
504 | } | 503 | } |
505 | for s in path.segments.iter() { | 504 | for s in path.segments.iter() { |
506 | ps.push(s.name.to_smolstr()); | 505 | ps.push(s.name.to_string().into()); |
507 | } | 506 | } |
508 | ps | 507 | ps |
509 | } | 508 | } |
@@ -511,7 +510,6 @@ pub fn collect_hir_path_segments(path: &hir::Path) -> Vec<SmolStr> { | |||
511 | // This function produces sequence of text edits into edit | 510 | // This function produces sequence of text edits into edit |
512 | // to import the target path in the most appropriate scope given | 511 | // to import the target path in the most appropriate scope given |
513 | // the cursor position | 512 | // the cursor position |
514 | #[allow(unused)] | ||
515 | pub fn auto_import_text_edit( | 513 | pub fn auto_import_text_edit( |
516 | // Ideally the position of the cursor, used to | 514 | // Ideally the position of the cursor, used to |
517 | position: &SyntaxNode, | 515 | position: &SyntaxNode, |