derive Clone on bot and runner config

This commit is contained in:
Akulij 2025-05-26 20:48:11 +05:00
parent 4384431696
commit 9bbf481002

View File

@ -254,7 +254,7 @@ fn print(s: String) {
println!("{s}"); println!("{s}");
} }
#[derive(Serialize, Deserialize, Debug)] #[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BotConfig { pub struct BotConfig {
version: f64, version: f64,
} }
@ -555,7 +555,7 @@ impl Parcelable<BotFunction> for BotMessage {
} }
} }
#[derive(Serialize, Deserialize, Debug)] #[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BotDialog { pub struct BotDialog {
pub commands: HashMap<String, BotMessage>, pub commands: HashMap<String, BotMessage>,
stateful_msg_handlers: HashMap<String, BotMessage>, stateful_msg_handlers: HashMap<String, BotMessage>,
@ -573,7 +573,7 @@ impl Parcelable<BotFunction> for BotDialog {
} }
} }
#[derive(Serialize, Deserialize, Debug)] #[derive(Serialize, Deserialize, Debug, Clone)]
pub struct RunnerConfig { pub struct RunnerConfig {
config: BotConfig, config: BotConfig,
pub dialog: BotDialog, pub dialog: BotDialog,