modeled_types: Use FromStr instead of TryFrom<&str>
FromStr and TryFrom<&str> are functionally equivalent traits, but the former has existed since Rust 1.0.0 and has much wider support across the ecosystem; serde_plain is a key example of this.
Can I try to start this change?
@matheusmonte Sure, thanks! Let us know if you have any questions or troubles.
Additional testing underway.
Have we fully vetted that this is the right thing to do?
In favor of TryFrom?
- https://internals.rust-lang.org/t/pre-rfc-deprecate-fromstr-in-favor-of-tryfrom-str/12331
In favor of FromStr?
- https://stackoverflow.com/a/71487402
Ambiguous?
- https://stackoverflow.com/a/67386103
@mchaker is this still being worked on? Or can it be closed?
@stmcginnis It turned out that, when I attempted fixing this issue previously, much more involved testing was required for this issue than I thought.
I'm currently working on issue 1703, and can focus on this again after I complete that issue.
The way we have modeled types set up currently, I'm pretty sure all of these impls are defined and it's an implementation detail as to how we go about it. I'm going to close this because I don't think it's relevant anymore (the code may have been different in Aug 2020). Re-open if I'm wrong. Thanks.