rust/library/core
Yuki Okushi fe6b3a9792
Rollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se
Add `unwrap_unchecked()` methods for `Option` and `Result`

In particular:
  - `unwrap_unchecked()` for `Option`.
  - `unwrap_unchecked()` and `unwrap_err_unchecked()` for `Result`.

These complement other `*_unchecked()` methods in `core` etc.

Currently there are a couple of places it may be used inside rustc (`LinkedList`, `BTree`). It is also easy to find other repositories with similar functionality.

Fixes #48278.
2021-01-27 04:43:14 +09:00
..
benches Add more benchmarks 2021-01-08 09:50:35 +00:00
src Rollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se 2021-01-27 04:43:14 +09:00
tests Rollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se 2021-01-27 04:43:14 +09:00
Cargo.toml