mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
Use TransitionIn
This commit is contained in:
parent
f0ab748cce
commit
878e4370af
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ pub fn derive_bot_dialogue(item: TokenStream) -> TokenStream {
|
||||||
let input = parse_macro_input!(item as ItemEnum);
|
let input = parse_macro_input!(item as ItemEnum);
|
||||||
let mut dispatch_fn = "".to_owned();
|
let mut dispatch_fn = "".to_owned();
|
||||||
|
|
||||||
write!(dispatch_fn, "impl teloxide::dispatching::dialogue::BotDialogue for {} {{ fn dispatch(self, cx: teloxide::dispatching::UpdateWithCx<teloxide::types::Message>) -> futures::future::BoxFuture<'static, teloxide::dispatching::dialogue::TransitionOut<Self>> {{ futures::future::FutureExt::boxed(async {{ match self {{", input.ident).unwrap();
|
write!(dispatch_fn, "impl teloxide::dispatching::dialogue::BotDialogue for {} {{ fn dispatch(self, cx: teloxide::dispatching::dialogue::TransitionIn) -> futures::future::BoxFuture<'static, teloxide::dispatching::dialogue::TransitionOut<Self>> {{ futures::future::FutureExt::boxed(async {{ match self {{", input.ident).unwrap();
|
||||||
|
|
||||||
for variant in input.variants.iter() {
|
for variant in input.variants.iter() {
|
||||||
if let Some(handler) = variant
|
if let Some(handler) = variant
|
||||||
|
|
Loading…
Reference in a new issue