We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d949e9 commit c4220e8Copy full SHA for c4220e8
vortex-scalar/src/primitive.rs
@@ -546,7 +546,7 @@ impl<'a> PrimitiveScalar<'a> {
546
#[cfg(test)]
547
#[allow(clippy::cast_possible_truncation)]
548
mod tests {
549
- use num_traits::CheckedSub;
+ use num_traits::{CheckedSub, FromPrimitive};
550
use rstest::rstest;
551
use vortex_dtype::{DType, Nullability, PType};
552
@@ -996,8 +996,8 @@ mod tests {
996
assert!(f64::from_f16(f16_val).is_some());
997
998
// Test f16 to integer conversion (should fail)
999
- assert!(i32::from_f16(f16_val).is_none());
1000
- assert!(u32::from_f16(f16_val).is_none());
+ assert!(i32::try_from(PValue::from(f16_val)).is_err());
+ assert!(u32::try_from(PValue::from(f16_val)).is_err());
1001
}
1002
1003
#[test]
0 commit comments