Remove 'static' bound for P::State in Program::run_with

This commit is contained in:
Héctor Ramón Jiménez 2024-03-17 19:42:43 +01:00
parent cdb18e610a
commit cab9dec626
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 6 additions and 7 deletions

View file

@ -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,
{