Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And it's fine for a compiler to panic when it violates an assumption. Not so with the Cloudflare code under discussion.


Idiomatic Rust would have been to return a Result<> to the caller, not to surprise them with a panic.

The developer was lazy.

A lot of Rust developers are: https://github.com/search?q=unwrap%28%29+language%3ARust&typ...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: