From b10d20a20496eb9287975fc9fd9b688d59896031 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Sat, 17 Oct 2020 16:16:23 +0200 Subject: change status data transfer struct --- mumlib/src/command.rs | 1 - mumlib/src/state.rs | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'mumlib/src') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index d273ee9..a216445 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -24,7 +24,6 @@ pub enum CommandResponse { channels: Channel, }, Status { - username: Option, server_state: Server, }, } diff --git a/mumlib/src/state.rs b/mumlib/src/state.rs index 59f9c64..01a31ab 100644 --- a/mumlib/src/state.rs +++ b/mumlib/src/state.rs @@ -2,17 +2,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Server { - channels: Vec, - welcome_text: Option, -} - -impl Server { - pub fn new() -> Self { - Self { - channels: Vec::new(), - welcome_text: None, - } - } + pub channels: Channel, + pub welcome_text: Option, + pub username: String, + pub host: String, } #[derive(Clone, Debug, Deserialize, Serialize)] -- cgit v1.2.1