Align semantics of deps and rev deps
This commit is contained in:
parent
45a8f37b6a
commit
521a26b0d2
|
@ -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<Item = CrateId> + '_ {
|
||||
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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue