mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Implement BatchDatabase construction
This commit is contained in:
parent
15224dfcd5
commit
43e52ac9e2
5 changed files with 116 additions and 22 deletions
|
@ -47,10 +47,8 @@ impl ServerWorldState {
|
|||
roots.push(krate.root_dir(&ws.sysroot).to_path_buf())
|
||||
}
|
||||
}
|
||||
roots.sort();
|
||||
roots.dedup();
|
||||
let roots_to_scan = roots.len();
|
||||
let (mut vfs, roots) = Vfs::new(roots);
|
||||
let roots_to_scan = roots.len();
|
||||
for r in roots {
|
||||
let is_local = vfs.root2path(r).starts_with(&root);
|
||||
change.add_root(SourceRootId(r.0.into()), is_local);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue