diff options
author | 2024-03-17 19:53:02 +0100 | |
---|---|---|
committer | 2024-03-17 19:53:02 +0100 | |
commit | eb67aa5d71172569e3d404107a1a449998d98d42 (patch) | |
tree | 50f8c8264cdb5b2a09c440b7f598e5aa23846120 /src/program.rs | |
parent | cab9dec6267f3e38b2dee2a0262cd04e21a7519e (diff) | |
download | iced-eb67aa5d71172569e3d404107a1a449998d98d42.tar.gz iced-eb67aa5d71172569e3d404107a1a449998d98d42.tar.bz2 iced-eb67aa5d71172569e3d404107a1a449998d98d42.zip |
Revert "Remove `'static'` bound for `P::State` in `Program::run_with`"
This reverts commit cab9dec6267f3e38b2dee2a0262cd04e21a7519e.
Wasm needs the `'static'` bound since the runtime
will run in a background task.
Diffstat (limited to '')
-rw-r--r-- | src/program.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/program.rs b/src/program.rs index c423f6d0..7a366585 100644 --- a/src/program.rs +++ b/src/program.rs @@ -166,7 +166,10 @@ impl<P: Definition> Program<P> { /// Runs the underlying [`Application`] of the [`Program`] with a /// closure that creates the initial state. - pub fn run_with(self, initialize: impl Fn() -> P::State + Clone) -> Result + pub fn run_with( + self, + initialize: impl Fn() -> P::State + Clone + 'static, + ) -> Result where Self: 'static, { |