From 5db5f5cc1dc5dfbded866b59570afc50538b9091 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 12 Jan 2019 21:51:56 +0100 Subject: Small improvements from review comments --- crates/ra_hir/src/ty/method_resolution.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'crates/ra_hir/src/ty') diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index ad80aa8b6..1330d03a8 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs @@ -81,23 +81,23 @@ impl CrateImplBlocks { Ok(()) } -} -pub(crate) fn impls_in_crate( - db: &impl HirDatabase, - krate: Crate, -) -> Cancelable> { - let crate_graph = db.crate_graph(); - let file_id = crate_graph.crate_root(krate.crate_id); - let source_root_id = db.file_source_root(file_id); - let mut crate_impl_blocks = CrateImplBlocks { - source_root_id, - impls: FxHashMap::default(), - }; - if let Some(module) = krate.root_module(db)? { - crate_impl_blocks.collect_recursive(db, module)?; + pub(crate) fn impls_in_crate_query( + db: &impl HirDatabase, + krate: Crate, + ) -> Cancelable> { + let crate_graph = db.crate_graph(); + let file_id = crate_graph.crate_root(krate.crate_id); + let source_root_id = db.file_source_root(file_id); + let mut crate_impl_blocks = CrateImplBlocks { + source_root_id, + impls: FxHashMap::default(), + }; + if let Some(module) = krate.root_module(db)? { + crate_impl_blocks.collect_recursive(db, module)?; + } + Ok(Arc::new(crate_impl_blocks)) } - Ok(Arc::new(crate_impl_blocks)) } fn def_crate(db: &impl HirDatabase, ty: &Ty) -> Cancelable> { -- cgit v1.2.3