From bf2ca57f55182ab8568f4d6abe4d69bbc63c9f5b Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Tue, 25 Jul 2023 14:48:11 -0400 Subject: [PATCH] Remove { and } from single-line closure --- crates/editor/src/editor.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 655fb39257..e05837740d 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.manipulate_lines(cx, |lines| { - lines.reverse(); - }) + self.manipulate_lines(cx, |lines| lines.reverse()) } pub fn shuffle_lines(&mut self, _: &ShuffleLines, cx: &mut ViewContext) { - self.manipulate_lines(cx, |lines| { - lines.shuffle(&mut thread_rng()); - }) + self.manipulate_lines(cx, |lines| lines.shuffle(&mut thread_rng())) } fn manipulate_lines(&mut self, cx: &mut ViewContext, mut callback: Fn)