From 84766506c67f039642b8b8daa9eed1d14e5954c3 Mon Sep 17 00:00:00 2001 From: john-bv Date: Tue, 8 Aug 2023 22:37:26 -0500 Subject: [PATCH] chore(fmt): Remove warnings [ci skip] --- src/client/mod.rs | 8 ++------ src/connection/mod.rs | 5 +---- src/notify/mod.rs | 2 -- src/protocol/ack.rs | 2 -- src/protocol/packet/offline.rs | 1 - 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index 0681f98..f567d17 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -2,11 +2,7 @@ pub mod handshake; use std::{ net::SocketAddr, - sync::{ - atomic::{AtomicBool, AtomicU64}, - Arc, - }, - task::Waker, + sync::{atomic::AtomicU64, Arc}, time::Duration, }; @@ -647,7 +643,7 @@ impl Client { let t = task::spawn(async move { loop { - let mut closer = closer_dispatch.lock().await; + let closer = closer_dispatch.lock().await; select! { _ = sleep(Duration::from_millis(50)).fuse() => { let recv = last_recv.load(std::sync::atomic::Ordering::Relaxed); diff --git a/src/connection/mod.rs b/src/connection/mod.rs index a047bea..f31fe5d 100644 --- a/src/connection/mod.rs +++ b/src/connection/mod.rs @@ -5,10 +5,7 @@ pub mod state; use std::{ net::{IpAddr, Ipv4Addr, SocketAddr}, - sync::{ - atomic::{AtomicBool, AtomicU64}, - Arc, - }, + sync::{atomic::AtomicU64, Arc}, time::Duration, }; diff --git a/src/notify/mod.rs b/src/notify/mod.rs index 5c92347..b798e20 100644 --- a/src/notify/mod.rs +++ b/src/notify/mod.rs @@ -4,8 +4,6 @@ use async_std::channel::{Receiver, Sender}; #[cfg(feature = "async_tokio")] use tokio::sync::mpsc::{Receiver, Sender}; -use crate::connection::queue::recv; - /// Notify is a struct that wraps a buffer channel /// these channels are used to send messages to the main thread. #[derive(Clone)] diff --git a/src/protocol/ack.rs b/src/protocol/ack.rs index dd69f26..412eabb 100644 --- a/src/protocol/ack.rs +++ b/src/protocol/ack.rs @@ -6,8 +6,6 @@ use std::{io::Cursor, ops::Range}; use binary_utils::Streamable; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt, BE}; -use crate::rakrs_debug; - pub(crate) trait Ackable { type NackItem; diff --git a/src/protocol/packet/offline.rs b/src/protocol/packet/offline.rs index 1f07d61..fbc694c 100644 --- a/src/protocol/packet/offline.rs +++ b/src/protocol/packet/offline.rs @@ -7,7 +7,6 @@ use byteorder::WriteBytesExt; #[cfg(feature = "mcpe")] pub use crate::protocol::mcpe::UnconnectedPong; -use crate::protocol::MAGIC; use crate::protocol::RAKNET_HEADER_OVERHEAD; use super::Packet;