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 @@ -1319,6 +1319,16 @@ where
1319
1319
fn get ( & self ) -> Option < & Self :: Item > {
1320
1320
self . iter . get ( ) . and_then ( |iter| iter. get ( ) )
1321
1321
}
1322
+
1323
+ #[ inline]
1324
+ fn fold < Acc , Fold > ( self , init : Acc , mut fold : Fold ) -> Acc
1325
+ where
1326
+ Self : Sized ,
1327
+ Fold : FnMut ( Acc , & Self :: Item ) -> Acc ,
1328
+ {
1329
+ self . iter
1330
+ . fold_mut ( init, |acc, item| item. fold ( acc, & mut fold) )
1331
+ }
1322
1332
}
1323
1333
1324
1334
impl < I , J > StreamingIteratorMut for Flatten < I >
@@ -1330,6 +1340,16 @@ where
1330
1340
fn get_mut ( & mut self ) -> Option < & mut Self :: Item > {
1331
1341
self . iter . get_mut ( ) . and_then ( J :: get_mut)
1332
1342
}
1343
+
1344
+ #[ inline]
1345
+ fn fold_mut < Acc , Fold > ( self , init : Acc , mut fold : Fold ) -> Acc
1346
+ where
1347
+ Self : Sized ,
1348
+ Fold : FnMut ( Acc , & mut Self :: Item ) -> Acc ,
1349
+ {
1350
+ self . iter
1351
+ . fold_mut ( init, |acc, item| item. fold_mut ( acc, & mut fold) )
1352
+ }
1333
1353
}
1334
1354
1335
1355
/// 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