mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-10 20:12:25 +01:00
Merge pull request #21 from teloxide/deprecate-dialogue-state
Deprecate `#[derive(DialogueState)]`
This commit is contained in:
commit
47ee7606d4
2 changed files with 5 additions and 0 deletions
|
@ -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)]`.
|
- Support for the old dispatching: `#[teloxide(subtransition)]`.
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
|
||||||
|
- `#[derive(DialogueState)]` in favour of `teloxide::handler!`.
|
||||||
|
|
||||||
## 0.5.1 - 2022-03-23
|
## 0.5.1 - 2022-03-23
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -21,6 +21,7 @@ use quote::{quote, ToTokens};
|
||||||
use syn::{parse_macro_input, DeriveInput, Fields, ItemEnum};
|
use syn::{parse_macro_input, DeriveInput, Fields, ItemEnum};
|
||||||
|
|
||||||
#[proc_macro_derive(DialogueState, attributes(handler, handler_out, store))]
|
#[proc_macro_derive(DialogueState, attributes(handler, handler_out, store))]
|
||||||
|
#[deprecated(note = "Use teloxide::handler! instead")]
|
||||||
pub fn derive_dialogue_state(item: TokenStream) -> TokenStream {
|
pub fn derive_dialogue_state(item: TokenStream) -> TokenStream {
|
||||||
let input = parse_macro_input!(item as ItemEnum);
|
let input = parse_macro_input!(item as ItemEnum);
|
||||||
match dialogue_state::expand(input) {
|
match dialogue_state::expand(input) {
|
||||||
|
|
Loading…
Reference in a new issue