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

Remove superfluous transparent types #24

Conversation

Property404
Copy link
Contributor

BigEndianU32 and BigEndianU64 do not actually store their inner types in big endian, but in native endian, and are therefore superfluous. Removing them simplifies the code a bit

@repnop
Copy link
Owner

repnop commented Dec 17, 2023

Hi, thanks for the PR but I'm going to reject this one, the types are not superfluous because they ensure that integers with different endianness aren't accidentally used interchangeably, and how they're stored internally is irrelevant to that (and mostly a concern of performance). If you're not familiar with the newtype pattern in Rust, that's probably worth a read.

@repnop repnop closed this Dec 17, 2023
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.

None yet

2 participants