aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-11 09:50:16 +0100
committerGitHub <[email protected]>2019-10-11 09:50:16 +0100
commit3c4e75721f16fc4f8ab67db4750f773f180cd12a (patch)
tree1725768201fc1e8c53781ad41a1765fb0dab9999 /crates
parent56621d5fc0325bc15ab2ab960ff43d24e74fb8ec (diff)
parentebca677180d7679588f3e9c2d7119edeb0d93872 (diff)
Merge #1996
1996: reduce visibility r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_db/src/input.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index 23148096c..cae51b02c 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -48,9 +48,6 @@ impl SourceRoot {
48 pub fn new_library() -> SourceRoot { 48 pub fn new_library() -> SourceRoot {
49 SourceRoot { is_library: true, ..SourceRoot::new() } 49 SourceRoot { is_library: true, ..SourceRoot::new() }
50 } 50 }
51 pub fn file_by_relative_path(&self, path: &RelativePath) -> Option<FileId> {
52 self.files.get(path).copied()
53 }
54 pub fn insert_file(&mut self, path: RelativePathBuf, file_id: FileId) { 51 pub fn insert_file(&mut self, path: RelativePathBuf, file_id: FileId) {
55 self.files.insert(path, file_id); 52 self.files.insert(path, file_id);
56 } 53 }
@@ -60,6 +57,9 @@ impl SourceRoot {
60 pub fn walk(&self) -> impl Iterator<Item = FileId> + '_ { 57 pub fn walk(&self) -> impl Iterator<Item = FileId> + '_ {
61 self.files.values().copied() 58 self.files.values().copied()
62 } 59 }
60 pub(crate) fn file_by_relative_path(&self, path: &RelativePath) -> Option<FileId> {
61 self.files.get(path).copied()
62 }
63} 63}
64 64
65/// `CrateGraph` is a bit of information which turns a set of text files into a 65/// `CrateGraph` is a bit of information which turns a set of text files into a