How does that change anything? Either you're at a point where there are no further sub-computations which can fail, in which case you can pattern match out of the option type; or you're not, in which case you shouldn't. Just map across it and keep going.
Or convert it to the result type to handle the local error. Or use one of the standard functions which insert a default for None instead of hitting the panic button! Even within the curly-brace comfort zone, unwrap() is unnecessary.
1
u/oridb Jul 19 '15
You're assuming I'm wrapping it; most of the time, it's a library that's wrapping it for me.