Skip to content

Glossary: Algorithms Beyond the Basics in Rust

unwrap / expect

Also written: unwrap, expect

Rust methods that take the value out of an `Option` or `Result` and stop the program if it is `None` or `Err`. `expect` adds a message of your own.

Where the book teaches it