Skip to content

Commit

Permalink
fix(torii): i64 deser (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo authored Nov 5, 2024
1 parent 14211a9 commit f3276c3
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))?;
}
Primitive::I128(_) => {
let value = row.try_get::<String, &str>(&column_name)?;
Expand Down

0 comments on commit f3276c3

Please sign in to comment.