aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/compositor.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-12-15 10:07:25 +0000
committerBlaž Hrastnik2020-12-15 10:07:48 +0000
commit1a843b6c06b5d4d75feb0a424bbfdcfb33ab7651 (patch)
tree2f0b77e9fe94368fad33f310c8260bf8aabd2a21 /helix-term/src/compositor.rs
parent2bfdcede32586af01e1e7cda686a48525e0154bd (diff)
prompt: make the callback a FnOnce.
Diffstat (limited to 'helix-term/src/compositor.rs')
-rw-r--r--helix-term/src/compositor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index 2e65f02a..f0d94dbc 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -19,7 +19,7 @@ use smol::Executor;
use tui::buffer::Buffer as Surface;
use tui::layout::Rect;
-pub type Callback = Box<dyn Fn(&mut Compositor)>;
+pub type Callback = Box<dyn FnOnce(&mut Compositor)>;
// --> EventResult should have a callback that takes a context with methods like .popup(),
// .prompt() etc. That way we can abstract it from the renderer.