@@ -13,27 +13,27 @@ pin_project! {
1313 /// [`flat_map`]: trait.Stream.html#method.flat_map
1414 /// [`Stream`]: trait.Stream.html
1515 #[ allow( missing_debug_implementations) ]
16- pub struct FlatMap <S : Stream , U : IntoStream , F > {
16+ pub struct FlatMap <S , U , T , F > {
1717 #[ pin]
18- inner: FlattenCompat <Map <S , F , S :: Item , U >, U >,
18+ inner: FlattenCompat <Map <S , F , T , U >, U >,
1919 }
2020}
2121
22- impl < S , U , F > FlatMap < S , U , F >
22+ impl < S , U , F > FlatMap < S , U , S :: Item , F >
2323where
2424 S : Stream ,
2525 U : IntoStream ,
2626 F : FnMut ( S :: Item ) -> U ,
2727{
2828
29- pub fn new ( stream : S , f : F ) -> FlatMap < S , U , F > {
29+ pub fn new ( stream : S , f : F ) -> FlatMap < S , U , S :: Item , F > {
3030 FlatMap {
3131 inner : FlattenCompat :: new ( stream. map ( f) ) ,
3232 }
3333 }
3434}
3535
36- impl < S , U , F > Stream for FlatMap < S , U , F >
36+ impl < S , U , F > Stream for FlatMap < S , U , S :: Item , F >
3737where
3838 S : Stream < Item : IntoStream < IntoStream = U , Item = U :: Item > > + std:: marker:: Unpin ,
3939 U : Stream + std:: marker:: Unpin ,
@@ -53,22 +53,19 @@ pin_project!{
5353 /// [`flatten`]: trait.Stream.html#method.flatten
5454 /// [`Stream`]: trait.Stream.html
5555 #[ allow( missing_debug_implementations) ]
56- pub struct Flatten <S : Stream >
57- where
58- S :: Item : IntoStream ,
59- {
56+ pub struct Flatten <S , U > {
6057 #[ pin]
61- inner: FlattenCompat <S , < S :: Item as IntoStream > :: IntoStream > ,
58+ inner: FlattenCompat <S , U >
6259 }
6360}
6461
65- impl < S : Stream < Item : IntoStream > > Flatten < S > {
66- pub fn new ( stream : S ) -> Flatten < S > {
62+ impl < S : Stream < Item : IntoStream > > Flatten < S , S :: Item > {
63+ pub fn new ( stream : S ) -> Flatten < S , S :: Item > {
6764 Flatten { inner : FlattenCompat :: new ( stream) }
6865 }
6966}
7067
71- impl < S , U > Stream for Flatten < S >
68+ impl < S , U > Stream for Flatten < S , < S :: Item as IntoStream > :: IntoStream >
7269where
7370 S : Stream < Item : IntoStream < IntoStream = U , Item = U :: Item > > + std:: marker:: Unpin ,
7471 U : Stream + std:: marker:: Unpin ,
0 commit comments