diff options
| author | Vincent Esche <regexident@gmail.com> | 2024-11-06 09:37:53 +0100 |
|---|---|---|
| committer | Vincent Esche <regexident@gmail.com> | 2024-11-06 10:02:13 +0100 |
| commit | fa393dd9d8e0427e75b58ba3561cc1d58004bba1 (patch) | |
| tree | 9da8da127c748aeb2d5028b444e7c973ed8df819 /src/tools/rust-analyzer | |
| parent | 80df05b8b88a8c2f4371169d3d55528fe1063c91 (diff) | |
| download | rust-fa393dd9d8e0427e75b58ba3561cc1d58004bba1.tar.gz rust-fa393dd9d8e0427e75b58ba3561cc1d58004bba1.zip | |
Refactor `hir::Trait`'s existing `items_with_supertraits(…)` method based on new `all_supertraits(…)` method
Diffstat (limited to 'src/tools/rust-analyzer')
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir/src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/crates/hir/src/lib.rs b/src/tools/rust-analyzer/crates/hir/src/lib.rs index 00a46daa54e..bfe9f3bd74e 100644 --- a/src/tools/rust-analyzer/crates/hir/src/lib.rs +++ b/src/tools/rust-analyzer/crates/hir/src/lib.rs @@ -2714,8 +2714,7 @@ impl Trait { } pub fn items_with_supertraits(self, db: &dyn HirDatabase) -> Vec<AssocItem> { - let traits = all_super_traits(db.upcast(), self.into()); - traits.iter().flat_map(|tr| Trait::from(*tr).items(db)).collect() + self.all_supertraits(db).into_iter().flat_map(|tr| tr.items(db)).collect() } pub fn is_auto(self, db: &dyn HirDatabase) -> bool { |
