diff options
| author | mat <github@matdoes.dev> | 2022-05-03 18:20:24 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-03 18:20:24 +0000 |
| commit | c9878129274258a30dc3ee0ecbd064b4fcf9bc6e (patch) | |
| tree | 07e03b13eb71b4231159d42b5773e31371e83858 /azalea-protocol/src/mc_buf/read.rs | |
| parent | 477c367fc44a2b5c139845f7e8307c6c276d95ee (diff) | |
| download | azalea-drasl-c9878129274258a30dc3ee0ecbd064b4fcf9bc6e.tar.xz | |
clippy
Diffstat (limited to 'azalea-protocol/src/mc_buf/read.rs')
| -rwxr-xr-x | azalea-protocol/src/mc_buf/read.rs | 6 |
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) } |
