Originally published on my blog.
Wait, what? Who do you want to kill?
In Rust, to indicate errors or absence of a value we use types na...
For further actions, you may consider blocking this person and/or reporting abuse
I'm definitely guilty of excessive unwrap()-ing. It's just so easy to do and it feels like an
assert()
.And good job pointing out the combinators on
Result
andOption
. Just this weekend I realized I had re-inventedmap()
(poorly) and went back and re-factored some code.One thing I found really helpful is main and tests being able to -> Result<>. Makes it a lot easier to move "correct" code using
?
between tests/lib/bin.Did not know about tests being able to return Result<>, thanks for pointing that out.
I'll update the article