refactor(draw_blocks.rs): remove unnecessary .as_ref() calls on constraints method to improve code readability
refactor(mod.rs): remove unnecessary .as_ref() calls on constraints method to improve code readability
This commit is contained in:
@@ -25,13 +25,13 @@ use super::gui_state::{BoxLocation, DeleteButton, Region};
|
|||||||
use super::{GuiState, SelectablePanel};
|
use super::{GuiState, SelectablePanel};
|
||||||
|
|
||||||
const NAME_TEXT: &str = r#"
|
const NAME_TEXT: &str = r#"
|
||||||
88
|
88
|
||||||
88
|
88
|
||||||
88
|
88
|
||||||
,adPPYba, 8b, ,d8 88 ,d8 ,adPPYba, 8b,dPPYba,
|
,adPPYba, 8b, ,d8 88 ,d8 ,adPPYba, 8b,dPPYba,
|
||||||
a8" "8a `Y8, ,8P' 88 ,a8" a8P_____88 88P' "Y8
|
a8" "8a `Y8, ,8P' 88 ,a8" a8P_____88 88P' "Y8
|
||||||
8b d8 )888( 8888[ 8PP""""""" 88
|
8b d8 )888( 8888[ 8PP""""""" 88
|
||||||
"8a, ,a8" ,d8" "8b, 88`"Yba, "8b, ,aa 88
|
"8a, ,a8" ,d8" "8b, 88`"Yba, "8b, ,aa 88
|
||||||
`"YbbdP"' 8P' `Y8 88 `Y8a `"Ybbd8"' 88 "#;
|
`"YbbdP"' 8P' `Y8 88 `Y8a `"Ybbd8"' 88 "#;
|
||||||
|
|
||||||
const NAME: &str = env!("CARGO_PKG_NAME");
|
const NAME: &str = env!("CARGO_PKG_NAME");
|
||||||
@@ -445,7 +445,7 @@ pub fn heading_bar<B: Backend>(
|
|||||||
|
|
||||||
let split_bar = Layout::default()
|
let split_bar = Layout::default()
|
||||||
.direction(Direction::Horizontal)
|
.direction(Direction::Horizontal)
|
||||||
.constraints(splits.as_ref())
|
.constraints(splits)
|
||||||
.split(area);
|
.split(area);
|
||||||
if has_containers {
|
if has_containers {
|
||||||
// Draw loading icon, or not, and a prefix with a single space
|
// Draw loading icon, or not, and a prefix with a single space
|
||||||
@@ -458,7 +458,7 @@ pub fn heading_bar<B: Backend>(
|
|||||||
let container_splits = header_data.iter().map(|i| i.2).collect::<Vec<_>>();
|
let container_splits = header_data.iter().map(|i| i.2).collect::<Vec<_>>();
|
||||||
let headers_section = Layout::default()
|
let headers_section = Layout::default()
|
||||||
.direction(Direction::Horizontal)
|
.direction(Direction::Horizontal)
|
||||||
.constraints(container_splits.as_ref())
|
.constraints(container_splits)
|
||||||
.split(split_bar[1]);
|
.split(split_bar[1]);
|
||||||
|
|
||||||
// draw the actual header blocks
|
// draw the actual header blocks
|
||||||
|
|||||||
+2
-2
@@ -250,7 +250,7 @@ fn draw_frame<B: Backend>(
|
|||||||
// Containers + docker commands
|
// Containers + docker commands
|
||||||
let top_panel = Layout::default()
|
let top_panel = Layout::default()
|
||||||
.direction(Direction::Horizontal)
|
.direction(Direction::Horizontal)
|
||||||
.constraints(top_split.as_ref())
|
.constraints(top_split)
|
||||||
.split(upper_main[0]);
|
.split(upper_main[0]);
|
||||||
|
|
||||||
let lower_split = if has_containers {
|
let lower_split = if has_containers {
|
||||||
@@ -262,7 +262,7 @@ fn draw_frame<B: Backend>(
|
|||||||
// Split into 2, logs, and optional charts
|
// Split into 2, logs, and optional charts
|
||||||
let lower_main = Layout::default()
|
let lower_main = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
.constraints(lower_split.as_ref())
|
.constraints(lower_split)
|
||||||
.split(upper_main[1]);
|
.split(upper_main[1]);
|
||||||
|
|
||||||
draw_blocks::containers(app_data, top_panel[0], f, gui_state, &column_widths);
|
draw_blocks::containers(app_data, top_panel[0], f, gui_state, &column_widths);
|
||||||
|
|||||||
Reference in New Issue
Block a user