Format let-else statements
This commit is contained in:
parent
732af201dc
commit
404f76739c
28 changed files with 210 additions and 109 deletions
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue