Skip to content

Commit aa7ec20

Browse files
authored
Remove old redundent display function in the fuzzer (#4377)
Signed-off-by: Adam Gutglick <[email protected]>
1 parent d589370 commit aa7ec20

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

fuzz/src/error.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ use vortex_array::search_sorted::{SearchResult, SearchSortedSide};
1111
use vortex_error::VortexError;
1212
use vortex_scalar::Scalar;
1313

14-
fn tree_display(arr: &ArrayRef) -> impl Display {
15-
arr.display_tree()
16-
}
17-
1814
#[non_exhaustive]
1915
pub enum VortexFuzzError {
2016
SearchSortedError(
@@ -55,23 +51,23 @@ impl Display for VortexFuzzError {
5551
write!(
5652
f,
5753
"Expected to find {a} at {expected} in {} from {from} but instead found it at {actual} in step {step}\nBacktrace:\n{backtrace}",
58-
tree_display(array),
54+
array.display_tree(),
5955
)
6056
}
6157
VortexFuzzError::ArrayNotEqual(expected, actual, idx, lhs, rhs, step, backtrace) => {
6258
write!(
6359
f,
6460
"{expected} != {actual} at index {idx}, lhs is {} rhs is {} in step {step}\nBacktrace:\n{backtrace}",
65-
tree_display(lhs),
66-
tree_display(rhs),
61+
lhs.display_tree(),
62+
rhs.display_tree(),
6763
)
6864
}
6965
VortexFuzzError::LengthMismatch(lhs_len, rhs_len, lhs, rhs, step, backtrace) => {
7066
write!(
7167
f,
7268
"LHS len {lhs_len} != RHS len {rhs_len}, lhs is {} rhs is {} in step {step}\nBacktrace:\n{backtrace}",
73-
tree_display(lhs),
74-
tree_display(rhs),
69+
lhs.display_tree(),
70+
rhs.display_tree(),
7571
)
7672
}
7773
VortexFuzzError::VortexError(err, backtrace) => {

0 commit comments

Comments
 (0)