Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dizda committed May 7, 2022
1 parent fa02cea commit f711ae0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,15 +521,15 @@ impl<T: AsyncRead + AsyncWrite + Unpin> Socks5Socket<T> {
/// 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())
}
}
},
Expand Down Expand Up @@ -772,7 +772,7 @@ fn new_reply(error: &ReplyError, sock_addr: SocketAddr) -> Vec<u8> {
reply.append(&mut ip_oct);
reply.append(&mut port);

return reply;
reply
}

#[cfg(test)]
Expand Down

0 comments on commit f711ae0

Please sign in to comment.