mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Remove the smart-default dependency from examples/redis_remember_bot
This commit is contained in:
parent
d5b453e567
commit
adce7a4773
3 changed files with 8 additions and 6 deletions
|
@ -15,5 +15,4 @@ serde = "1.0.104"
|
|||
futures = "0.3.5"
|
||||
|
||||
thiserror = "1.0.15"
|
||||
smart-default = "0.6.0"
|
||||
derive_more = "0.99.9"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#[macro_use]
|
||||
extern crate smart_default;
|
||||
#[macro_use]
|
||||
extern crate derive_more;
|
||||
|
||||
mod states;
|
||||
|
|
|
@ -2,14 +2,19 @@ use teloxide_macros::Transition;
|
|||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Transition, SmartDefault, From, Serialize, Deserialize)]
|
||||
#[derive(Transition, From, Serialize, Deserialize)]
|
||||
pub enum Dialogue {
|
||||
#[default]
|
||||
Start(StartState),
|
||||
HaveNumber(HaveNumberState),
|
||||
}
|
||||
|
||||
#[derive(Default, Serialize, Deserialize)]
|
||||
impl Default for Dialogue {
|
||||
fn default() -> Self {
|
||||
Self::Start(StartState)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct StartState;
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
|
|
Loading…
Reference in a new issue