Skip to content

Commit b5fe8f1

Browse files
committed
Add datums
Signed-off-by: Nicholas Gates <[email protected]>
1 parent 2ae7fb1 commit b5fe8f1

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

vortex-mask/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod tests;
1515

1616
use std::cmp::Ordering;
1717
use std::fmt::{Debug, Formatter};
18-
use std::ops::RangeBounds;
18+
use std::ops::{Bound, RangeBounds};
1919
use std::sync::{Arc, OnceLock};
2020

2121
use itertools::Itertools;
@@ -394,14 +394,14 @@ impl Mask {
394394
/// Slice the mask.
395395
pub fn slice(&self, range: impl RangeBounds<usize>) -> Self {
396396
let start = match range.start_bound() {
397-
std::ops::Bound::Included(&s) => s,
398-
std::ops::Bound::Excluded(&s) => s + 1,
399-
std::ops::Bound::Unbounded => 0,
397+
Bound::Included(&s) => s,
398+
Bound::Excluded(&s) => s + 1,
399+
Bound::Unbounded => 0,
400400
};
401401
let end = match range.end_bound() {
402-
std::ops::Bound::Included(&e) => e + 1,
403-
std::ops::Bound::Excluded(&e) => e,
404-
std::ops::Bound::Unbounded => self.len(),
402+
Bound::Included(&e) => e + 1,
403+
Bound::Excluded(&e) => e,
404+
Bound::Unbounded => self.len(),
405405
};
406406

407407
assert!(start <= end);

vortex-vector/src/bool/vector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl VectorOps for BoolVector {
8585
}
8686

8787
fn scalar_at(&self, index: usize) -> Scalar {
88-
debug_assert!(index < self.len());
88+
assert!(index < self.len());
8989

9090
let is_valid = self.validity.value(index);
9191
let value = is_valid.then(|| self.bits.value(index));

vortex-vector/src/decimal/generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl<D: NativeDecimalType> VectorOps for DVector<D> {
159159
}
160160

161161
fn scalar_at(&self, index: usize) -> Scalar {
162-
debug_assert!(index < self.len());
162+
assert!(index < self.len());
163163

164164
let is_valid = self.validity.value(index);
165165
let value = is_valid.then(|| self.elements[index]);

0 commit comments

Comments
 (0)