From f711ae0f26332975ab06fd89c818f622328038a2 Mon Sep 17 00:00:00 2001 From: Jonathan Dizdarevic Date: Sat, 7 May 2022 10:43:28 +0700 Subject: [PATCH] clippy --- src/server.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server.rs b/src/server.rs index c27fb82..e8e3887 100644 --- a/src/server.rs +++ b/src/server.rs @@ -521,15 +521,15 @@ impl Socks5Socket { /// Execute the socks5 command that the client wants. async fn execute_command(&mut self) -> Result<()> { match &self.cmd { - None => return Err(ReplyError::CommandNotSupported.into()), + None => Err(ReplyError::CommandNotSupported.into()), Some(cmd) => match cmd { - Socks5Command::TCPBind => return Err(ReplyError::CommandNotSupported.into()), + Socks5Command::TCPBind => Err(ReplyError::CommandNotSupported.into()), Socks5Command::TCPConnect => return self.execute_command_connect().await, Socks5Command::UDPAssociate => { if self.config.allow_udp { return self.execute_command_udp_assoc().await; } else { - return Err(ReplyError::CommandNotSupported.into()); + Err(ReplyError::CommandNotSupported.into()) } } }, @@ -772,7 +772,7 @@ fn new_reply(error: &ReplyError, sock_addr: SocketAddr) -> Vec { reply.append(&mut ip_oct); reply.append(&mut port); - return reply; + reply } #[cfg(test)]