diff options
Diffstat (limited to 'vendor/itertools/tests/zip.rs')
-rw-r--r-- | vendor/itertools/tests/zip.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/vendor/itertools/tests/zip.rs b/vendor/itertools/tests/zip.rs index 75157d34f..f2554d7a4 100644 --- a/vendor/itertools/tests/zip.rs +++ b/vendor/itertools/tests/zip.rs @@ -1,17 +1,18 @@ -use itertools::Itertools; -use itertools::EitherOrBoth::{Both, Left, Right}; use itertools::free::zip_eq; use itertools::multizip; +use itertools::EitherOrBoth::{Both, Left, Right}; +use itertools::Itertools; #[test] fn zip_longest_fused() { let a = [Some(1), None, Some(3), Some(4)]; let b = [1, 2, 3]; - let unfused = a.iter().batching(|it| *it.next().unwrap()) + let unfused = a + .iter() + .batching(|it| *it.next().unwrap()) .zip_longest(b.iter().cloned()); - itertools::assert_equal(unfused, - vec![Both(1, 1), Right(2), Right(3)]); + itertools::assert_equal(unfused, vec![Both(1, 1), Right(2), Right(3)]); } #[test] @@ -55,11 +56,9 @@ fn test_double_ended_zip() { assert_eq!(it.next_back(), None); } - #[should_panic] #[test] -fn zip_eq_panic1() -{ +fn zip_eq_panic1() { let a = [1, 2]; let b = [1, 2, 3]; @@ -68,8 +67,7 @@ fn zip_eq_panic1() #[should_panic] #[test] -fn zip_eq_panic2() -{ +fn zip_eq_panic2() { let a: [i32; 0] = []; let b = [1, 2, 3]; |