From 74d44868a638dac330dc8b2b8348e60398dc37b1 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Fri, 8 Apr 2022 00:08:05 +0600 Subject: [PATCH 1/2] Deprecate `#[derive(DialogueState)]` --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 06b3249f..8baeaa34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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) { From 09ff2655906a332fa96413b56a6bc55aac594d37 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Fri, 8 Apr 2022 00:09:57 +0600 Subject: [PATCH 2/2] Update `CHANGELOG.md` --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2e70ea6..946da168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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