Cargo clippy

This commit is contained in:
Pierre HUBERT 2022-08-30 13:28:32 +02:00
parent a6f7966243
commit 235f03d3e9

View File

@ -1,13 +1,11 @@
use std::sync::Arc;
use actix::{Actor, ActorContext, Addr, ArbiterHandle, AsyncContext, Context, Handler, Message, Running, StreamHandler};
use actix::{Actor, ActorContext, AsyncContext, Handler, Message, StreamHandler};
use actix_web::{Error, HttpRequest, HttpResponse, web};
use actix_web::web::Data;
use actix_web_actors::ws;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::tcp::{OwnedReadHalf, OwnedWriteHalf};
use tokio::net::TcpStream;
use tokio::sync::mpsc;
use crate::args::Args;
@ -68,7 +66,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for RelayWS {
Ok(ws::Message::Close(_reason)) => ctx.stop(),
Ok(ws::Message::Binary(data)) => {
if let Err(e) = futures::executor::block_on(self.tcp_write.write_all(&data.to_vec())) {
log::error!("Failed to forward some data, closing connection!");
log::error!("Failed to forward some data, closing connection! {:?}", e);
ctx.stop();
}
}