fix cargo clippy lint

This commit is contained in:
Sagittarius-a 2021-08-03 22:16:40 +02:00
parent 4f482f3b63
commit 24ef96b965

View file

@ -342,9 +342,7 @@ impl Screen {
/// Consumes the last entry in tab history.
pub fn get_previous_tab(&mut self) -> Option<&Tab> {
let last = self.tab_history.pop();
if last.is_none() {
return None;
}
last?;
match last.unwrap() {
Some(tab) => self.tabs.get(&tab),
None => None,