Remove 'static' bound for P::State in Program::run_with
This commit is contained in:
parent
cdb18e610a
commit
cab9dec626
3 changed files with 6 additions and 7 deletions
|
|
@ -192,7 +192,8 @@ where
|
|||
/// [`Error`]: crate::Error
|
||||
fn run(settings: Settings<Self::Flags>) -> crate::Result
|
||||
where
|
||||
Self: 'static,
|
||||
Self::Message: 'static,
|
||||
Self::Executor: 'static,
|
||||
{
|
||||
#[allow(clippy::needless_update)]
|
||||
let renderer_settings = crate::renderer::Settings {
|
||||
|
|
|
|||
|
|
@ -166,10 +166,7 @@ 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 + 'static,
|
||||
) -> Result
|
||||
pub fn run_with(self, initialize: impl Fn() -> P::State + Clone) -> Result
|
||||
where
|
||||
Self: 'static,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ pub async fn run<A, E, C>(
|
|||
compositor_settings: C::Settings,
|
||||
) -> Result<(), Error>
|
||||
where
|
||||
A: Application + 'static,
|
||||
A: Application,
|
||||
A::Message: 'static,
|
||||
E: Executor + 'static,
|
||||
C: Compositor<Renderer = A::Renderer> + 'static,
|
||||
A::Theme: DefaultStyle,
|
||||
|
|
@ -317,7 +318,7 @@ async fn run_instance<A, E, C>(
|
|||
should_be_visible: bool,
|
||||
exit_on_close_request: bool,
|
||||
) where
|
||||
A: Application + 'static,
|
||||
A: Application,
|
||||
E: Executor + 'static,
|
||||
C: Compositor<Renderer = A::Renderer> + 'static,
|
||||
A::Theme: DefaultStyle,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue