Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/apply_change.rs')
| -rw-r--r-- | crates/ide-db/src/apply_change.rs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/crates/ide-db/src/apply_change.rs b/crates/ide-db/src/apply_change.rs index 6a85c6e548..9bbd12aaa9 100644 --- a/crates/ide-db/src/apply_change.rs +++ b/crates/ide-db/src/apply_change.rs @@ -1,14 +1,9 @@ //! Applies changes to the IDE state transactionally. -use base_db::SourceRootId; use profile::Bytes; -use rustc_hash::FxHashSet; -use salsa::{Database as _, Durability, Setter as _}; +use salsa::{Database as _, Durability}; -use crate::{ - ChangeWithProcMacros, RootDatabase, - symbol_index::{LibraryRoots, LocalRoots}, -}; +use crate::{ChangeWithProcMacros, RootDatabase}; impl RootDatabase { pub fn request_cancellation(&mut self) { @@ -20,20 +15,6 @@ impl RootDatabase { let _p = tracing::info_span!("RootDatabase::apply_change").entered(); self.request_cancellation(); tracing::trace!("apply_change {:?}", change); - if let Some(roots) = &change.source_change.roots { - let mut local_roots = FxHashSet::default(); - let mut library_roots = FxHashSet::default(); - for (idx, root) in roots.iter().enumerate() { - let root_id = SourceRootId(idx as u32); - if root.is_library { - library_roots.insert(root_id); - } else { - local_roots.insert(root_id); - } - } - LocalRoots::get(self).set_roots(self).to(local_roots); - LibraryRoots::get(self).set_roots(self).to(library_roots); - } change.apply(self); } |