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

[uint] Implement From trait for conversions that can't fail #655

Open
charlesndalton opened this issue Jul 19, 2022 · 0 comments
Open

[uint] Implement From trait for conversions that can't fail #655

charlesndalton opened this issue Jul 19, 2022 · 0 comments

Comments

@charlesndalton
Copy link

It would be nice to have the From trait implemented for conversions that can't fail, such as U64 -> u64.

// Today
let a: u64 = U64::MAX.try_into().unwrap();
let b: u128 = U128::MAX.try_into().unwrap();

// Requested
let x: u64 = U64::MAX.into();
let y: u128 = U128::MAX.into();
let z: u128 = U64::MAX.into();
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

No branches or pull requests

1 participant