re-enable cancelation

This commit is contained in:
Aleksey Kladov 2018-10-25 17:22:31 +03:00
parent 772acb53f2
commit 75d9cbd7c2
2 changed files with 7 additions and 9 deletions

View File

@ -11,7 +11,7 @@ rayon = "1.0.2"
fst = "0.3.1" fst = "0.3.1"
ra_syntax = { path = "../ra_syntax" } ra_syntax = { path = "../ra_syntax" }
ra_editor = { path = "../ra_editor" } ra_editor = { path = "../ra_editor" }
salsa = "0.6.0" salsa = "0.6.2"
rustc-hash = "1.0" rustc-hash = "1.0"
[dev-dependencies] [dev-dependencies]

View File

@ -27,14 +27,12 @@ fn salsa_runtime(&self) -> &salsa::Runtime<RootDatabase> {
} }
} }
pub(crate) fn check_canceled(_db: &impl salsa::Database) -> Cancelable<()> { pub(crate) fn check_canceled(db: &impl salsa::Database) -> Cancelable<()> {
// Disabled due to https://github.com/salsa-rs/salsa/issues/66 if db.salsa_runtime().is_current_revision_canceled() {
Ok(()) Err(Canceled)
// if db.salsa_runtime().is_current_revision_canceled() { } else {
// Err(Canceled) Ok(())
// } else { }
// Ok(())
// }
} }
impl salsa::ParallelDatabase for RootDatabase { impl salsa::ParallelDatabase for RootDatabase {