diff options
Diffstat (limited to 'crates/assists')
-rw-r--r-- | crates/assists/src/utils/import_assets.rs | 6 | ||||
-rw-r--r-- | crates/assists/src/utils/insert_use.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/assists/src/utils/import_assets.rs b/crates/assists/src/utils/import_assets.rs index 23db3a74b..f47edbb76 100644 --- a/crates/assists/src/utils/import_assets.rs +++ b/crates/assists/src/utils/import_assets.rs | |||
@@ -26,13 +26,13 @@ pub(crate) enum ImportCandidate { | |||
26 | 26 | ||
27 | #[derive(Debug)] | 27 | #[derive(Debug)] |
28 | pub(crate) struct TraitImportCandidate { | 28 | pub(crate) struct TraitImportCandidate { |
29 | pub ty: hir::Type, | 29 | pub(crate) ty: hir::Type, |
30 | pub name: ast::NameRef, | 30 | pub(crate) name: ast::NameRef, |
31 | } | 31 | } |
32 | 32 | ||
33 | #[derive(Debug)] | 33 | #[derive(Debug)] |
34 | pub(crate) struct PathImportCandidate { | 34 | pub(crate) struct PathImportCandidate { |
35 | pub name: ast::NameRef, | 35 | pub(crate) name: ast::NameRef, |
36 | } | 36 | } |
37 | 37 | ||
38 | #[derive(Debug)] | 38 | #[derive(Debug)] |
diff --git a/crates/assists/src/utils/insert_use.rs b/crates/assists/src/utils/insert_use.rs index 033fbcedc..a76bd5ebf 100644 --- a/crates/assists/src/utils/insert_use.rs +++ b/crates/assists/src/utils/insert_use.rs | |||
@@ -17,13 +17,13 @@ use syntax::{ | |||
17 | use test_utils::mark; | 17 | use test_utils::mark; |
18 | 18 | ||
19 | #[derive(Debug)] | 19 | #[derive(Debug)] |
20 | pub enum ImportScope { | 20 | pub(crate) enum ImportScope { |
21 | File(ast::SourceFile), | 21 | File(ast::SourceFile), |
22 | Module(ast::ItemList), | 22 | Module(ast::ItemList), |
23 | } | 23 | } |
24 | 24 | ||
25 | impl ImportScope { | 25 | impl ImportScope { |
26 | pub fn from(syntax: SyntaxNode) -> Option<Self> { | 26 | pub(crate) fn from(syntax: SyntaxNode) -> Option<Self> { |
27 | if let Some(module) = ast::Module::cast(syntax.clone()) { | 27 | if let Some(module) = ast::Module::cast(syntax.clone()) { |
28 | module.item_list().map(ImportScope::Module) | 28 | module.item_list().map(ImportScope::Module) |
29 | } else if let this @ Some(_) = ast::SourceFile::cast(syntax.clone()) { | 29 | } else if let this @ Some(_) = ast::SourceFile::cast(syntax.clone()) { |