From e800bdbcfbd147c80c5bc8bf6e23441524342e89 Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Tue, 8 Aug 2023 11:04:08 +0300 Subject: [PATCH] clippy::needless_return --- .../peer_binary_protocol/src/extended/ut_metadata.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/peer_binary_protocol/src/extended/ut_metadata.rs b/crates/peer_binary_protocol/src/extended/ut_metadata.rs index d2f7be3..56d7924 100644 --- a/crates/peer_binary_protocol/src/extended/ut_metadata.rs +++ b/crates/peer_binary_protocol/src/extended/ut_metadata.rs @@ -132,12 +132,10 @@ impl<'a, ByteBuf: 'a> UtMetadata { } Ok(UtMetadata::Reject(message.piece)) } - other => { - return Err(MessageDeserializeError::Other(anyhow::anyhow!( - "unrecognized ut_metadata message type {}", - other - ))) - } + other => Err(MessageDeserializeError::Other(anyhow::anyhow!( + "unrecognized ut_metadata message type {}", + other + ))), } } }