aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-03-23 09:58:48 +0000
committerAleksey Kladov <[email protected]>2021-03-23 09:58:48 +0000
commit521a26b0d207fc6d9293e06ca2c9a669bb66ddc4 (patch)
treec79d915bc9ba01235af76c8c3170d03a84574ac4 /crates
parent45a8f37b6ae230db6c30c013f17d8aebac98a5e1 (diff)
Align semantics of deps and rev deps
Diffstat (limited to 'crates')
-rw-r--r--crates/base_db/src/input.rs4
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