diff --git a/src/states.rs b/src/states.rs index 4f79763..76e9eec 100644 --- a/src/states.rs +++ b/src/states.rs @@ -18,6 +18,13 @@ pub trait FutureStateChange: Fn() -> Result<()> + Send + Sync { { self } + + fn as_static(&'static self) -> &'static (dyn Fn() -> Result<()> + Send + Sync + 'static) + where + Self: Sized, + { + self + } } impl Result<()> + Clone + Send + Sync> FutureStateChange for F {