TIL: use `expect("message")` instead of `unwrap()` to error with a custom message in @rustlang
brb never using unwrap again
For real. It's establishing poor habits for a unique Rust idiom. It's not a generic programming thing we expect people to know better on.
-
-
what are you talking about, everyone already knows this idiom from Swift, the world's most popular programming language.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.