We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee97dbf commit fe2ebf6Copy full SHA for fe2ebf6
1 file changed
src/zip/mod.rs
@@ -916,6 +916,11 @@ zipt_impl! {
916
[A B C D E F][ a b c d e f],
917
}
918
919
+macro_rules! last_of {
920
+ ($q:ty) => { $q };
921
+ ($p:ty, $($q:ty),+) => { last_of!($($q),+) };
922
+}
923
+
924
macro_rules! map_impl {
925
($([$notlast:ident $($p:ident)*],)+) => {
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
1030
/// Include the producer `p` in the Zip.
0 commit comments