There is the map_err method on Result which simplifies this case. But yes, anyhow is still easier if you don’t care that much about the error contents.
Completely forgot about this one. Think I still like the other approach (implementing From) for most places, but I’ll keep this one in mind too, thanks.
There is the
map_errmethod on Result which simplifies this case. But yes, anyhow is still easier if you don’t care that much about the error contents.Completely forgot about this one. Think I still like the other approach (implementing
From) for most places, but I’ll keep this one in mind too, thanks.