concept expect() in category rust
appears as: expect()

This is an excerpt from Manning's book Rust in Action.
The error handling is relatively ugly, with many calls to
unwrap()andexpect(). We’ll address that problem shortly during Section 8.5.
8.5.3. Cheat with
unwrap()andexpect()The final approach for dealing with multiple error types is to use
unwrap()andexpect(). This is a reasonable approach when writing amain()function, but isn’t recommended for library authors. Your users don’t want their programs to crash because of things outside of their control.