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/commands.rs | |
parent | 35606a3daa7ee273845a12f3e03728e0ae23928e (diff) |
Simplify the compositor callback.
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<dyn Component>) { - 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] |