Re:Using unwrap() in Rust is okay
by r3un1 on Monday August 08, 2022 @04:51PM
(#32390852)
There is! `expect()`
[ Parent
| on HN ]
I think this is a good answer. People should use `expect` for this "I'm sure this is fine" case, with descriptive text about why it's fine.
Re:Using unwrap() in Rust is okay
by tomjakubowski on Monday August 08, 2022 @09:12PM
(#32393090)
Or you can invert it and use `.expect("TODO add error handling")`