unwrap
Take the value out of an Option or Result, panicking if there isn't one.
unwrap() returns the Some/Ok value or panics; expect(msg) does the same with a custom message.
Loading interactive…
Examples
"80a0".parse::<u16>().unwrap()panics, becauseparsereturns anErrof kindInvalidDigit.
See also