File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/tools/rust-installer/src Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -214,22 +214,16 @@ impl Write for CombinedEncoder {
214214 }
215215
216216 fn write_all ( & mut self , buf : & [ u8 ] ) -> std:: io:: Result < ( ) > {
217- self . encoders
218- . par_iter_mut ( )
219- . map ( |w| w. write_all ( buf) )
220- . collect :: < std:: io:: Result < Vec < ( ) > > > ( ) ?;
221- Ok ( ( ) )
217+ self . encoders . par_iter_mut ( ) . try_for_each ( |w| w. write_all ( buf) )
222218 }
223219
224220 fn flush ( & mut self ) -> std:: io:: Result < ( ) > {
225- self . encoders . par_iter_mut ( ) . map ( |w| w. flush ( ) ) . collect :: < std:: io:: Result < Vec < ( ) > > > ( ) ?;
226- Ok ( ( ) )
221+ self . encoders . par_iter_mut ( ) . try_for_each ( Write :: flush)
227222 }
228223}
229224
230225impl Encoder for CombinedEncoder {
231226 fn finish ( self : Box < Self > ) -> Result < ( ) , Error > {
232- self . encoders . into_par_iter ( ) . map ( |e| e. finish ( ) ) . collect :: < Result < Vec < ( ) > , Error > > ( ) ?;
233- Ok ( ( ) )
227+ self . encoders . into_par_iter ( ) . try_for_each ( Encoder :: finish)
234228 }
235229}
You can’t perform that action at this time.
0 commit comments