aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/mc_buf/read.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-03 18:20:24 +0000
committermat <github@matdoes.dev>2022-05-03 18:20:24 +0000
commitc9878129274258a30dc3ee0ecbd064b4fcf9bc6e (patch)
tree07e03b13eb71b4231159d42b5773e31371e83858 /azalea-protocol/src/mc_buf/read.rs
parent477c367fc44a2b5c139845f7e8307c6c276d95ee (diff)
downloadazalea-drasl-c9878129274258a30dc3ee0ecbd064b4fcf9bc6e.tar.xz
clippy
Diffstat (limited to 'azalea-protocol/src/mc_buf/read.rs')
-rwxr-xr-xazalea-protocol/src/mc_buf/read.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-protocol/src/mc_buf/read.rs b/azalea-protocol/src/mc_buf/read.rs
index 68c9cb3f..e1ae321c 100755
--- a/azalea-protocol/src/mc_buf/read.rs
+++ b/azalea-protocol/src/mc_buf/read.rs
@@ -1,10 +1,10 @@
-use super::{BitSet, UnsizedByteArray, MAX_STRING_LENGTH};
+use super::{UnsizedByteArray, MAX_STRING_LENGTH};
use azalea_chat::component::Component;
use azalea_core::{
difficulty::Difficulty, game_type::GameType, resource_location::ResourceLocation,
serializable_uuid::SerializableUuid, BlockPos, Direction, Slot, SlotData,
};
-use byteorder::{ReadBytesExt, WriteBytesExt, BE};
+use byteorder::{ReadBytesExt, BE};
use serde::Deserialize;
use std::io::Read;
use tokio::io::{AsyncRead, AsyncReadExt};
@@ -421,7 +421,7 @@ impl McBufReadable for Component {
fn read_into(buf: &mut impl Read) -> Result<Self, String> {
let string = buf.read_utf()?;
let json: serde_json::Value = serde_json::from_str(string.as_str())
- .map_err(|e| "Component isn't valid JSON".to_string())?;
+ .map_err(|_| "Component isn't valid JSON".to_string())?;
let component = Component::deserialize(json).map_err(|e| e.to_string())?;
Ok(component)
}