File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -916,6 +916,11 @@ zipt_impl! {
916
916
[ A B C D E F ] [ a b c d e f] ,
917
917
}
918
918
919
+ macro_rules! last_of {
920
+ ( $q: ty) => { $q } ;
921
+ ( $p: ty, $( $q: ty) ,+) => { last_of!( $( $q) ,+) } ;
922
+ }
923
+
919
924
macro_rules! map_impl {
920
925
( $( [ $notlast: ident $( $p: ident) * ] , ) +) => {
921
926
$(
@@ -1012,6 +1017,14 @@ macro_rules! map_impl {
1012
1017
} ) . is_done( )
1013
1018
}
1014
1019
1020
+ #[ cfg( feature = "rayon" ) ]
1021
+ #[ allow( dead_code) ] // unused for the first of the Zip arities
1022
+ /// Return a reference to the last producer
1023
+ pub ( crate ) fn last_producer( & self ) -> & last_of!( $( $p) ,* ) {
1024
+ let ( .., ref last) = & self . parts;
1025
+ last
1026
+ }
1027
+
1015
1028
expand_if!( @bool [ $notlast]
1016
1029
1017
1030
/// Include the producer `p` in the Zip.
You can’t perform that action at this time.
0 commit comments