We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, there are functions
fn checked_add(self, other: u8) -> Option<u8> fn saturating_add(self, other: u8) -> u8 fn wrapping_add(self, rhs: u8) -> u8 fn overflowing_add(self, rhs: u8) -> (u8, bool)
for addition on u8. We should have this functionality also for casts, that is, functions like
u8
fn checked_cast(self: u32) -> Option<u8> fn saturating_cast(self: u32) -> u8 fn wrapping_cast(self: u32) -> u8 fn overflowing_cast(self: u32) -> (u8, bool)
with the obvious implementations. Specific traits for this functionality are up for debate.
The text was updated successfully, but these errors were encountered:
This is covered by rust-lang/rfcs#1218 It would be great if you described your use cases for these functions in the RFC comments.
Sorry, something went wrong.
Great! I'll go over there.
No branches or pull requests
Currently, there are functions
for addition on
u8
. We should have this functionality also for casts, that is, functions likewith the obvious implementations. Specific traits for this functionality are up for debate.
The text was updated successfully, but these errors were encountered: