Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nothendev committed Oct 8, 2023
1 parent 0eb2355 commit 88b1c61
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub mod nsfr;
pub mod ser;
pub use aott;
pub use bytes;
use bytes::{Bytes, BytesMut};
use bytes::BytesMut;
pub use thiserror;
use tokio_util::sync::CancellationToken;
pub use uuid;
Expand Down Expand Up @@ -147,8 +147,7 @@ use tokio::{
use crate::{
model::{
packets::{
err_with_source, Packet, PacketContext, PluginMessage, SerializedPacket,
SerializedPacketCompressed,
Packet, PacketContext, PluginMessage, SerializedPacket, SerializedPacketCompressed,
},
State,
},
Expand Down Expand Up @@ -221,13 +220,13 @@ impl PlayerNet {
loop {
let bufslice = &buf[..];
let mut input = Input::new(&bufslice);
if let Some(packet) = match (if compressing__.get_copy().await {
if let Some(packet) = match if compressing__.get_copy().await {
SerializedPacketCompressed::deserialize
.parse_with(&mut input)
.map(SerializedPacket::from)
} else {
SerializedPacket::deserialize.parse_with(&mut input)
}) {
} {
Ok(packet) => Some(packet),
Err(crate::error::Error::Ser(
crate::ser::SerializationError::UnexpectedEof { .. },
Expand Down

0 comments on commit 88b1c61

Please sign in to comment.