Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(torii): i64 deser #2636

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
Loading