File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1324,6 +1324,16 @@ where
1324
1324
fn get ( & self ) -> Option < & Self :: Item > {
1325
1325
self . iter . get ( ) . and_then ( |iter| iter. get ( ) )
1326
1326
}
1327
+
1328
+ #[ inline]
1329
+ fn fold < Acc , Fold > ( self , init : Acc , mut fold : Fold ) -> Acc
1330
+ where
1331
+ Self : Sized ,
1332
+ Fold : FnMut ( Acc , & Self :: Item ) -> Acc ,
1333
+ {
1334
+ self . iter
1335
+ . fold_mut ( init, |acc, item| item. fold ( acc, & mut fold) )
1336
+ }
1327
1337
}
1328
1338
1329
1339
impl < I , J > StreamingIteratorMut for Flatten < I >
@@ -1335,6 +1345,16 @@ where
1335
1345
fn get_mut ( & mut self ) -> Option < & mut Self :: Item > {
1336
1346
self . iter . get_mut ( ) . and_then ( J :: get_mut)
1337
1347
}
1348
+
1349
+ #[ inline]
1350
+ fn fold_mut < Acc , Fold > ( self , init : Acc , mut fold : Fold ) -> Acc
1351
+ where
1352
+ Self : Sized ,
1353
+ Fold : FnMut ( Acc , & mut Self :: Item ) -> Acc ,
1354
+ {
1355
+ self . iter
1356
+ . fold_mut ( init, |acc, item| item. fold_mut ( acc, & mut fold) )
1357
+ }
1338
1358
}
1339
1359
1340
1360
/// A regular, non-streaming iterator which both filters and maps elements of a streaming iterator with a closure.
You can’t perform that action at this time.
0 commit comments