Skip to content

Commit

Permalink
quickcheck 1: do not unwrap Either
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Jun 13, 2023
1 parent dc359e0 commit ac5c357
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/quick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,12 +837,12 @@ quickcheck! {
let it_ord = merge_join_by(a.clone(), b.clone(), Ord::cmp).flat_map(|v| match v {
EitherOrBoth::Both(l, r) => {
has_equal = true;
vec![l, r]
vec![Either::Left(l), Either::Right(r)]
}
EitherOrBoth::Left(l) => vec![l],
EitherOrBoth::Right(r) => vec![r],
EitherOrBoth::Left(l) => vec![Either::Left(l)],
EitherOrBoth::Right(r) => vec![Either::Right(r)],
});
let it_bool = merge_join_by(a, b, PartialOrd::le).map(Either::into_inner);
let it_bool = merge_join_by(a, b, PartialOrd::le);
itertools::equal(it_ord, it_bool) || has_equal
}
fn merge_join_by_bool_unwrapped_is_merge_by(a: Vec<u8>, b: Vec<u8>) -> bool {
Expand Down

0 comments on commit ac5c357

Please sign in to comment.