diff --git a/vortex-scalar/src/primitive.rs b/vortex-scalar/src/primitive.rs index 58d76f5419..9eef4da6b4 100644 --- a/vortex-scalar/src/primitive.rs +++ b/vortex-scalar/src/primitive.rs @@ -141,11 +141,11 @@ impl TryFrom<&Scalar> for usize { type Error = VortexError; fn try_from(value: &Scalar) -> Result { - Ok(u64::try_from( + u64::try_from( value .cast(&DType::Primitive(PType::U64, Nullability::NonNullable))? .as_ref(), ) - .map(|v| v as usize)?) + .map(|v| v as usize) } } diff --git a/vortex-scalar/src/utf8.rs b/vortex-scalar/src/utf8.rs index 0bc4eb4341..01a2093364 100644 --- a/vortex-scalar/src/utf8.rs +++ b/vortex-scalar/src/utf8.rs @@ -51,7 +51,7 @@ impl<'a> TryFrom<&'a Scalar> for Utf8Scalar<'a> { value: value .value .as_bytes()? - .map(|b| BufferString::try_from(b)) + .map(BufferString::try_from) .transpose()?, }) }