diff options
Diffstat (limited to 'azalea-protocol/src/read.rs')
| -rw-r--r-- | azalea-protocol/src/read.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 3d6a41d6..ed36d6b6 100644 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -19,7 +19,7 @@ where Ok(buf) } - Err(e) => Err("length wider than 21-bit".to_string()), + Err(_) => Err("length wider than 21-bit".to_string()), } } @@ -66,7 +66,7 @@ where n, compression_threshold )); } - if n > MAXIMUM_UNCOMPRESSED_LENGTH.into() { + if n > MAXIMUM_UNCOMPRESSED_LENGTH { return Err(format!( "Badly compressed packet - size of {} is larger than protocol maximum of {}", n, MAXIMUM_UNCOMPRESSED_LENGTH @@ -104,5 +104,5 @@ where } let packet = packet_decoder(&mut buf.as_slice(), flow).await?; - return Ok(packet); + Ok(packet) } |
