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

ch8: wraperror2: remove map_err() call #100

Open
wants to merge 1 commit into
base: 1st-edition
Choose a base branch
from

Conversation

ewenmcneill
Copy link

@ewenmcneill ewenmcneill commented Jan 10, 2023

To match the book text (Listing 8.15, which is supposed to match ch8/misc/wraperror2.rs), actually remove the map_err() calls that are not supposed to be needed once the std::convert::From trait is implemented for the wrapped types.

Without this change, the difference between wraperror.rs and wraperror2.rs is not particularly obvious, as the std::convert::From traits are unnecessary. (The code does compile without this change, because the in repository implementation is basically the same as ch8/misc/wraperror.rs.)

ETA: Force pushed a replacement to fix typo in commit comment that I noticed while editing the PR text.

To match the book text (Listing 8.15, which is supposed to match
ch8/misc/wraperror2.rs), actually remove the map_err() calls that
are not supposed to be needed once the std::convert::From trait
is implemented for the wrapped types.
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

Successfully merging this pull request may close these issues.

None yet

1 participant