@@ -3,7 +3,6 @@ use chrono::prelude::*;
33use log:: debug;
44use log:: error;
55use log:: warn;
6- use serde:: { Deserialize , Serialize } ;
76
87use crate :: database:: DataBase ;
98use crate :: engine:: ProcessResult ;
@@ -15,13 +14,13 @@ pub const EXPECT_TIME_MSG: &str = "Ok, now write the time of event";
1514pub const EXPECT_BUTTON_PUSH : & str = "Ok, now choose" ;
1615
1716// FIXME: make struct derive from String
18- #[ derive( Clone , Debug , Deserialize , Serialize , PartialEq ) ]
17+ #[ derive( Clone , Debug , PartialEq ) ]
1918pub struct SendMessageCommand {
2019 pub text : String ,
2120}
2221
2322// FIXME: remove clone trait
24- #[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
23+ #[ derive( Clone , Debug , PartialEq ) ]
2524pub struct AtCalendarCommand {
2625 pub action_type : String ,
2726 pub year : i32 ,
@@ -31,20 +30,20 @@ pub struct AtCalendarCommand {
3130 pub msg_id : Option < i32 > ,
3231}
3332
34- #[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
33+ #[ derive( Clone , Debug , PartialEq ) ]
3534pub struct KeyboardCommand {
3635 pub action_type : KeyboardCommandType ,
3736 pub text : String ,
3837}
39- #[ derive( Clone , Debug , Serialize , Deserialize , PartialEq ) ]
38+ #[ derive( Clone , Debug , PartialEq ) ]
4039pub enum KeyboardCommandType {
4140 Main ,
4241 Hour ,
4342 Minute ,
4443}
4544
4645#[ allow( non_camel_case_types) ]
47- #[ derive( Clone , Debug , Deserialize , Serialize , PartialEq ) ]
46+ #[ derive( Clone , Debug , PartialEq ) ]
4847pub enum FrontendCommand {
4948 send( SendMessageCommand ) ,
5049 calendar( AtCalendarCommand ) ,
0 commit comments