From 521a26b0d207fc6d9293e06ca2c9a669bb66ddc4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Mar 2021 12:58:48 +0300 Subject: Align semantics of deps and rev deps --- crates/base_db/src/input.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/base_db/src') diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs index 248ab1de2..04a338d99 100644 --- a/crates/base_db/src/input.rs +++ b/crates/base_db/src/input.rs @@ -257,7 +257,8 @@ impl CrateGraph { self.arena.keys().copied() } - /// Returns an iterator over all transitive dependencies of the given crate. + /// Returns an iterator over all transitive dependencies of the given crate, + /// including the crate itself. pub fn transitive_deps(&self, of: CrateId) -> impl Iterator + '_ { let mut worklist = vec![of]; let mut deps = FxHashSet::default(); @@ -270,7 +271,6 @@ impl CrateGraph { worklist.extend(self[krate].dependencies.iter().map(|dep| dep.crate_id)); } - deps.remove(&of); deps.into_iter() } -- cgit v1.2.3