mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-20 13:59:00 +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"
|
futures = "0.3.5"
|
||||||
|
|
||||||
thiserror = "1.0.15"
|
thiserror = "1.0.15"
|
||||||
smart-default = "0.6.0"
|
|
||||||
derive_more = "0.99.9"
|
derive_more = "0.99.9"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate smart_default;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate derive_more;
|
extern crate derive_more;
|
||||||
|
|
||||||
mod states;
|
mod states;
|
||||||
|
|
|
@ -2,14 +2,19 @@ use teloxide_macros::Transition;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Transition, SmartDefault, From, Serialize, Deserialize)]
|
#[derive(Transition, From, Serialize, Deserialize)]
|
||||||
pub enum Dialogue {
|
pub enum Dialogue {
|
||||||
#[default]
|
|
||||||
Start(StartState),
|
Start(StartState),
|
||||||
HaveNumber(HaveNumberState),
|
HaveNumber(HaveNumberState),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Serialize, Deserialize)]
|
impl Default for Dialogue {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::Start(StartState)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct StartState;
|
pub struct StartState;
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue