-
Notifications
You must be signed in to change notification settings - Fork 218
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
Value::try_into makes use of TryInto difficult #162
Comments
IMO, the I think this is a good idea! |
Fixed in config-rs-maint as of master def3702fac13605af303b8319af15943cc7ff8e5. |
Sadly I don't think it's possible to implement it using TryFrom for all T because it conflicts. I'm not quite sure what with, but I think it's because a type could implement |
Should we just go with |
that sounds good to me :) I'm confused, though, because it looks like @matthiasbeyer already did this? |
Looking through their old maint fork, they only had this |
Yeah I even tried to implement the |
I would say that's a consensus reached |
looks like this is already merged. can this be closed? |
Yes! Thanks for pinging me! |
I'd like to write some conversions for my own structs from instances of Value, and
std::convert::TryFrom
/TryInto
are good choices for this. However, the existence of atry_into
method on the struct, unrelated to these traits, shadows the trait method.Could the
try_into
method be renamed intotry_deserialize
or something of the sort?The text was updated successfully, but these errors were encountered: