mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-26 07:04:51 +02:00
refactor: fix clippy errors
This commit is contained in:
parent
15dba2e6cf
commit
78e3c37947
@ -323,13 +323,15 @@ impl BottomLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut up_range = layout_mapping.range(
|
for next_row_up in layout_mapping
|
||||||
..(
|
.range(
|
||||||
row_height_percentage_start,
|
..(
|
||||||
row_height_percentage_start,
|
row_height_percentage_start,
|
||||||
),
|
row_height_percentage_start,
|
||||||
);
|
),
|
||||||
while let Some(next_row_up) = up_range.next_back() {
|
)
|
||||||
|
.rev()
|
||||||
|
{
|
||||||
let mut current_best_distance = 0;
|
let mut current_best_distance = 0;
|
||||||
let mut current_best_widget_id = widget.widget_id;
|
let mut current_best_widget_id = widget.widget_id;
|
||||||
let (target_start_width, target_end_width) =
|
let (target_start_width, target_end_width) =
|
||||||
@ -439,13 +441,12 @@ impl BottomLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut down_range = layout_mapping.range(
|
for next_row_down in layout_mapping.range(
|
||||||
(
|
(
|
||||||
row_height_percentage_start + 1,
|
row_height_percentage_start + 1,
|
||||||
row_height_percentage_start + 1,
|
row_height_percentage_start + 1,
|
||||||
)..,
|
)..,
|
||||||
);
|
) {
|
||||||
while let Some(next_row_down) = down_range.next() {
|
|
||||||
let mut current_best_distance = 0;
|
let mut current_best_distance = 0;
|
||||||
let mut current_best_widget_id = widget.widget_id;
|
let mut current_best_widget_id = widget.widget_id;
|
||||||
let (target_start_width, target_end_width) =
|
let (target_start_width, target_end_width) =
|
||||||
|
@ -28,14 +28,12 @@ impl BasicTableArrows for Painter {
|
|||||||
app_state
|
app_state
|
||||||
.current_widget
|
.current_widget
|
||||||
.left_neighbour
|
.left_neighbour
|
||||||
.and_then(|left_widget_id| {
|
.map(|left_widget_id| {
|
||||||
Some(
|
app_state
|
||||||
app_state
|
.widget_map
|
||||||
.widget_map
|
.get(&left_widget_id)
|
||||||
.get(&left_widget_id)
|
.map(|left_widget| &left_widget.widget_type)
|
||||||
.and_then(|left_widget| Some(&left_widget.widget_type))
|
.unwrap_or_else(|| &BottomWidgetType::Temp)
|
||||||
.unwrap_or_else(|| &BottomWidgetType::Temp),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| &BottomWidgetType::Temp)
|
.unwrap_or_else(|| &BottomWidgetType::Temp)
|
||||||
},
|
},
|
||||||
@ -43,14 +41,12 @@ impl BasicTableArrows for Painter {
|
|||||||
app_state
|
app_state
|
||||||
.current_widget
|
.current_widget
|
||||||
.right_neighbour
|
.right_neighbour
|
||||||
.and_then(|right_widget_id| {
|
.map(|right_widget_id| {
|
||||||
Some(
|
app_state
|
||||||
app_state
|
.widget_map
|
||||||
.widget_map
|
.get(&right_widget_id)
|
||||||
.get(&right_widget_id)
|
.map(|right_widget| &right_widget.widget_type)
|
||||||
.and_then(|right_widget| Some(&right_widget.widget_type))
|
.unwrap_or_else(|| &BottomWidgetType::Disk)
|
||||||
.unwrap_or_else(|| &BottomWidgetType::Disk),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|| &BottomWidgetType::Disk)
|
.unwrap_or_else(|| &BottomWidgetType::Disk)
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user