mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Prepare SourceDatabase API for lazy file loading
This commit is contained in:
parent
1555a1aa0d
commit
abf2179c0b
14 changed files with 123 additions and 90 deletions
|
@ -57,7 +57,7 @@ impl SourceRoot {
|
|||
pub fn walk(&self) -> impl Iterator<Item = FileId> + '_ {
|
||||
self.files.values().copied()
|
||||
}
|
||||
pub(crate) fn file_by_relative_path(&self, path: &RelativePath) -> Option<FileId> {
|
||||
pub fn file_by_relative_path(&self, path: &RelativePath) -> Option<FileId> {
|
||||
self.files.get(path).copied()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue