diff options
Diffstat (limited to 'crates/base_db')
-rw-r--r-- | crates/base_db/src/input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
257 | self.arena.keys().copied() | 257 | self.arena.keys().copied() |
258 | } | 258 | } |
259 | 259 | ||
260 | /// Returns an iterator over all transitive dependencies of the given crate. | 260 | /// Returns an iterator over all transitive dependencies of the given crate, |
261 | /// including the crate itself. | ||
261 | pub fn transitive_deps(&self, of: CrateId) -> impl Iterator<Item = CrateId> + '_ { | 262 | pub fn transitive_deps(&self, of: CrateId) -> impl Iterator<Item = CrateId> + '_ { |
262 | let mut worklist = vec![of]; | 263 | let mut worklist = vec![of]; |
263 | let mut deps = FxHashSet::default(); | 264 | let mut deps = FxHashSet::default(); |
@@ -270,7 +271,6 @@ impl CrateGraph { | |||
270 | worklist.extend(self[krate].dependencies.iter().map(|dep| dep.crate_id)); | 271 | worklist.extend(self[krate].dependencies.iter().map(|dep| dep.crate_id)); |
271 | } | 272 | } |
272 | 273 | ||
273 | deps.remove(&of); | ||
274 | deps.into_iter() | 274 | deps.into_iter() |
275 | } | 275 | } |
276 | 276 | ||