From 2eb31baff66af15e66803ef1ffbc97bd1a1e8d30 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Wed, 21 Jun 2023 14:11:59 +0200 Subject: [PATCH] Remove unused code --- src/bots_manager/bot_manager_client.rs | 11 ----------- src/bots_manager/mod.rs | 5 ++--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/bots_manager/bot_manager_client.rs b/src/bots_manager/bot_manager_client.rs index 54a993b..481c568 100644 --- a/src/bots_manager/bot_manager_client.rs +++ b/src/bots_manager/bot_manager_client.rs @@ -3,16 +3,6 @@ use serde::Deserialize; use crate::config; -#[derive(Deserialize, Debug, PartialEq, Clone, Copy)] -pub enum BotStatus { - #[serde(rename = "pending")] - Pending, - #[serde(rename = "approved")] - Approved, - #[serde(rename = "blocked")] - Blocked, -} - #[derive(Deserialize, Debug, PartialEq, Clone, Copy)] pub enum BotCache { #[serde(rename = "original")] @@ -25,7 +15,6 @@ pub enum BotCache { pub struct BotData { pub id: u32, pub token: String, - pub status: BotStatus, pub cache: BotCache, } diff --git a/src/bots_manager/mod.rs b/src/bots_manager/mod.rs index 453cd7e..d02bbcc 100644 --- a/src/bots_manager/mod.rs +++ b/src/bots_manager/mod.rs @@ -22,7 +22,7 @@ use url::Url; use moka::future::Cache; use self::bot_manager_client::get_bots; -pub use self::bot_manager_client::{BotCache, BotData, BotStatus}; +pub use self::bot_manager_client::{BotCache, BotData}; use crate::config; #[derive(Clone)] @@ -87,9 +87,8 @@ impl BotsManager { .unwrap_or_else(|_| panic!("Can't parse webhook url!")); log::info!( - "Start bot(id={}) with {:?} handler, port {}", + "Start bot(id={}) port {}", bot_data.id, - bot_data.status, port );