From f323880fb7129cd74b9d156e9688fac9654480b5 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Fri, 23 Jul 2021 17:25:05 +0200 Subject: [PATCH] !fixup cargo fmt --- zellij-server/src/lib.rs | 2 +- zellij-utils/src/input/layout.rs | 16 ++++++++-------- zellij-utils/src/input/unit/layout_test.rs | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/zellij-server/src/lib.rs b/zellij-server/src/lib.rs index 6ea9f228..d90301cc 100644 --- a/zellij-server/src/lib.rs +++ b/zellij-server/src/lib.rs @@ -10,12 +10,12 @@ mod thread_bus; mod ui; mod wasm_vm; +use log::info; use std::{ path::PathBuf, sync::{Arc, Mutex, RwLock}, thread, }; -use log::info; use zellij_utils::zellij_tile; use wasmer::Store; diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs index 713605e9..26d96764 100644 --- a/zellij-utils/src/input/layout.rs +++ b/zellij-utils/src/input/layout.rs @@ -258,14 +258,14 @@ impl Layout { post_tab = true; // Leaf } else if post_tab { - if curr_post_layout.is_empty() { - let mut part_no_tab = part.clone(); - part_no_tab.tabs.clear(); - part_no_tab.parts.clear(); - post_tab_layout.push(part_no_tab); - } else { - post_tab_layout.append(&mut curr_post_layout); - } + if curr_post_layout.is_empty() { + let mut part_no_tab = part.clone(); + part_no_tab.tabs.clear(); + part_no_tab.parts.clear(); + post_tab_layout.push(part_no_tab); + } else { + post_tab_layout.append(&mut curr_post_layout); + } } } (pre_tab_layout, post_tab_layout, tabs) diff --git a/zellij-utils/src/input/unit/layout_test.rs b/zellij-utils/src/input/unit/layout_test.rs index 95de356c..89217e04 100644 --- a/zellij-utils/src/input/unit/layout_test.rs +++ b/zellij-utils/src/input/unit/layout_test.rs @@ -532,7 +532,7 @@ fn no_tabs_specified_should_panic() { // TODO Make error out of this // Only untill #631 is fixed fn multiple_tabs_specified_should_panic() { -let path = layout_test_dir("multiple-tabs-should-panic.yaml".into()); -let layout = Layout::new(&path); -let _main_layout = layout.unwrap().construct_main_layout(); + let path = layout_test_dir("multiple-tabs-should-panic.yaml".into()); + let layout = Layout::new(&path); + let _main_layout = layout.unwrap().construct_main_layout(); }