Skip to content

Glossary: Rust Beyond the Basics

unwrap

Also written: unwrap_err

Takes the value out of an `Ok` or `Some` and panics otherwise. `unwrap_err` does the opposite for a `Result`, giving the error inside an `Err`.

Where the book teaches it

Related terms

checked_mul