mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
remove Cancelable from module_tree_query
This commit is contained in:
parent
443ff27724
commit
68ff52566d
6 changed files with 28 additions and 31 deletions
|
@ -92,7 +92,7 @@ pub fn module_from_child_node(
|
|||
|
||||
fn module_from_source(db: &impl HirDatabase, source: SourceItemId) -> Cancelable<Option<Module>> {
|
||||
let source_root_id = db.file_source_root(source.file_id.as_original_file());
|
||||
let module_tree = db.module_tree(source_root_id)?;
|
||||
let module_tree = db.module_tree(source_root_id);
|
||||
let module_id = ctry!(module_tree.find_module_by_source(source));
|
||||
Ok(Some(Module::from_module_id(db, source_root_id, module_id)?))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue