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 chore(draw_blocks.rs): format code using rustfmt to improve code readability chore(draw_blocks.rs): remove unnecessary indentation in NAME_TEXT constant to improve code readability chore(draw_blocks.rs): remove unnecessary fmt skip directive Signed-off-by: Daniel Boll <danielboll.academico@gmail.com>
This commit is contained in:
@@ -444,7 +444,7 @@ pub fn heading_bar(
|
|||||||
|
|
||||||
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
|
||||||
@@ -457,7 +457,7 @@ pub fn heading_bar(
|
|||||||
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(
|
|||||||
// 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(
|
|||||||
// 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