Format let-else statements

This commit is contained in:
Max Brunsfeld 2023-08-25 10:11:32 -07:00
parent 732af201dc
commit 404f76739c
28 changed files with 210 additions and 109 deletions

View file

@ -742,8 +742,8 @@ mod element {
while proposed_current_pixel_change.abs() > 0. {
let Some(current_ix) = successors.next() else {
break;
};
break;
};
let next_target_size = f32::max(
size(current_ix + 1, flexes.as_slice()) - proposed_current_pixel_change,

View file

@ -2314,8 +2314,12 @@ impl Workspace {
item_id_to_move: usize,
cx: &mut ViewContext<Self>,
) {
let Some(pane_to_split) = pane_to_split.upgrade(cx) else { return; };
let Some(from) = from.upgrade(cx) else { return; };
let Some(pane_to_split) = pane_to_split.upgrade(cx) else {
return;
};
let Some(from) = from.upgrade(cx) else {
return;
};
let new_pane = self.add_pane(cx);
self.move_item(from.clone(), new_pane.clone(), item_id_to_move, 0, cx);