diff options
Diffstat (limited to 'azalea-protocol/src')
| -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 { |
