From 8109ebb101ec19ffc8e003171bda8f7c53bb79e4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 24 Jun 2019 12:35:07 +0300 Subject: Add SourceRoot::is_library, in preparation for salsa's durability --- crates/ra_ide_api/src/change.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide_api') 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 { if !change.new_roots.is_empty() { let mut local_roots = Vec::clone(&self.local_roots()); for (root_id, is_local) in change.new_roots { - self.set_source_root(root_id, Default::default()); + let root = if is_local { SourceRoot::new() } else { SourceRoot::new_library() }; + self.set_source_root(root_id, Arc::new(root)); if is_local { local_roots.push(root_id); } -- cgit v1.2.3