diff --git a/core/types.rs b/core/types.rs index 5deb2d16d..9d0975b97 100644 --- a/core/types.rs +++ b/core/types.rs @@ -776,12 +776,15 @@ impl ImmutableRecord { } } - pub fn get<'a, T: FromValue<'a> + 'a>(&'a self, idx: usize) -> Result { + pub fn get<'a, T: TryFrom<&'a RefValue, Error = LimboError> + 'a>( + &'a self, + idx: usize, + ) -> Result { let value = self .values .get(idx) .ok_or(LimboError::InternalError("Index out of bounds".into()))?; - T::from_value(value) + T::try_from(value) } pub fn count(&self) -> usize {