Remove the smart-default dependency from examples/redis_remember_bot

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 23:33:53 +06:00
parent d5b453e567
commit adce7a4773
3 changed files with 8 additions and 6 deletions

View file

@ -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"

View file

@ -1,6 +1,4 @@
#[macro_use]
extern crate smart_default;
#[macro_use]
extern crate derive_more;
mod states;

View file

@ -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)]