Make run_with take a FnOnce
This commit is contained in:
parent
950bfc07d4
commit
bdf0430880
3 changed files with 5 additions and 5 deletions
|
|
@ -169,7 +169,7 @@ impl<P: Program> Application<P> {
|
|||
pub fn run_with<I>(self, initialize: I) -> Result
|
||||
where
|
||||
Self: 'static,
|
||||
I: Fn() -> (P::State, Task<P::Message>) + Clone + 'static,
|
||||
I: FnOnce() -> (P::State, Task<P::Message>) + 'static,
|
||||
{
|
||||
self.raw
|
||||
.run_with(self.settings, Some(self.window), initialize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue