fix build fail by commenting out unused stuff

This commit is contained in:
bitfl0wer 2023-05-03 21:05:09 +02:00
parent 7369bdd59f
commit ef8366e1bd
1 changed files with 4 additions and 10 deletions

View File

@ -1,8 +1,3 @@
use crate::api::types::*; use crate::api::types::*;
use crate::api::WebSocketEvent; use crate::api::WebSocketEvent;
use crate::errors::ObserverError; use crate::errors::ObserverError;
@ -15,7 +10,6 @@ use reqwest::Url;
use serde::Deserialize; use serde::Deserialize;
use serde::Serialize; use serde::Serialize;
use tokio::io; use tokio::io;
use tokio::net::TcpStream; use tokio::net::TcpStream;
use tokio::sync::mpsc::{channel, Receiver, Sender}; use tokio::sync::mpsc::{channel, Receiver, Sender};
@ -50,7 +44,7 @@ impl<'a> Gateway<'a> {
} }
} }
struct WebSocketConnection { /*struct WebSocketConnection {
rx: Arc<Mutex<Receiver<tokio_tungstenite::tungstenite::Message>>>, rx: Arc<Mutex<Receiver<tokio_tungstenite::tungstenite::Message>>>,
tx: Arc<Mutex<Sender<tokio_tungstenite::tungstenite::Message>>>, tx: Arc<Mutex<Sender<tokio_tungstenite::tungstenite::Message>>>,
} }
@ -58,11 +52,11 @@ struct WebSocketConnection {
impl<'a> WebSocketConnection { impl<'a> WebSocketConnection {
async fn new(websocket_url: String) -> WebSocketConnection { async fn new(websocket_url: String) -> WebSocketConnection {
let parsed_url = Url::parse(&URLBundle::parse_url(websocket_url.clone())).unwrap(); let parsed_url = Url::parse(&URLBundle::parse_url(websocket_url.clone())).unwrap();
/*if parsed_url.scheme() != "ws" && parsed_url.scheme() != "wss" { if parsed_url.scheme() != "ws" && parsed_url.scheme() != "wss" {
return Err(tokio_tungstenite::tungstenite::Error::Url( return Err(tokio_tungstenite::tungstenite::Error::Url(
UrlError::UnsupportedUrlScheme, UrlError::UnsupportedUrlScheme,
)); ));
}*/ }
let (mut channel_write, mut channel_read): ( let (mut channel_write, mut channel_read): (
Sender<tokio_tungstenite::tungstenite::Message>, Sender<tokio_tungstenite::tungstenite::Message>,
@ -104,7 +98,7 @@ impl<'a> WebSocketConnection {
socket: ws_stream, socket: ws_stream,
}) })
} }
} }*/
/** /**
Trait which defines the behaviour of an Observer. An Observer is an object which is subscribed to Trait which defines the behaviour of an Observer. An Observer is an object which is subscribed to