Comment by cheepin
10 years ago
Or you can call map_err to do an on-the-spot transformation if you don't have a general way to go from Error A to Error B.
I still sometimes make mistakes reading rust code with the ? at the end of the line, but it's just a question of what type is it and does the line return. Both of which are handled by the compiler in the end, so you get a little bit of extra knowledge that even if you misread the line of code, there's often limits to how much damage you can cause.
No comments yet
Contribute on Hacker News ↗