Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Sharlin
16 days ago
|
parent
|
context
|
favorite
| on:
We found a division by zero bug in FFmpeg with a v...
The Rust standard library has `NonZero<T>`, which, if used, at least forces you to consider what you initialize it with. Doing
let foo = NonZero::new(unvalidated_input).unwrap();
is at the very least a big red sign that stands out in the code and should fail code review.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: