diff --git a/src/state/handler.rs b/src/state/handler.rs index 569174c..d8e0aff 100644 --- a/src/state/handler.rs +++ b/src/state/handler.rs @@ -12,8 +12,7 @@ type DynHanlder = Box< MainDialogue, T, ) -> crate::PinnedFuture<'static, crate::Result<()>> - + Send - + Sync, + + Send, >; pub struct Handler { @@ -31,12 +30,11 @@ impl Handler { where H: FnOnce(Throttle, Message, DatabaseConnection, MainDialogue, T) -> F + Send - + Sync + 'static, F: Future> + Send + 'static, { let handler = Self { - func: Some(Box::new(move |bot, msg, db, dialogue, val| { + func: Some(Box::new(|bot, msg, db, dialogue, val| { Box::pin(f(bot, msg, db, dialogue, val)) })), previous: previous.into(),