@@ -13,27 +13,27 @@ pin_project! {
13
13
/// [`flat_map`]: trait.Stream.html#method.flat_map
14
14
/// [`Stream`]: trait.Stream.html
15
15
#[ allow( missing_debug_implementations) ]
16
- pub struct FlatMap <S : Stream , U : IntoStream , F > {
16
+ pub struct FlatMap <S , U , T , F > {
17
17
#[ pin]
18
- inner: FlattenCompat <Map <S , F , S :: Item , U >, U >,
18
+ inner: FlattenCompat <Map <S , F , T , U >, U >,
19
19
}
20
20
}
21
21
22
- impl < S , U , F > FlatMap < S , U , F >
22
+ impl < S , U , F > FlatMap < S , U , S :: Item , F >
23
23
where
24
24
S : Stream ,
25
25
U : IntoStream ,
26
26
F : FnMut ( S :: Item ) -> U ,
27
27
{
28
28
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 > {
30
30
FlatMap {
31
31
inner : FlattenCompat :: new ( stream. map ( f) ) ,
32
32
}
33
33
}
34
34
}
35
35
36
- impl < S , U , F > Stream for FlatMap < S , U , F >
36
+ impl < S , U , F > Stream for FlatMap < S , U , S :: Item , F >
37
37
where
38
38
S : Stream < Item : IntoStream < IntoStream = U , Item = U :: Item > > + std:: marker:: Unpin ,
39
39
U : Stream + std:: marker:: Unpin ,
@@ -53,22 +53,19 @@ pin_project!{
53
53
/// [`flatten`]: trait.Stream.html#method.flatten
54
54
/// [`Stream`]: trait.Stream.html
55
55
#[ allow( missing_debug_implementations) ]
56
- pub struct Flatten <S : Stream >
57
- where
58
- S :: Item : IntoStream ,
59
- {
56
+ pub struct Flatten <S , U > {
60
57
#[ pin]
61
- inner: FlattenCompat <S , < S :: Item as IntoStream > :: IntoStream > ,
58
+ inner: FlattenCompat <S , U >
62
59
}
63
60
}
64
61
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 > {
67
64
Flatten { inner : FlattenCompat :: new ( stream) }
68
65
}
69
66
}
70
67
71
- impl < S , U > Stream for Flatten < S >
68
+ impl < S , U > Stream for Flatten < S , < S :: Item as IntoStream > :: IntoStream >
72
69
where
73
70
S : Stream < Item : IntoStream < IntoStream = U , Item = U :: Item > > + std:: marker:: Unpin ,
74
71
U : Stream + std:: marker:: Unpin ,
0 commit comments