@@ -63,7 +63,7 @@ pub type BoxedStream<'a, T> = Stream<Box<dyn Iterator<Item = T> + 'a>>;
6363pub type BoxedExactSizeStream < ' a , T > = Stream < Box < dyn ExactSizeIterator < Item = T > + ' a > > ;
6464
6565impl < I : Iterator > Sealed for Stream < I > { }
66- impl < ' a , I : Iterator + ' a > Input < ' a > for Stream < I >
66+ impl < ' src , I : Iterator + ' src > Input < ' src > for Stream < I >
6767where
6868 I :: Item : Clone ,
6969{
@@ -100,7 +100,7 @@ where
100100 }
101101}
102102
103- impl < ' a , I : ExactSizeIterator + ' a > ExactSizeInput < ' a > for Stream < I >
103+ impl < ' src , I : ExactSizeIterator + ' src > ExactSizeInput < ' src > for Stream < I >
104104where
105105 I :: Item : Clone ,
106106{
@@ -110,7 +110,7 @@ where
110110 }
111111}
112112
113- impl < ' a , I : Iterator + ' a > ValueInput < ' a > for Stream < I >
113+ impl < ' src , I : Iterator + ' src > ValueInput < ' src > for Stream < I >
114114where
115115 I :: Item : Clone ,
116116{
@@ -191,6 +191,28 @@ where
191191 }
192192}
193193
194+ // impl<'src, I, S> ExactSizeInput<'src> for IterInput<I, S>
195+ // where
196+ // I: Iterator<Item = (T, S)> + Clone + 'src,
197+ // S: Span + 'src,
198+ // {
199+ // #[inline(always)]
200+ // unsafe fn span_from(this: &mut Self::Cache, range: RangeFrom<&Self::Cursor>) -> Self::Span {
201+ // (*range.start..this.tokens.len() + cursor.0.len()).into()
202+ // }
203+ // }
204+
205+ impl < ' src , I , T : ' src , S > ValueInput < ' src > for IterInput < I , S >
206+ where
207+ I : Iterator < Item = ( T , S ) > + Clone + ' src ,
208+ S : Span + ' src ,
209+ {
210+ #[ inline]
211+ unsafe fn next ( this : & mut Self :: Cache , cursor : & mut Self :: Cursor ) -> Option < Self :: Token > {
212+ Self :: next_maybe ( this, cursor)
213+ }
214+ }
215+
194216#[ test]
195217fn map_tuple ( ) {
196218 fn parser < ' src , I : Input < ' src , Token = char > > ( ) -> impl Parser < ' src , I , char > {
0 commit comments