diff options
author | Blaž Hrastnik | 2021-05-09 09:02:31 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-05-09 09:02:31 +0000 |
commit | 1255bcb8a311c7f382f0bf66bbe791c6dfd77b30 (patch) | |
tree | 365cb67c8cf4942a841a6e42176642f0882b04df /helix-term/src/ui/menu.rs | |
parent | 35606a3daa7ee273845a12f3e03728e0ae23928e (diff) |
Simplify the compositor callback.
Diffstat (limited to 'helix-term/src/ui/menu.rs')
-rw-r--r-- | helix-term/src/ui/menu.rs | 10 |
1 files changed, 4 insertions, 6 deletions
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<T: 'static> Component for Menu<T> { _ => 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 |