From 131c2da6bfd8ad6a25a55b4c85081da327ba2acb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 26 Nov 2019 11:29:20 +0300 Subject: :arrow_up: salsa --- crates/ra_ide_api/src/change.rs | 2 +- crates/ra_ide_api/src/db.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 0f692460d..84340aff8 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs @@ -171,7 +171,7 @@ impl RootDatabase { log::info!("apply_change {:?}", change); { let _p = profile("RootDatabase::apply_change/cancellation"); - self.salsa_runtime().synthetic_write(Durability::LOW); + self.salsa_runtime_mut().synthetic_write(Durability::LOW); } if !change.new_roots.is_empty() { let mut local_roots = Vec::clone(&self.local_roots()); diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index c2a9dcdd1..f739ebecd 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs @@ -65,6 +65,9 @@ impl salsa::Database for RootDatabase { fn salsa_runtime(&self) -> &salsa::Runtime { &self.runtime } + fn salsa_runtime_mut(&mut self) -> &mut salsa::Runtime { + &mut self.runtime + } fn on_propagated_panic(&self) -> ! { Canceled::throw() } -- cgit v1.2.3