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/commands.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-term/src/commands.rs') diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index fe160ab8..e26dbbaa 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -63,9 +63,9 @@ impl<'a> Context<'a> { /// Push a new component onto the compositor. pub fn push_layer(&mut self, mut component: Box) { - self.callback = Some(Box::new( - |compositor: &mut Compositor, editor: &mut Editor| compositor.push(component), - )); + self.callback = Some(Box::new(|compositor: &mut Compositor| { + compositor.push(component) + })); } #[inline] -- cgit v1.2.3-70-g09d2