summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/application.rs3
-rw-r--r--src/program.rs5
-rw-r--r--winit/src/application.rs5
3 files changed, 7 insertions, 6 deletions
diff --git a/src/application.rs b/src/application.rs
index a44d6342..8317abcb 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -192,8 +192,7 @@ where
/// [`Error`]: crate::Error
fn run(settings: Settings<Self::Flags>) -> crate::Result
where
- Self::Message: 'static,
- Self::Executor: 'static,
+ Self: 'static,
{
#[allow(clippy::needless_update)]
let renderer_settings = crate::renderer::Settings {
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,
{
diff --git a/winit/src/application.rs b/winit/src/application.rs
index ba2bd07f..13d9282d 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -133,8 +133,7 @@ pub async fn run<A, E, C>(
compositor_settings: C::Settings,
) -> Result<(), Error>
where
- A: Application,
- A::Message: 'static,
+ A: Application + 'static,
E: Executor + 'static,
C: Compositor<Renderer = A::Renderer> + 'static,
A::Theme: DefaultStyle,
@@ -318,7 +317,7 @@ async fn run_instance<A, E, C>(
should_be_visible: bool,
exit_on_close_request: bool,
) where
- A: Application,
+ A: Application + 'static,
E: Executor + 'static,
C: Compositor<Renderer = A::Renderer> + 'static,
A::Theme: DefaultStyle,