From d475e3b29f1783682b2ac78459e38668bb9f8c14 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 20 Nov 2018 16:24:47 +0300 Subject: Make LikdId private --- crates/ra_analysis/src/descriptors/module/mod.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'crates/ra_analysis/src/descriptors') diff --git a/crates/ra_analysis/src/descriptors/module/mod.rs b/crates/ra_analysis/src/descriptors/module/mod.rs index d62826ee3..8a75e11be 100644 --- a/crates/ra_analysis/src/descriptors/module/mod.rs +++ b/crates/ra_analysis/src/descriptors/module/mod.rs @@ -142,7 +142,7 @@ impl crate::loc2id::NumericId for ModuleId { } #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] -pub(crate) struct LinkId(u32); +struct LinkId(u32); #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub enum Problem { @@ -159,7 +159,7 @@ impl ModuleId { pub(crate) fn source(self, tree: &ModuleTree) -> ModuleSource { tree.module(self).source } - pub(crate) fn parent_link(self, tree: &ModuleTree) -> Option { + fn parent_link(self, tree: &ModuleTree) -> Option { tree.module(self).parent } pub(crate) fn parent(self, tree: &ModuleTree) -> Option { @@ -207,17 +207,13 @@ impl ModuleId { } impl LinkId { - pub(crate) fn owner(self, tree: &ModuleTree) -> ModuleId { + fn owner(self, tree: &ModuleTree) -> ModuleId { tree.link(self).owner } - pub(crate) fn name(self, tree: &ModuleTree) -> SmolStr { + fn name(self, tree: &ModuleTree) -> SmolStr { tree.link(self).name.clone() } - pub(crate) fn bind_source<'a>( - self, - tree: &ModuleTree, - db: &impl SyntaxDatabase, - ) -> ast::ModuleNode { + fn bind_source<'a>(self, tree: &ModuleTree, db: &impl SyntaxDatabase) -> ast::ModuleNode { let owner = self.owner(tree); match owner.source(tree).resolve(db) { ModuleSourceNode::SourceFile(root) => { -- cgit v1.2.3