summaryrefslogtreecommitdiffstats
path: root/src/program.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/program.rs')
-rw-r--r--src/program.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/program.rs b/src/program.rs
index 939b0047..2b697fbe 100644
--- a/src/program.rs
+++ b/src/program.rs
@@ -92,7 +92,7 @@ pub trait Program: Sized {
) -> Result
where
Self: 'static,
- I: Fn() -> (Self::State, Task<Self::Message>) + Clone + 'static,
+ I: FnOnce() -> (Self::State, Task<Self::Message>) + 'static,
{
use std::marker::PhantomData;
@@ -102,8 +102,8 @@ pub trait Program: Sized {
_initialize: PhantomData<I>,
}
- impl<P: Program, I: Fn() -> (P::State, Task<P::Message>)> shell::Program
- for Instance<P, I>
+ impl<P: Program, I: FnOnce() -> (P::State, Task<P::Message>)>
+ shell::Program for Instance<P, I>
{
type Message = P::Message;
type Theme = P::Theme;