aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-06-24 10:35:07 +0100
committerAleksey Kladov <[email protected]>2019-06-24 10:35:07 +0100
commit8109ebb101ec19ffc8e003171bda8f7c53bb79e4 (patch)
treed28eb50d564dac058dea473e72940cccd5ae981c /crates/ra_ide_api/src
parent7d79be32801036c39507fe96f87ed316e3934662 (diff)
Add SourceRoot::is_library, in preparation for salsa's durability
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/change.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs
index 895b1e966..8d9918d16 100644
--- a/crates/ra_ide_api/src/change.rs
+++ b/crates/ra_ide_api/src/change.rs
@@ -163,7 +163,8 @@ impl RootDatabase {
163 if !change.new_roots.is_empty() { 163 if !change.new_roots.is_empty() {
164 let mut local_roots = Vec::clone(&self.local_roots()); 164 let mut local_roots = Vec::clone(&self.local_roots());
165 for (root_id, is_local) in change.new_roots { 165 for (root_id, is_local) in change.new_roots {
166 self.set_source_root(root_id, Default::default()); 166 let root = if is_local { SourceRoot::new() } else { SourceRoot::new_library() };
167 self.set_source_root(root_id, Arc::new(root));
167 if is_local { 168 if is_local {
168 local_roots.push(root_id); 169 local_roots.push(root_id);
169 } 170 }