Describe a full path to TransitionOut

This commit is contained in:
Temirkhan Myrzamadi 2020-07-24 00:32:30 +06:00
parent 17a9b4d3df
commit a18ef6fc94

View file

@ -31,7 +31,7 @@ pub fn bot_dialogue(_attr: TokenStream, item: TokenStream) -> TokenStream {
let input = parse_macro_input!(item as ItemEnum);
let mut dispatch_fn = "".to_owned();
write!(dispatch_fn, "impl {} {{ pub async fn dispatch(self, cx: teloxide::dispatching::UpdateWithCx<teloxide::types::Message>) -> TransitionOut<Self> {{ match self {{", input.ident).unwrap();
write!(dispatch_fn, "impl {} {{ pub async fn dispatch(self, cx: teloxide::dispatching::UpdateWithCx<teloxide::types::Message>) -> teloxide::dispatching::dialogue::TransitionOut<Self> {{ match self {{", input.ident).unwrap();
for variant in input.variants.iter() {
if let Some(handler) = variant