make source_root API more abstract

This commit is contained in:
Aleksey Kladov 2019-09-05 22:36:04 +03:00
parent 3bdb456d17
commit 9ae455ea52
7 changed files with 31 additions and 17 deletions

View file

@ -87,7 +87,7 @@ pub(crate) fn world_symbols(db: &RootDatabase, query: Query) -> Vec<FileSymbol>
let mut files = Vec::new();
for &root in db.local_roots().iter() {
let sr = db.source_root(root);
files.extend(sr.files.values().copied())
files.extend(sr.walk())
}
let snap = Snap(db.snapshot());