Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
parent
9e8ec72bd5
commit
8f567383e4
281 changed files with 6628 additions and 7089 deletions
|
@ -619,15 +619,15 @@ impl PaneAxis {
|
|||
let mut found_axis_index: Option<usize> = None;
|
||||
if !found_pane {
|
||||
for (i, pa) in self.members.iter_mut().enumerate() {
|
||||
if let Member::Axis(pa) = pa {
|
||||
if let Some(done) = pa.resize(pane, axis, amount, bounds) {
|
||||
if done {
|
||||
return Some(true); // pane found and operations already done
|
||||
} else if self.axis != axis {
|
||||
return Some(false); // pane found but this is not the correct axis direction
|
||||
} else {
|
||||
found_axis_index = Some(i); // pane found and this is correct direction
|
||||
}
|
||||
if let Member::Axis(pa) = pa
|
||||
&& let Some(done) = pa.resize(pane, axis, amount, bounds)
|
||||
{
|
||||
if done {
|
||||
return Some(true); // pane found and operations already done
|
||||
} else if self.axis != axis {
|
||||
return Some(false); // pane found but this is not the correct axis direction
|
||||
} else {
|
||||
found_axis_index = Some(i); // pane found and this is correct direction
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -743,13 +743,13 @@ impl PaneAxis {
|
|||
let bounding_boxes = self.bounding_boxes.lock();
|
||||
|
||||
for (idx, member) in self.members.iter().enumerate() {
|
||||
if let Some(coordinates) = bounding_boxes[idx] {
|
||||
if coordinates.contains(&coordinate) {
|
||||
return match member {
|
||||
Member::Pane(found) => Some(found),
|
||||
Member::Axis(axis) => axis.pane_at_pixel_position(coordinate),
|
||||
};
|
||||
}
|
||||
if let Some(coordinates) = bounding_boxes[idx]
|
||||
&& coordinates.contains(&coordinate)
|
||||
{
|
||||
return match member {
|
||||
Member::Pane(found) => Some(found),
|
||||
Member::Axis(axis) => axis.pane_at_pixel_position(coordinate),
|
||||
};
|
||||
}
|
||||
}
|
||||
None
|
||||
|
@ -1273,17 +1273,18 @@ mod element {
|
|||
window.paint_quad(gpui::fill(overlay_bounds, overlay_background));
|
||||
}
|
||||
|
||||
if let Some(border) = overlay_border {
|
||||
if self.active_pane_ix == Some(ix) && child.is_leaf_pane {
|
||||
window.paint_quad(gpui::quad(
|
||||
overlay_bounds,
|
||||
0.,
|
||||
gpui::transparent_black(),
|
||||
border,
|
||||
cx.theme().colors().border_selected,
|
||||
BorderStyle::Solid,
|
||||
));
|
||||
}
|
||||
if let Some(border) = overlay_border
|
||||
&& self.active_pane_ix == Some(ix)
|
||||
&& child.is_leaf_pane
|
||||
{
|
||||
window.paint_quad(gpui::quad(
|
||||
overlay_bounds,
|
||||
0.,
|
||||
gpui::transparent_black(),
|
||||
border,
|
||||
cx.theme().colors().border_selected,
|
||||
BorderStyle::Solid,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue