Skip to content

Commit c4faf08

Browse files
committed
get rid of old deps
1 parent 00ad22c commit c4faf08

3 files changed

Lines changed: 6 additions & 39 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@ calendarize = "1.1"
1717
regex = "1.12"
1818
log = "0.4"
1919
rusqlite = { version = "0.37", features = ["bundled"] }
20-
serde = { version = "1.0", features = ["derive"] }
21-
serde_json = "1.0"
22-
lazy_static = "1.5.0"
2320
frankenstein = { version = "0.45", features = ["client-ureq"] }
2421
env_logger = "0.11"
25-
futures = "0.3"
26-
tokio = { version = "1.48", features = ["rt-multi-thread", "macros"] }
2722
anyhow = "1.0.100"
2823

2924
[dev-dependencies]

src/engine.rs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,13 @@
11
use anyhow::{Context, Result};
22
use log::{debug, info};
3-
use serde::{Deserialize, Serialize};
43
use std::collections::HashMap;
54

65
use crate::command::*;
76
use crate::database::{DataBase, DbMode, UserInfo};
87
use crate::state::*;
98
use crate::time::Clock;
109

11-
#[expect(dead_code)]
12-
#[derive(Clone, Debug, Serialize, Deserialize)]
13-
pub enum CmdToEngine {
14-
AddUser {
15-
uid: i64,
16-
username: String,
17-
chat_id: i64,
18-
first_name: String,
19-
last_name: String,
20-
tz: i32,
21-
},
22-
TextMessage {
23-
uid: i64,
24-
msg_id: i64,
25-
message: String,
26-
},
27-
KeyboardMessage {
28-
uid: i64,
29-
msg_id: i64,
30-
call_data: String,
31-
msg_text: String,
32-
},
33-
AdvanceTime(i64), // used in test enviroment so engine known that time has been advanced
34-
Terminate,
35-
}
36-
37-
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
10+
#[derive(Clone, Debug, PartialEq)]
3811
pub struct CmdFromEngine {
3912
pub uid: i64,
4013
pub to_msg: Option<i64>,

src/state.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use chrono::prelude::*;
33
use log::debug;
44
use log::error;
55
use log::warn;
6-
use serde::{Deserialize, Serialize};
76

87
use crate::database::DataBase;
98
use crate::engine::ProcessResult;
@@ -15,13 +14,13 @@ pub const EXPECT_TIME_MSG: &str = "Ok, now write the time of event";
1514
pub 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)]
1918
pub 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)]
2524
pub 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)]
3534
pub struct KeyboardCommand {
3635
pub action_type: KeyboardCommandType,
3736
pub text: String,
3837
}
39-
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
38+
#[derive(Clone, Debug, PartialEq)]
4039
pub 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)]
4847
pub enum FrontendCommand {
4948
send(SendMessageCommand),
5049
calendar(AtCalendarCommand),

0 commit comments

Comments
 (0)