aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-02 15:31:38 +0000
committerAleksey Kladov <[email protected]>2020-11-02 15:58:33 +0000
commitba8d6d1e4ea2590b31470171efc175b0301c5e1c (patch)
tree6304a61e803e5adf802abce8ae2d7066a2c5fef8 /crates/assists
parent731b38fa3c1694648e6c8e60f61820f9783343eb (diff)
Remove more unreachable pubs
Diffstat (limited to 'crates/assists')
-rw-r--r--crates/assists/src/utils/import_assets.rs6
-rw-r--r--crates/assists/src/utils/insert_use.rs4
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)]
28pub(crate) struct TraitImportCandidate { 28pub(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)]
34pub(crate) struct PathImportCandidate { 34pub(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::{
17use test_utils::mark; 17use test_utils::mark;
18 18
19#[derive(Debug)] 19#[derive(Debug)]
20pub enum ImportScope { 20pub(crate) enum ImportScope {
21 File(ast::SourceFile), 21 File(ast::SourceFile),
22 Module(ast::ItemList), 22 Module(ast::ItemList),
23} 23}
24 24
25impl ImportScope { 25impl 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()) {