Merge pull request #21 from teloxide/deprecate-dialogue-state

Deprecate `#[derive(DialogueState)]`
This commit is contained in:
Waffle Maybe 2022-04-08 12:55:19 +04:00 committed by GitHub
commit 47ee7606d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for the old dispatching: `#[teloxide(subtransition)]`.
### Deprecated
- `#[derive(DialogueState)]` in favour of `teloxide::handler!`.
## 0.5.1 - 2022-03-23
### Fixed

View file

@ -21,6 +21,7 @@ use quote::{quote, ToTokens};
use syn::{parse_macro_input, DeriveInput, Fields, ItemEnum};
#[proc_macro_derive(DialogueState, attributes(handler, handler_out, store))]
#[deprecated(note = "Use teloxide::handler! instead")]
pub fn derive_dialogue_state(item: TokenStream) -> TokenStream {
let input = parse_macro_input!(item as ItemEnum);
match dialogue_state::expand(input) {