3 ms·
You can write unwrap in production, if you know that the error isn't supposed to happen. But Rust's error handling forces you to think about errors and how to h
by pcwalton 12y ago
You can write unwrap in production, if you know that the error isn't supposed to happen. But Rust's error handling forces you to think about errors and how to handle them, by design. Rust's way is also much more efficient at runtime, because using stack unwinding to recover from every error would be slow in the cases where errors are an expected and normal part of operation.