Remove { and } from single-line closure

This commit is contained in:
Joseph T. Lyons 2023-07-25 14:48:11 -04:00
parent 93ec73da29
commit bf2ca57f55

View file

@ -4231,15 +4231,11 @@ impl Editor {
}
pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext<Self>) {
self.manipulate_lines(cx, |lines| {
lines.reverse();
})
self.manipulate_lines(cx, |lines| lines.reverse())
}
pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext<Self>) {
self.manipulate_lines(cx, |lines| {
lines.shuffle(&mut thread_rng());
})
self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng()))
}
fn manipulate_lines<Fn>(&mut self, cx: &mut ViewContext<Self>, mut callback: Fn)