Remove { and } from single-line closure
This commit is contained in:
@@ -4231,15 +4231,11 @@ impl Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext<Self>) {
|
pub fn reverse_lines(&mut self, _: &ReverseLines, cx: &mut ViewContext<Self>) {
|
||||||
self.manipulate_lines(cx, |lines| {
|
self.manipulate_lines(cx, |lines| lines.reverse())
|
||||||
lines.reverse();
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext<Self>) {
|
pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext<Self>) {
|
||||||
self.manipulate_lines(cx, |lines| {
|
self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng()))
|
||||||
lines.shuffle(&mut thread_rng());
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn manipulate_lines<Fn>(&mut self, cx: &mut ViewContext<Self>, mut callback: Fn)
|
fn manipulate_lines<Fn>(&mut self, cx: &mut ViewContext<Self>, mut callback: Fn)
|
||||||
|
|||||||
Reference in New Issue
Block a user