@@ -377,9 +377,7 @@ impl<'s> CheckedHrpstring<'s> {
377
377
///
378
378
/// Converts the ASCII bytes representing field elements to the respective field elements.
379
379
#[ inline]
380
- pub fn fe32_iter < I : Iterator < Item = u8 > > (
381
- & self ,
382
- ) -> AsciiToFe32Iter < iter:: Copied < slice:: Iter < ' s , u8 > > > {
380
+ pub fn fe32_iter < I : Iterator < Item = u8 > > ( & self ) -> AsciiToFe32Iter {
383
381
AsciiToFe32Iter { iter : self . ascii . iter ( ) . copied ( ) }
384
382
}
385
383
@@ -639,7 +637,7 @@ fn check_characters(s: &str) -> Result<usize, CharError> {
639
637
640
638
/// An iterator over a parsed HRP string data as bytes.
641
639
pub struct ByteIter < ' s > {
642
- iter : FesToBytes < AsciiToFe32Iter < iter :: Copied < slice :: Iter < ' s , u8 > > > > ,
640
+ iter : FesToBytes < AsciiToFe32Iter < ' s > > ,
643
641
}
644
642
645
643
impl < ' s > Iterator for ByteIter < ' s > {
@@ -657,7 +655,7 @@ impl<'s> ExactSizeIterator for ByteIter<'s> {
657
655
658
656
/// An iterator over a parsed HRP string data as field elements.
659
657
pub struct Fe32Iter < ' s > {
660
- iter : AsciiToFe32Iter < iter :: Copied < slice :: Iter < ' s , u8 > > > ,
658
+ iter : AsciiToFe32Iter < ' s > ,
661
659
}
662
660
663
661
impl < ' s > Iterator for Fe32Iter < ' s > {
@@ -675,14 +673,11 @@ impl<'s> Iterator for Fe32Iter<'s> {
675
673
///
676
674
/// If any `u8` in the input iterator is out of range for an [`Fe32`]. Should only be used on data
677
675
/// that has already been checked for validity (eg, by using `check_characters`).
678
- pub struct AsciiToFe32Iter < I : Iterator < Item = u8 > > {
679
- iter : I ,
676
+ pub struct AsciiToFe32Iter < ' s > {
677
+ iter : iter :: Copied < slice :: Iter < ' s , u8 > > ,
680
678
}
681
679
682
- impl < I > Iterator for AsciiToFe32Iter < I >
683
- where
684
- I : Iterator < Item = u8 > ,
685
- {
680
+ impl < ' s > Iterator for AsciiToFe32Iter < ' s > {
686
681
type Item = Fe32 ;
687
682
#[ inline]
688
683
fn next ( & mut self ) -> Option < Fe32 > { self . iter . next ( ) . map ( Fe32 :: from_char_unchecked) }
@@ -693,10 +688,7 @@ where
693
688
}
694
689
}
695
690
696
- impl < I > ExactSizeIterator for AsciiToFe32Iter < I >
697
- where
698
- I : Iterator < Item = u8 > + ExactSizeIterator ,
699
- {
691
+ impl < ' s > ExactSizeIterator for AsciiToFe32Iter < ' s > {
700
692
#[ inline]
701
693
fn len ( & self ) -> usize { self . iter . len ( ) }
702
694
}
0 commit comments