From 1255bcb8a311c7f382f0bf66bbe791c6dfd77b30 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 9 May 2021 18:02:31 +0900 Subject: Simplify the compositor callback. --- helix-term/src/ui/menu.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'helix-term/src/ui/menu.rs') diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index d055d0d0..f9bfdd35 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -142,12 +142,10 @@ impl Component for Menu { _ => return EventResult::Ignored, }; - let close_fn = EventResult::Consumed(Some(Box::new( - |compositor: &mut Compositor, editor: &mut Editor| { - // remove the layer - compositor.pop(); - }, - ))); + let close_fn = EventResult::Consumed(Some(Box::new(|compositor: &mut Compositor| { + // remove the layer + compositor.pop(); + }))); match event { // esc or ctrl-c aborts the completion and closes the menu -- cgit v1.2.3-70-g09d2