3 ms·
That is exactly what unwrap() is... (More specifically, it's a method which uses `match` internally to do this)
by steveklabnik 11y ago
That is exactly what unwrap() is...
(More specifically, it's a method which uses `match` internally to do this)
- lmm 11y agoOk, so I'm advocating forcing users to always use match directly if they want to do that. That helps ensure unsafe code looks unsafe.
- tatterdemalion 11y agoMaybe your issue is that the `get` method in Java sounds pretty innocuous, but in Rust the `unwrap` method is notorious. Every Rust user knows that it can panic. Requiring a match would increase verbosity and decrease clarity.