Skip to content

Commit 3a80fab

Browse files
authored
Merge pull request #729 from rust-ndarray/simplify-zip-all
Simplify Zip::all implementation
2 parents 14ca050 + 8aa6906 commit 3a80fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/zip/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -934,14 +934,14 @@ macro_rules! map_impl {
934934
pub fn all<F>(mut self, mut predicate: F) -> bool
935935
where F: FnMut($($p::Item),*) -> bool
936936
{
937-
self.apply_core(true, move |_, args| {
937+
!self.apply_core((), move |_, args| {
938938
let ($($p,)*) = args;
939939
if predicate($($p),*) {
940-
FoldWhile::Continue(true)
940+
FoldWhile::Continue(())
941941
} else {
942-
FoldWhile::Done(false)
942+
FoldWhile::Done(())
943943
}
944-
}).into_inner()
944+
}).is_done()
945945
}
946946

947947
expand_if!(@bool [$notlast]

0 commit comments

Comments
 (0)