Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove { and } from single-line closure
Joseph T. Lyonsbf2ca57f5518
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 655fb39257f..e05837740d4 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -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)