Skip to content

Commit

Permalink
fix(torii): i64 deser
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Nov 5, 2024
1 parent 447ba4f commit e63a54a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/torii/core/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,8 @@ pub fn map_row_to_ty(
primitive.set_i32(Some(value))?;
}
Primitive::I64(_) => {
let value = row.try_get::<String, &str>(&column_name)?;
let hex_str = value.trim_start_matches("0x");
primitive.set_i64(Some(
i64::from_str_radix(hex_str, 16).map_err(ParseError::ParseIntError)?,
))?;
let value = row.try_get::<i64, &str>(&column_name)?;
primitive.set_i64(Some(value))?;

Check warning on line 510 in crates/torii/core/src/model.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/core/src/model.rs#L509-L510

Added lines #L509 - L510 were not covered by tests
}
Primitive::I128(_) => {
let value = row.try_get::<String, &str>(&column_name)?;
Expand Down

0 comments on commit e63a54a

Please sign in to comment.