I'm attempting to use TryInto
in place of Into
in my API, and found that it is implemented for all types where U: Into<T>
by returning Result<T, core::convert::Infallible>
. Annoyingly, the blanket conversion can't be implemented yet, and the solution is to implement From<Infallible>
for individual types. It only seems right that this be added to the std
errors too.
This is something that could probably be done in a pull request directly.
1 Like
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.