You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that it would be more idiomatic to implement From<ParseIntError>, so we could get away with a simpler s.parse()?
True. But errors6 is before the exercises about traits and conversions with From.
I think that we should add the implementation of From<ParseIntError> as an additional and preferred way to the solution. A comment should mention that traits like From are dealt with in later exercises.
errors6 suggests adding a function to map the error, that has then to be called with
map_err
.It seems to me that it would be more idiomatic to implement
From<ParseIntError>
, so we could get away with a simplers.parse()?
.Is there a specific reason this is not the suggested solution here?
The text was updated successfully, but these errors were encountered: