From 0320ebdd101b01abe5f24e9efcef7c15005fd3a5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 9 Mar 2020 11:11:59 +0100 Subject: Use `Index` for CrateGraph --- crates/ra_hir_ty/src/traits.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/src/traits.rs b/crates/ra_hir_ty/src/traits.rs index 6c653c4f5..6e1c8e42a 100644 --- a/crates/ra_hir_ty/src/traits.rs +++ b/crates/ra_hir_ty/src/traits.rs @@ -47,7 +47,7 @@ pub(crate) fn impls_for_trait_query( // will only ever get called for a few crates near the root of the tree (the // ones the user is editing), so this may actually be a waste of memory. I'm // doing it like this mainly for simplicity for now. - for dep in &db.crate_graph().crate_data(&krate).dependencies { + for dep in &db.crate_graph()[krate].dependencies { impls.extend(db.impls_for_trait(dep.crate_id, trait_).iter()); } let crate_impl_defs = db.impls_in_crate(krate); -- cgit v1.2.3