diff options
| author | mat <github@matdoes.dev> | 2022-10-15 16:53:34 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-15 16:53:34 -0500 |
| commit | 98224cf91337aa312b72de87ea4c1b22794619b2 (patch) | |
| tree | a00f3468543d292c1b6f4eb212fcc3e3b3e13e2e /azalea-protocol | |
| parent | a348f67b9646cf51bedf413bf79271391bdb23b2 (diff) | |
| download | azalea-drasl-98224cf91337aa312b72de87ea4c1b22794619b2.tar.xz | |
fix clippy warnings
Diffstat (limited to 'azalea-protocol')
| -rw-r--r-- | azalea-protocol/src/read.rs | 2 | ||||
| -rwxr-xr-x | azalea-protocol/src/write.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 16820846..8d8bc731 100644 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -106,7 +106,7 @@ fn parse_frame(buffer: &mut BytesMut) -> Result<BytesMut, FrameSplitterError> { Ok(data) } -fn frame_splitter<'a>(buffer: &'a mut BytesMut) -> Result<Option<Vec<u8>>, FrameSplitterError> { +fn frame_splitter(buffer: &mut BytesMut) -> Result<Option<Vec<u8>>, FrameSplitterError> { // https://tokio.rs/tokio/tutorial/framing let read_frame = parse_frame(buffer); match read_frame { diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index a04979a5..9df54f4d 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -29,7 +29,7 @@ fn packet_encoder<P: ProtocolPacket + std::fmt::Debug>( packet: &P, ) -> Result<Vec<u8>, PacketEncodeError> { let mut buf = Vec::new(); - (packet.id() as u32).var_write_into(&mut buf)?; + packet.id().var_write_into(&mut buf)?; packet.write(&mut buf)?; if buf.len() > MAXIMUM_UNCOMPRESSED_LENGTH as usize { return Err(PacketEncodeError::TooBig { |
