code
code copied to clipboard
ch8: wraperror2: remove map_err() call
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.