Y
Hacker News
new
|
ask
|
show
|
jobs
by
m00dy
396 days ago
I only use unwrap in tests
1 comments
Hamuko
396 days ago
I use expect() so that I can grep for instances of "unwrap()" after the prototyping phase without getting tests.
link
theodorton
396 days ago
You can add
[lints.clippy] unwrap_used = "deny"
to Cargo.toml if you want to avoid unwrap and then explicitly opt-in with #[allow(clippy::unwrap_used)]
link