aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSagittarius-a <sagittarius-a@users.noreply.github.com>2021-08-03 22:16:40 +0200
committerSagittarius-a <sagittarius-a@users.noreply.github.com>2021-08-03 22:16:40 +0200
commit24ef96b96510d3efba78a965364bab992a8a92fb (patch)
tree89b5dd9a55700f5276a0a5418f99d1c0bc6de472
parentstore tab history in a stack-like data structure (diff)
downloadsl0ppij-24ef96b96510d3efba78a965364bab992a8a92fb.tar.gz
sl0ppij-24ef96b96510d3efba78a965364bab992a8a92fb.tar.xz
sl0ppij-24ef96b96510d3efba78a965364bab992a8a92fb.zip
fix cargo clippy lint
-rw-r--r--zellij-server/src/screen.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index ef5a4d5a..c6c0f3a8 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -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,