Skip to content

Commit 6d74885

Browse files
committed
simplify
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent 4a85b18 commit 6d74885

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

fuzz/src/array/compare.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ pub fn compare_canonical_array(
131131
}
132132
}
133133

134-
#[allow(clippy::unwrap_used)]
135-
fn compare_to<T: PartialOrd + PartialEq + Debug>(
134+
fn compare_to<T: PartialOrd>(
136135
values: impl Iterator<Item = Option<T>>,
137136
cmp_value: T,
138137
operator: Operator,
@@ -148,13 +147,17 @@ fn compare_to<T: PartialOrd + PartialEq + Debug>(
148147
};
149148

150149
if !nullability.is_nullable() {
151-
BoolArray::from_iter(values.map(|val| val.unwrap()).map(eval_fn)).into_array()
150+
BoolArray::from_iter(
151+
values
152+
.map(|val| val.vortex_expect("non nullable"))
153+
.map(eval_fn),
154+
)
155+
.into_array()
152156
} else {
153157
BoolArray::from_iter(values.map(|val| val.map(eval_fn))).into_array()
154158
}
155159
}
156160

157-
#[allow(clippy::unwrap_used)]
158161
fn compare_native_ptype<T: NativePType>(
159162
values: impl Iterator<Item = Option<T>>,
160163
cmp_value: T,
@@ -171,7 +174,12 @@ fn compare_native_ptype<T: NativePType>(
171174
};
172175

173176
if !nullability.is_nullable() {
174-
BoolArray::from_iter(values.map(|val| val.unwrap()).map(eval_fn)).into_array()
177+
BoolArray::from_iter(
178+
values
179+
.map(|val| val.vortex_expect("non nullable"))
180+
.map(eval_fn),
181+
)
182+
.into_array()
175183
} else {
176184
BoolArray::from_iter(values.map(|val| val.map(eval_fn))).into_array()
177185
}

0 commit comments

Comments
 (0)