Skip to content

Commit 5a9767b

Browse files
committed
Refactor hir::Trait's existing items_with_supertraits(…) method based on new all_supertraits(…) method
1 parent 89a002e commit 5a9767b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/hir/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2714,8 +2714,7 @@ impl Trait {
27142714
}
27152715

27162716
pub fn items_with_supertraits(self, db: &dyn HirDatabase) -> Vec<AssocItem> {
2717-
let traits = all_super_traits(db.upcast(), self.into());
2718-
traits.iter().flat_map(|tr| Trait::from(*tr).items(db)).collect()
2717+
self.all_supertraits(db).into_iter().flat_map(|tr| tr.items(db)).collect()
27192718
}
27202719

27212720
pub fn is_auto(self, db: &dyn HirDatabase) -> bool {

0 commit comments

Comments
 (0)