From fedd320cf284ec5d489e62bf809277cedd9f60ac Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 15:45:48 +0300 Subject: check_canceled does not return Result --- crates/ra_hir/src/module_tree.rs | 4 ++-- crates/ra_hir/src/nameres.rs | 2 +- crates/ra_hir/src/ty.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/module_tree.rs b/crates/ra_hir/src/module_tree.rs index 67823e970..fd5a92c5b 100644 --- a/crates/ra_hir/src/module_tree.rs +++ b/crates/ra_hir/src/module_tree.rs @@ -42,7 +42,7 @@ impl Submodule { db: &impl HirDatabase, source: SourceItemId, ) -> Cancelable>> { - db.check_canceled()?; + db.check_canceled(); let file_id = source.file_id; let file_items = db.file_items(file_id); let module_source = ModuleSource::from_source_item_id(db, source); @@ -117,7 +117,7 @@ impl ModuleTree { db: &impl HirDatabase, source_root: SourceRootId, ) -> Cancelable> { - db.check_canceled()?; + db.check_canceled(); let res = create_module_tree(db, source_root); Ok(Arc::new(res?)) } diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 6bf949654..edb3b1e64 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -327,7 +327,7 @@ where loop { let processed_imports_count = self.processed_imports.len(); for &module_id in self.input.keys() { - self.db.check_canceled()?; + self.db.check_canceled(); self.resolve_imports(module_id)?; } if processed_imports_count == self.processed_imports.len() { diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 5579db8fb..03787bd89 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs @@ -1203,7 +1203,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { } pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable> { - db.check_canceled()?; + db.check_canceled(); let function = Function::new(def_id); // TODO: consts also need inference let body = function.body(db)?; let scopes = db.fn_scopes(def_id)?; -- cgit v1.2.3