One of the commits in one of the first MRs in this article shows an example of a legitimate use of `unwrap()`...
pub fn new(mut streams: Vec<TokenStream>) -> TokenStream {
match streams.len() {
0 => TokenStream::empty(),
1 => streams.pop().unwrap(),
_ => TokenStream::Stream(Lrc::new(streams)),
}
}
Since `streams.pop()` will never return `None` when `streams.len()` is `1`.But I agree, most of the time using `match` (or its simplified form `if let`) or one of these combinators instead of `unwrap()` is better.