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

Converting to usize/isize? #47

Open
tobiasvl opened this issue Aug 14, 2022 · 1 comment
Open

Converting to usize/isize? #47

tobiasvl opened this issue Aug 14, 2022 · 1 comment

Comments

@tobiasvl
Copy link

tobiasvl commented Aug 14, 2022

I'm not a Rust veteran, but is there a (fixable) reason why the ux types can't be converted directly to usize/isize?

let x = usize::from(u4::new(0)); // the trait bound `usize: std::convert::From<ux::u4>` is not satisfied
let x = usize::from(u8::from(u4::new(0))); // works, but is obviously not ergonomical
@tobiasvl
Copy link
Author

Ah... Seems that would be fixed by #22

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