From c017fcc51627e867e9d0967488990af8e5b3f17a Mon Sep 17 00:00:00 2001 From: Amy Date: Tue, 4 Jan 2022 23:52:53 +0100 Subject: [PATCH] remove some unneeded stuff --- Cargo.toml | 5 ----- src/main.rs | 12 +----------- src/mods/ws.rs | 2 -- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d17ed8b..97b7c61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,13 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = "2.33.0" tokio = { version= "1", features = ["full"] } tokio-stream = "0.1.6" warp = "0.3" -serde = "*" -serde_derive = "*" -toml = "0.5" -serde_json = "1.0" futures = { version = "0.3", default-features=false} uuid = { version = "0.4", features = ["serde", "v4"] } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index b2bbc01..2c36f44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,17 +1,7 @@ mod mods; -use std::{collections::HashMap, convert::Infallible, sync::Arc, fs, fs::File, io::prelude::*, env}; +use std::{collections::HashMap, convert::Infallible, sync::Arc, env}; use tokio::sync::{mpsc, Mutex}; use warp::{ws::Message, Filter, Rejection}; -use toml; -use serde_derive::Deserialize; - -#[derive(Deserialize)] -struct General { - websocket_ip: String, - websocket_port: String, - restore_conf: String, -} - #[derive(Debug, Clone)] pub struct Client { diff --git a/src/mods/ws.rs b/src/mods/ws.rs index 885a283..d44d19a 100644 --- a/src/mods/ws.rs +++ b/src/mods/ws.rs @@ -5,8 +5,6 @@ use tokio_stream::wrappers::UnboundedReceiverStream; use uuid::Uuid; use warp::ws::{Message, WebSocket}; -use toml; - pub async fn client_connection(ws: WebSocket, clients: Clients) { println!("establishing client connection... {:?}", ws);