aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-11 09:37:54 +0100
committerAleksey Kladov <[email protected]>2019-10-11 09:37:54 +0100
commitebca677180d7679588f3e9c2d7119edeb0d93872 (patch)
tree1725768201fc1e8c53781ad41a1765fb0dab9999 /crates/ra_db
parent56621d5fc0325bc15ab2ab960ff43d24e74fb8ec (diff)
reduce visibility
Diffstat (limited to 'crates/ra_db')
-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