diff options
| author | mat <github@matdoes.dev> | 2021-12-26 14:17:01 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-26 14:17:01 -0600 |
| commit | 1a961d968b80b720ef2d3900c0b95e1c16a0089e (patch) | |
| tree | f7d5a23e6832a539a3fdf0364bb80f825973ce07 /azalea-protocol/src/read.rs | |
| parent | af28b0e57aeeca8790e3014f3e568c60ae892e39 (diff) | |
| download | azalea-drasl-1a961d968b80b720ef2d3900c0b95e1c16a0089e.tar.xz | |
fix some clippy warnings
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) } |
