make clippy happy

This commit is contained in:
zonyitoo
2022-03-29 13:04:18 +08:00
parent 6dee125baf
commit 69cc4d1be9
6 changed files with 14 additions and 11 deletions
Generated
+3 -3
View File
@@ -1999,7 +1999,7 @@ dependencies = [
[[package]]
name = "shadowsocks"
version = "1.14.1"
version = "1.14.2"
dependencies = [
"arc-swap 1.5.0",
"async-trait",
@@ -2054,7 +2054,7 @@ dependencies = [
[[package]]
name = "shadowsocks-rust"
version = "1.14.2"
version = "1.14.3"
dependencies = [
"build-time",
"byte_string",
@@ -2087,7 +2087,7 @@ dependencies = [
[[package]]
name = "shadowsocks-service"
version = "1.14.2"
version = "1.14.3"
dependencies = [
"arc-swap 1.5.0",
"async-trait",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "shadowsocks-rust"
version = "1.14.2"
version = "1.14.3"
authors = ["Shadowsocks Contributors"]
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
repository = "https://github.com/shadowsocks/shadowsocks-rust"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "shadowsocks-service"
version = "1.14.2"
version = "1.14.3"
authors = ["Shadowsocks Contributors"]
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
repository = "https://github.com/shadowsocks/shadowsocks-rust"
@@ -99,10 +99,10 @@ impl Socks5TcpHandler {
trace!("reply handshake {:?}", resp);
return Err(Error::new(
Err(Error::new(
ErrorKind::Other,
"currently shadowsocks-rust does not support authentication",
));
))
}
async fn check_auth_password(&self, stream: &mut TcpStream) -> io::Result<()> {
@@ -171,13 +171,13 @@ impl Socks5TcpHandler {
user_name, password
);
return Err(Error::new(
Err(Error::new(
ErrorKind::Other,
format!(
"Username/Password Authentication failed, user: {}, password: {}",
user_name, password
),
));
))
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "shadowsocks"
version = "1.14.1"
version = "1.14.2"
authors = ["Shadowsocks Contributors"]
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
repository = "https://github.com/shadowsocks/shadowsocks-rust"
+4 -1
View File
@@ -826,7 +826,10 @@ impl PasswdAuthRequest {
let uname = uname.into();
let passwd = passwd.into();
assert!(
uname.len() > 0 && uname.len() <= u8::MAX as usize && passwd.len() > 0 && passwd.len() <= u8::MAX as usize
!uname.is_empty()
&& uname.len() <= u8::MAX as usize
&& !passwd.is_empty()
&& passwd.len() <= u8::MAX as usize
);
PasswdAuthRequest { uname, passwd }