From 02c3d2f78eeea41c6de8430c2a34b38e1cdb861b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 20:56:06 +0300 Subject: hir is cancelation free --- crates/ra_hir/src/code_model_impl/module.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir/src/code_model_impl') diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs index 04301ae53..a5c032d69 100644 --- a/crates/ra_hir/src/code_model_impl/module.rs +++ b/crates/ra_hir/src/code_model_impl/module.rs @@ -1,4 +1,4 @@ -use ra_db::{Cancelable, SourceRootId, FileId}; +use ra_db::{SourceRootId, FileId}; use ra_syntax::{ast, SyntaxNode, AstNode, TreeArc}; use crate::{ @@ -176,12 +176,9 @@ impl Module { curr_per_ns } - pub fn problems_impl( - &self, - db: &impl HirDatabase, - ) -> Cancelable, Problem)>> { + pub fn problems_impl(&self, db: &impl HirDatabase) -> Vec<(TreeArc, Problem)> { let loc = self.def_id.loc(db); let module_tree = db.module_tree(loc.source_root_id); - Ok(loc.module_id.problems(&module_tree, db)) + loc.module_id.problems(&module_tree, db) } } -- cgit v1.2.3