From f424bf0f461739e7101d6c43bc23116e4f0fbdee Mon Sep 17 00:00:00 2001 From: Anton Harniakou Date: Sat, 7 Jun 2025 10:03:49 +0300 Subject: [PATCH] Replace FromValue with TryFrom in ImmutableRecord method --- core/types.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 {