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

TryFrom<ToType, FromType> should be satisfied for all From<ToType, FromType> #417

Open
danakj opened this issue Dec 3, 2023 · 0 comments
Milestone

Comments

@danakj
Copy link
Collaborator

danakj commented Dec 3, 2023

Rust provides blanket impl of TryFrom when From is satisfied: https://doc.rust-lang.org/stable/src/core/convert/mod.rs.html#762 which returns an error type of Infallible.

Similarly, sus::construct::TryFrom should be satisfied, and it should be possible to call try_from. We can provide an overload which does the same and returns Result<ToType, Infallible>.

@danakj danakj added this to the stable-numerics milestone Dec 3, 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

No branches or pull requests

1 participant