diff options
-rw-r--r-- | crates/assists/src/handlers/replace_qualified_name_with_use.rs | 2 | ||||
-rw-r--r-- | crates/ide_helpers/src/lib.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/replace_qualified_name_with_use.rs b/crates/assists/src/handlers/replace_qualified_name_with_use.rs index 9b8caacd9..5e5c41a6f 100644 --- a/crates/assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/assists/src/handlers/replace_qualified_name_with_use.rs | |||
@@ -51,7 +51,7 @@ pub(crate) fn replace_qualified_name_with_use( | |||
51 | ) | 51 | ) |
52 | } | 52 | } |
53 | 53 | ||
54 | /// Adds replacements to `re` that shorten `path` in all descendants of `node`.g | 54 | /// Adds replacements to `re` that shorten `path` in all descendants of `node`. |
55 | fn shorten_paths(rewriter: &mut SyntaxRewriter<'static>, node: SyntaxNode, path: &ast::Path) { | 55 | fn shorten_paths(rewriter: &mut SyntaxRewriter<'static>, node: SyntaxNode, path: &ast::Path) { |
56 | for child in node.children() { | 56 | for child in node.children() { |
57 | match_ast! { | 57 | match_ast! { |
diff --git a/crates/ide_helpers/src/lib.rs b/crates/ide_helpers/src/lib.rs index 069cb2bdd..ad4404b19 100644 --- a/crates/ide_helpers/src/lib.rs +++ b/crates/ide_helpers/src/lib.rs | |||
@@ -1,12 +1,14 @@ | |||
1 | //! A module with ide helpers for high-level ide features. | ||
1 | use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait}; | 2 | use hir::{Crate, Enum, Module, ScopeDef, Semantics, Trait}; |
2 | use ide_db::RootDatabase; | 3 | use ide_db::RootDatabase; |
3 | use syntax::ast::{self, make}; | 4 | use syntax::ast::{self, make}; |
4 | 5 | ||
5 | pub mod insert_use; | 6 | pub mod insert_use; |
6 | 7 | ||
8 | /// Converts the mod path struct into its ast representation. | ||
7 | pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path { | 9 | pub fn mod_path_to_ast(path: &hir::ModPath) -> ast::Path { |
8 | let _p = profile::span("mod_path_to_ast"); | 10 | let _p = profile::span("mod_path_to_ast"); |
9 | 11 | ||
10 | let mut segments = Vec::new(); | 12 | let mut segments = Vec::new(); |
11 | let mut is_abs = false; | 13 | let mut is_abs = false; |
12 | match path.kind { | 14 | match path.kind { |