3 ms·
Agreed, except I don't think people should use expect() since its name is a mistake made early on in Rust: people use it to write expect("something bad we don'
by da39a3ee 5y ago
Agreed, except I don't think people should use expect() since its name is a mistake made early on in Rust: people use it to write
expect("something bad we don't expect")
unwrap_or_else(|| panic!(...))
is clear and doesn't suffer from the naming mistake.