refactor: use map_or_else

This commit is contained in:
Jack Wills
2022-10-02 00:31:01 +00:00
parent a7b8df6b21
commit f5fc446295
5 changed files with 38 additions and 33 deletions
+7 -1
View File
@@ -168,7 +168,13 @@ fn ui<B: Backend>(
// Split into 3, containers+controls, logs, then graphs
let upper_main = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Max(height.try_into().unwrap_or_default()), Constraint::Percentage(50)].as_ref())
.constraints(
[
Constraint::Max(height.try_into().unwrap_or_default()),
Constraint::Percentage(50),
]
.as_ref(),
)
.split(whole_layout[1]);
let top_split = if has_containers {