From 1a961d968b80b720ef2d3900c0b95e1c16a0089e Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 26 Dec 2021 14:17:01 -0600 Subject: fix some clippy warnings --- azalea-protocol/src/read.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-protocol/src/read.rs') 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) } -- cgit v1.2.3