Skip to content

Commit 344e5e9

Browse files
committed
format
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent 89ff376 commit 344e5e9

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

vortex-array/src/arrays/assertions.rs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,36 +49,33 @@ macro_rules! assert_nth_scalar_is_null {
4949
#[macro_export]
5050
macro_rules! assert_arrays_eq {
5151
($left:expr, $right:expr) => {{
52-
let left = $left.clone();
53-
let right = $right.clone();
54-
if left.dtype() != right.dtype() {
52+
let left = $left.clone();
53+
let right = $right.clone();
54+
if left.dtype() != right.dtype() {
5555
panic!(
5656
"assertion left == right failed: arrays differ in type: {} != {}.\n left: {}\n right: {}",
5757
left.dtype(),
5858
right.dtype(),
5959
left.display_values(),
6060
right.display_values()
61-
)
62-
}
61+
)
62+
}
6363

64-
if left.len() != right.len() {
65-
panic!(
66-
"assertion left == right failed: arrays differ in length: {} != {}.\n left: {}\n right: {}",
67-
left.len(),
68-
right.len(),
69-
left.display_values(),
70-
right.display_values()
71-
)
72-
}
64+
if left.len() != right.len() {
65+
panic!(
66+
"assertion left == right failed: arrays differ in length: {} != {}.\n left: {}\n right: {}",
67+
left.len(),
68+
right.len(),
69+
left.display_values(),
70+
right.display_values()
71+
)
72+
}
7373

74-
let n = left.len();
75-
let mismatched_indices = (0..n)
76-
.filter(|i| left.scalar_at(*i).unwrap() != right.scalar_at(*i).unwrap())
74+
let n = left.len();
75+
let mismatched_indices = (0..n)
76+
.filter(|i| left.scalar_at(*i).unwrap() != right.scalar_at(*i).unwrap())
7777
.collect::<Vec<_>>();
78-
if mismatched_indices.len() != 0 {
79-
eprintln!("mismatched values: {:?}", mismatched_indices.iter()
80-
.map(|i| (left.scalar_at(*i).unwrap(), right.scalar_at(*i).unwrap()))
81-
.collect::<Vec<_>>());
78+
if mismatched_indices.len() != 0 {
8279
panic!(
8380
"assertion left == right failed: arrays do not match at indices: {}.\n left: {}\n right: {}",
8481
$crate::arrays::format_indices(mismatched_indices),

0 commit comments

Comments
 (0)