From ba8d6d1e4ea2590b31470171efc175b0301c5e1c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 2 Nov 2020 16:31:38 +0100 Subject: Remove more unreachable pubs --- crates/assists/src/utils/import_assets.rs | 6 +++--- crates/assists/src/utils/insert_use.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/assists/src') 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 { #[derive(Debug)] pub(crate) struct TraitImportCandidate { - pub ty: hir::Type, - pub name: ast::NameRef, + pub(crate) ty: hir::Type, + pub(crate) name: ast::NameRef, } #[derive(Debug)] pub(crate) struct PathImportCandidate { - pub name: ast::NameRef, + pub(crate) name: ast::NameRef, } #[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::{ use test_utils::mark; #[derive(Debug)] -pub enum ImportScope { +pub(crate) enum ImportScope { File(ast::SourceFile), Module(ast::ItemList), } impl ImportScope { - pub fn from(syntax: SyntaxNode) -> Option { + pub(crate) fn from(syntax: SyntaxNode) -> Option { if let Some(module) = ast::Module::cast(syntax.clone()) { module.item_list().map(ImportScope::Module) } else if let this @ Some(_) = ast::SourceFile::cast(syntax.clone()) { -- cgit v1.2.3