mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
index libraies off the main thread
This commit is contained in:
parent
47cbaeba6f
commit
5ba645c009
5 changed files with 39 additions and 13 deletions
|
@ -57,9 +57,8 @@ impl AnalysisHostImpl {
|
|||
}
|
||||
self.data_mut().crate_graph = graph;
|
||||
}
|
||||
pub fn add_library(&mut self, files: impl Iterator<Item=(FileId, String)>) {
|
||||
let libs = ReadonlySourceRoot::new(files);
|
||||
self.data_mut().libs.push(Arc::new(libs));
|
||||
pub fn add_library(&mut self, root: ReadonlySourceRoot) {
|
||||
self.data_mut().libs.push(Arc::new(root));
|
||||
}
|
||||
fn data_mut(&mut self) -> &mut WorldData {
|
||||
Arc::make_mut(&mut self.data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue