mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Align naming of deps and revdeps
This commit is contained in:
parent
521a26b0d2
commit
ba48c0d8bd
2 changed files with 2 additions and 9 deletions
|
@ -276,10 +276,7 @@ impl CrateGraph {
|
||||||
|
|
||||||
/// Returns all transitive reverse dependencies of the given crate,
|
/// Returns all transitive reverse dependencies of the given crate,
|
||||||
/// including the crate itself.
|
/// including the crate itself.
|
||||||
pub fn transitive_reverse_dependencies(
|
pub fn transitive_rev_deps(&self, of: CrateId) -> impl Iterator<Item = CrateId> + '_ {
|
||||||
&self,
|
|
||||||
of: CrateId,
|
|
||||||
) -> impl Iterator<Item = CrateId> + '_ {
|
|
||||||
let mut worklist = vec![of];
|
let mut worklist = vec![of];
|
||||||
let mut rev_deps = FxHashSet::default();
|
let mut rev_deps = FxHashSet::default();
|
||||||
rev_deps.insert(of);
|
rev_deps.insert(of);
|
||||||
|
|
|
@ -154,11 +154,7 @@ impl Crate {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> {
|
pub fn transitive_reverse_dependencies(self, db: &dyn HirDatabase) -> Vec<Crate> {
|
||||||
db.crate_graph()
|
db.crate_graph().transitive_rev_deps(self.id).into_iter().map(|id| Crate { id }).collect()
|
||||||
.transitive_reverse_dependencies(self.id)
|
|
||||||
.into_iter()
|
|
||||||
.map(|id| Crate { id })
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn root_module(self, db: &dyn HirDatabase) -> Module {
|
pub fn root_module(self, db: &dyn HirDatabase) -> Module {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue