diff options
Diffstat (limited to 'helix-term/src/job.rs')
-rw-r--r-- | helix-term/src/job.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-term/src/job.rs b/helix-term/src/job.rs index 2888b6eb..19f2521a 100644 --- a/helix-term/src/job.rs +++ b/helix-term/src/job.rs @@ -5,9 +5,12 @@ use crate::compositor::Compositor; use futures_util::future::{BoxFuture, Future, FutureExt}; use futures_util::stream::{FuturesUnordered, StreamExt}; +pub type EditorCompositorCallback = Box<dyn FnOnce(&mut Editor, &mut Compositor) + Send>; +pub type EditorCallback = Box<dyn FnOnce(&mut Editor) + Send>; + pub enum Callback { - EditorCompositor(Box<dyn FnOnce(&mut Editor, &mut Compositor) + Send>), - Editor(Box<dyn FnOnce(&mut Editor) + Send>), + EditorCompositor(EditorCompositorCallback), + Editor(EditorCallback), } pub type JobFuture = BoxFuture<'static, anyhow::Result<Option<Callback>>>; |