We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0abdef9 commit 2316ca6Copy full SHA for 2316ca6
chalk-ir/src/lib.rs
@@ -840,15 +840,12 @@ impl<I: Interner> AliasTy<I> {
840
Ty::new(interner, self)
841
}
842
843
- pub fn type_parameters<'a>(&'a self, interner: &'a I) -> impl Iterator<Item = Ty<I>> + 'a {
+ pub fn self_type_parameter(&self, interner: &I) -> Ty<I> {
844
self.substitution
845
.iter(interner)
846
- .filter_map(move |p| p.ty(interner))
847
- .cloned()
848
- }
849
-
850
- pub fn self_type_parameter(&self, interner: &I) -> Ty<I> {
851
- self.type_parameters(interner).next().unwrap()
+ .find_map(move |p| p.ty(interner))
+ .unwrap()
+ .clone()
852
853
854
0 commit comments