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