Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Hamuko
8 months ago
|
parent
|
context
|
favorite
| on:
Using unwrap() in Rust is Okay (2022)
I use expect() so that I can grep for instances of "unwrap()" after the prototyping phase without getting tests.
theodorton
8 months 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)]
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: