16
16
F : TryFuture ,
17
17
{
18
18
Pending ( F ) ,
19
- Done ( Option < Result < F :: Ok , F :: Error > > ) ,
19
+ Done ( Option < F :: Ok > ) ,
20
20
}
21
21
22
22
impl < F > ElemState < F >
32
32
}
33
33
}
34
34
35
- fn take_done ( self : Pin < & mut Self > ) -> Option < Result < F :: Ok , F :: Error > > {
35
+ fn take_done ( self : Pin < & mut Self > ) -> Option < F :: Ok > {
36
36
// Safety: Going from pin to a variant we never pin-project
37
37
match unsafe { self . get_unchecked_mut ( ) } {
38
38
ElemState :: Pending ( _) => None ,
@@ -148,7 +148,7 @@ where
148
148
match pending. try_poll ( lw) {
149
149
Poll :: Pending => state = FinalState :: Pending ,
150
150
Poll :: Ready ( output) => match output {
151
- Ok ( item) => elem. set ( ElemState :: Done ( Some ( Ok ( item) ) ) ) ,
151
+ Ok ( item) => elem. set ( ElemState :: Done ( Some ( item) ) ) ,
152
152
Err ( e) => {
153
153
state = FinalState :: Error ( e) ;
154
154
break ;
@@ -162,10 +162,10 @@ where
162
162
FinalState :: Pending => Poll :: Pending ,
163
163
FinalState :: AllDone => {
164
164
let mut elems = mem:: replace ( & mut self . elems , Box :: pin ( [ ] ) ) ;
165
- let result = iter_pin_mut ( elems. as_mut ( ) )
165
+ let results = iter_pin_mut ( elems. as_mut ( ) )
166
166
. map ( |e| e. take_done ( ) . unwrap ( ) )
167
167
. collect ( ) ;
168
- Poll :: Ready ( result )
168
+ Poll :: Ready ( Ok ( results ) )
169
169
} ,
170
170
FinalState :: Error ( e) => {
171
171
let _ = mem:: replace ( & mut self . elems , Box :: pin ( [ ] ) ) ;
0 commit comments