mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-10 11:02:55 +00:00
replace unwrap, use vec in bench
This commit is contained in:
@@ -27,7 +27,8 @@ mod tests {
|
||||
}
|
||||
|
||||
fn value_iter() -> impl Iterator<Item = u64> {
|
||||
0..20_000
|
||||
let data = (0..20_000).collect::<Vec<_>>();
|
||||
data.into_iter()
|
||||
}
|
||||
fn bench_get<S: FastFieldCodecSerializer, R: FastFieldCodecReader>(
|
||||
b: &mut Bencher,
|
||||
|
||||
@@ -209,7 +209,7 @@ impl FastFieldCodecSerializer for LinearInterpolFastFieldSerializer {
|
||||
distance(calculated_value, actual_value)
|
||||
})
|
||||
.max()
|
||||
.unwrap();
|
||||
.unwrap_or(0);
|
||||
|
||||
// the theory would be that we don't have the actual max_distance, but we are close within 50%
|
||||
// threshold.
|
||||
|
||||
Reference in New Issue
Block a user