4 ms·
And it's fine for a compiler to panic when it violates an assumption. Not so with the Cloudflare code under discussion.
by wrs 11mo ago
And it's fine for a compiler to panic when it violates an assumption. Not so with the Cloudflare code under discussion.
- echelon 11mo agoIdiomatic 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&type=code https://github.com/search?q=unwrap%28%29+language%3ARust&typ...