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

Read Byte as u8, SignedByte as i8 #236

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

weiji14
Copy link
Contributor

@weiji14 weiji14 commented Jul 22, 2024

Previously, Byte values were read incorrectly as u32 instead of u8, and SignedShort values were read incorrectly as i32 instead of i8.

This PR does the following:

  • Correctly cast Type::BYTE as u8 values, and support casting Byte to other unsigned types via into_u16, into_u32, into_u64, into_u16_vec, into_u32_vec, and into_u64_vec methods.
  • Correctly cast Type::SBYTE as i8 values

Similar to #235, resolves some inconsistencies raised in #204.

Also handle casting of Byte (u8) into other unsigned types.
Also handle casting of SignedByte (i8) into other signed types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant