Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
r3un1
· 4y ago · 0 comments
There is! `expect()`
Comments
[–]
sanderjd
4y ago
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.
[–]
tomjakubowski
4y ago
Or you can invert it and use `.expect("TODO add error handling")`