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

@ -33,7 +33,7 @@ fn paste(_: &mut Workspace, action: &Paste, cx: &mut ViewContext<Workspace>) {
editor.set_clip_at_line_ends(false, cx);
let Some(item) = cx.read_from_clipboard() else {
return
return;
};
let clipboard_text = Cow::Borrowed(item.text());
if clipboard_text.is_empty() {

View file

@ -77,7 +77,10 @@ pub fn visual_motion(motion: Motion, times: Option<usize>, cx: &mut WindowContex
}
let Some((new_head, goal)) =
motion.move_point(map, current_head, selection.goal, times) else { return };
motion.move_point(map, current_head, selection.goal, times)
else {
return;
};
selection.set_head(new_head, goal);
@ -132,7 +135,7 @@ pub fn visual_block_motion(
}
let Some((new_head, _)) = move_selection(&map, head, goal) else {
return
return;
};
head = new_head;