@@ -377,9 +377,7 @@ impl<'s> CheckedHrpstring<'s> {
377377 ///
378378 /// Converts the ASCII bytes representing field elements to the respective field elements.
379379 #[ 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 {
383381 AsciiToFe32Iter { iter : self . ascii . iter ( ) . copied ( ) }
384382 }
385383
@@ -639,7 +637,7 @@ fn check_characters(s: &str) -> Result<usize, CharError> {
639637
640638/// An iterator over a parsed HRP string data as bytes.
641639pub struct ByteIter < ' s > {
642- iter : FesToBytes < AsciiToFe32Iter < iter :: Copied < slice :: Iter < ' s , u8 > > > > ,
640+ iter : FesToBytes < AsciiToFe32Iter < ' s > > ,
643641}
644642
645643impl < ' s > Iterator for ByteIter < ' s > {
@@ -657,7 +655,7 @@ impl<'s> ExactSizeIterator for ByteIter<'s> {
657655
658656/// An iterator over a parsed HRP string data as field elements.
659657pub struct Fe32Iter < ' s > {
660- iter : AsciiToFe32Iter < iter :: Copied < slice :: Iter < ' s , u8 > > > ,
658+ iter : AsciiToFe32Iter < ' s > ,
661659}
662660
663661impl < ' s > Iterator for Fe32Iter < ' s > {
@@ -675,14 +673,11 @@ impl<'s> Iterator for Fe32Iter<'s> {
675673///
676674/// If any `u8` in the input iterator is out of range for an [`Fe32`]. Should only be used on data
677675/// 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 > > ,
680678}
681679
682- impl < I > Iterator for AsciiToFe32Iter < I >
683- where
684- I : Iterator < Item = u8 > ,
685- {
680+ impl < ' s > Iterator for AsciiToFe32Iter < ' s > {
686681 type Item = Fe32 ;
687682 #[ inline]
688683 fn next ( & mut self ) -> Option < Fe32 > { self . iter . next ( ) . map ( Fe32 :: from_char_unchecked) }
@@ -693,10 +688,7 @@ where
693688 }
694689}
695690
696- impl < I > ExactSizeIterator for AsciiToFe32Iter < I >
697- where
698- I : Iterator < Item = u8 > + ExactSizeIterator ,
699- {
691+ impl < ' s > ExactSizeIterator for AsciiToFe32Iter < ' s > {
700692 #[ inline]
701693 fn len ( & self ) -> usize { self . iter . len ( ) }
702694}
0 commit comments