mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
reduce visibility
This commit is contained in:
parent
56621d5fc0
commit
ebca677180
1 changed files with 3 additions and 3 deletions
|
@ -48,9 +48,6 @@ impl SourceRoot {
|
||||||
pub fn new_library() -> SourceRoot {
|
pub fn new_library() -> SourceRoot {
|
||||||
SourceRoot { is_library: true, ..SourceRoot::new() }
|
SourceRoot { is_library: true, ..SourceRoot::new() }
|
||||||
}
|
}
|
||||||
pub fn file_by_relative_path(&self, path: &RelativePath) -> Option<FileId> {
|
|
||||||
self.files.get(path).copied()
|
|
||||||
}
|
|
||||||
pub fn insert_file(&mut self, path: RelativePathBuf, file_id: FileId) {
|
pub fn insert_file(&mut self, path: RelativePathBuf, file_id: FileId) {
|
||||||
self.files.insert(path, file_id);
|
self.files.insert(path, file_id);
|
||||||
}
|
}
|
||||||
|
@ -60,6 +57,9 @@ impl SourceRoot {
|
||||||
pub fn walk(&self) -> impl Iterator<Item = FileId> + '_ {
|
pub fn walk(&self) -> impl Iterator<Item = FileId> + '_ {
|
||||||
self.files.values().copied()
|
self.files.values().copied()
|
||||||
}
|
}
|
||||||
|
pub(crate) fn file_by_relative_path(&self, path: &RelativePath) -> Option<FileId> {
|
||||||
|
self.files.get(path).copied()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `CrateGraph` is a bit of information which turns a set of text files into a
|
/// `CrateGraph` is a bit of information which turns a set of text files into a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue