fix(deps): update rust crate bytes to v1.9.0 (#1787) #966
Annotations
34 warnings
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L99
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks-service/src/local/tun/virt_device.rs:99:6
|
99 | impl<'a> phy::TxToken for VirtTxToken<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
99 - impl<'a> phy::TxToken for VirtTxToken<'a> {
99 + impl phy::TxToken for VirtTxToken<'_> {
|
|
unneeded `return` statement:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L75
warning: unneeded `return` statement
--> crates/shadowsocks-service/src/local/tun/virt_device.rs:75:9
|
75 | return Some(VirtTxToken(self));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
75 - return Some(VirtTxToken(self));
75 + Some(VirtTxToken(self))
|
|
manual arithmetic check found:
crates/shadowsocks-service/src/local/socks/client/socks5/udp_client.rs#L73
warning: manual arithmetic check found
--> crates/shadowsocks-service/src/local/socks/client/socks5/udp_client.rs:73:12
|
73 | Ok(if n <= header_len { 0 } else { n - header_len })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n.saturating_sub(header_len)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub
= note: `#[warn(clippy::implicit_saturating_sub)]` on by default
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L163
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:163:6
|
163 | impl<'a, S: DatagramSend + ?Sized> Future for SendReadyFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
163 - impl<'a, S: DatagramSend + ?Sized> Future for SendReadyFut<'a, S> {
163 + impl<S: DatagramSend + ?Sized> Future for SendReadyFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L150
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:150:6
|
150 | impl<'a, S: DatagramSend + ?Sized> Future for SendToFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
150 - impl<'a, S: DatagramSend + ?Sized> Future for SendToFut<'a, S> {
150 + impl<S: DatagramSend + ?Sized> Future for SendToFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L135
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:135:6
|
135 | impl<'a, S: DatagramSend + ?Sized> Future for SendFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
135 - impl<'a, S: DatagramSend + ?Sized> Future for SendFut<'a, S> {
135 + impl<S: DatagramSend + ?Sized> Future for SendFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L121
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:121:6
|
121 | impl<'a, S: DatagramReceive + ?Sized> Future for RecvReadyFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
121 - impl<'a, S: DatagramReceive + ?Sized> Future for RecvReadyFut<'a, S> {
121 + impl<S: DatagramReceive + ?Sized> Future for RecvReadyFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L104
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:104:6
|
104 | impl<'a, S: DatagramReceive + ?Sized> Future for RecvFromFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
104 - impl<'a, S: DatagramReceive + ?Sized> Future for RecvFromFut<'a, S> {
104 + impl<S: DatagramReceive + ?Sized> Future for RecvFromFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L84
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:84:6
|
84 | impl<'a, S: DatagramReceive + ?Sized> Future for RecvFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
84 - impl<'a, S: DatagramReceive + ?Sized> Future for RecvFut<'a, S> {
84 + impl<S: DatagramReceive + ?Sized> Future for RecvFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/utils.rs#L243
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/utils.rs:243:6
|
243 | impl<'a, A, B> Future for CopyBidirectional<'a, A, B>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
243 - impl<'a, A, B> Future for CopyBidirectional<'a, A, B>
243 + impl<A, B> Future for CopyBidirectional<'_, A, B>
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/mod.rs#L89
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/mod.rs:89:6
|
89 | impl<'a> TcpRequestHeaderRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
89 - impl<'a> TcpRequestHeaderRef<'a> {
89 + impl TcpRequestHeaderRef<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v2.rs#L75
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v2.rs:75:6
|
75 | impl<'a> Aead2022TcpRequestHeaderRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
75 - impl<'a> Aead2022TcpRequestHeaderRef<'a> {
75 + impl Aead2022TcpRequestHeaderRef<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v1.rs#L36
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v1.rs:36:6
|
36 | impl<'a> StreamTcpRequestHeaderRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
36 - impl<'a> StreamTcpRequestHeaderRef<'a> {
36 + impl StreamTcpRequestHeaderRef<'_> {
|
|
the following explicit lifetimes could be elided: 'x, 'y:
crates/shadowsocks/src/dns_resolver/resolver.rs#L318
warning: the following explicit lifetimes could be elided: 'x, 'y
--> crates/shadowsocks/src/dns_resolver/resolver.rs:318:14
|
318 | impl<'x, 'y> Drop for ResolverLogger<'x, 'y> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
318 - impl<'x, 'y> Drop for ResolverLogger<'x, 'y> {
318 + impl Drop for ResolverLogger<'_, '_> {
|
|
the following explicit lifetimes could be elided: 'de:
crates/shadowsocks/src/config.rs#L1262
warning: the following explicit lifetimes could be elided: 'de
--> crates/shadowsocks/src/config.rs:1262:6
|
1262 | impl<'de> serde::de::Visitor<'de> for ManagerAddrVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1262 - impl<'de> serde::de::Visitor<'de> for ManagerAddrVisitor {
1262 + impl serde::de::Visitor<'_> for ManagerAddrVisitor {
|
|
the following explicit lifetimes could be elided: 'de:
crates/shadowsocks/src/config.rs#L1081
warning: the following explicit lifetimes could be elided: 'de
--> crates/shadowsocks/src/config.rs:1081:6
|
1081 | impl<'de> serde::de::Visitor<'de> for ServerAddrVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1081 - impl<'de> serde::de::Visitor<'de> for ServerAddrVisitor {
1081 + impl serde::de::Visitor<'_> for ServerAddrVisitor {
|
|
the following explicit lifetimes could be elided: 'de:
crates/shadowsocks/src/config.rs#L132
warning: the following explicit lifetimes could be elided: 'de
--> crates/shadowsocks/src/config.rs:132:6
|
132 | impl<'de> serde::de::Visitor<'de> for ModeVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
132 - impl<'de> serde::de::Visitor<'de> for ModeVisitor {
132 + impl serde::de::Visitor<'_> for ModeVisitor {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L99
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks-service/src/local/tun/virt_device.rs:99:6
|
99 | impl<'a> phy::TxToken for VirtTxToken<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
99 - impl<'a> phy::TxToken for VirtTxToken<'a> {
99 + impl phy::TxToken for VirtTxToken<'_> {
|
|
unneeded `return` statement:
crates/shadowsocks-service/src/local/tun/virt_device.rs#L75
warning: unneeded `return` statement
--> crates/shadowsocks-service/src/local/tun/virt_device.rs:75:9
|
75 | return Some(VirtTxToken(self));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
75 - return Some(VirtTxToken(self));
75 + Some(VirtTxToken(self))
|
|
manual arithmetic check found:
crates/shadowsocks-service/src/local/socks/client/socks5/udp_client.rs#L73
warning: manual arithmetic check found
--> crates/shadowsocks-service/src/local/socks/client/socks5/udp_client.rs:73:12
|
73 | Ok(if n <= header_len { 0 } else { n - header_len })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n.saturating_sub(header_len)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub
= note: `#[warn(clippy::implicit_saturating_sub)]` on by default
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L163
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:163:6
|
163 | impl<'a, S: DatagramSend + ?Sized> Future for SendReadyFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
163 - impl<'a, S: DatagramSend + ?Sized> Future for SendReadyFut<'a, S> {
163 + impl<S: DatagramSend + ?Sized> Future for SendReadyFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L150
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:150:6
|
150 | impl<'a, S: DatagramSend + ?Sized> Future for SendToFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
150 - impl<'a, S: DatagramSend + ?Sized> Future for SendToFut<'a, S> {
150 + impl<S: DatagramSend + ?Sized> Future for SendToFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L135
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:135:6
|
135 | impl<'a, S: DatagramSend + ?Sized> Future for SendFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
135 - impl<'a, S: DatagramSend + ?Sized> Future for SendFut<'a, S> {
135 + impl<S: DatagramSend + ?Sized> Future for SendFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L121
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:121:6
|
121 | impl<'a, S: DatagramReceive + ?Sized> Future for RecvReadyFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
121 - impl<'a, S: DatagramReceive + ?Sized> Future for RecvReadyFut<'a, S> {
121 + impl<S: DatagramReceive + ?Sized> Future for RecvReadyFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L104
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:104:6
|
104 | impl<'a, S: DatagramReceive + ?Sized> Future for RecvFromFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
104 - impl<'a, S: DatagramReceive + ?Sized> Future for RecvFromFut<'a, S> {
104 + impl<S: DatagramReceive + ?Sized> Future for RecvFromFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/udprelay/compat.rs#L84
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/udprelay/compat.rs:84:6
|
84 | impl<'a, S: DatagramReceive + ?Sized> Future for RecvFut<'a, S> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
84 - impl<'a, S: DatagramReceive + ?Sized> Future for RecvFut<'a, S> {
84 + impl<S: DatagramReceive + ?Sized> Future for RecvFut<'_, S> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/utils.rs#L243
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/utils.rs:243:6
|
243 | impl<'a, A, B> Future for CopyBidirectional<'a, A, B>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
243 - impl<'a, A, B> Future for CopyBidirectional<'a, A, B>
243 + impl<A, B> Future for CopyBidirectional<'_, A, B>
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/mod.rs#L89
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/mod.rs:89:6
|
89 | impl<'a> TcpRequestHeaderRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
89 - impl<'a> TcpRequestHeaderRef<'a> {
89 + impl TcpRequestHeaderRef<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v2.rs#L75
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v2.rs:75:6
|
75 | impl<'a> Aead2022TcpRequestHeaderRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
75 - impl<'a> Aead2022TcpRequestHeaderRef<'a> {
75 + impl Aead2022TcpRequestHeaderRef<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v1.rs#L36
warning: the following explicit lifetimes could be elided: 'a
--> crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v1.rs:36:6
|
36 | impl<'a> StreamTcpRequestHeaderRef<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
36 - impl<'a> StreamTcpRequestHeaderRef<'a> {
36 + impl StreamTcpRequestHeaderRef<'_> {
|
|
the following explicit lifetimes could be elided: 'x, 'y:
crates/shadowsocks/src/dns_resolver/resolver.rs#L318
warning: the following explicit lifetimes could be elided: 'x, 'y
--> crates/shadowsocks/src/dns_resolver/resolver.rs:318:14
|
318 | impl<'x, 'y> Drop for ResolverLogger<'x, 'y> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
318 - impl<'x, 'y> Drop for ResolverLogger<'x, 'y> {
318 + impl Drop for ResolverLogger<'_, '_> {
|
|
the following explicit lifetimes could be elided: 'de:
crates/shadowsocks/src/config.rs#L1262
warning: the following explicit lifetimes could be elided: 'de
--> crates/shadowsocks/src/config.rs:1262:6
|
1262 | impl<'de> serde::de::Visitor<'de> for ManagerAddrVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1262 - impl<'de> serde::de::Visitor<'de> for ManagerAddrVisitor {
1262 + impl serde::de::Visitor<'_> for ManagerAddrVisitor {
|
|
the following explicit lifetimes could be elided: 'de:
crates/shadowsocks/src/config.rs#L1081
warning: the following explicit lifetimes could be elided: 'de
--> crates/shadowsocks/src/config.rs:1081:6
|
1081 | impl<'de> serde::de::Visitor<'de> for ServerAddrVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1081 - impl<'de> serde::de::Visitor<'de> for ServerAddrVisitor {
1081 + impl serde::de::Visitor<'_> for ServerAddrVisitor {
|
|
the following explicit lifetimes could be elided: 'de:
crates/shadowsocks/src/config.rs#L132
warning: the following explicit lifetimes could be elided: 'de
--> crates/shadowsocks/src/config.rs:132:6
|
132 | impl<'de> serde::de::Visitor<'de> for ModeVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
132 - impl<'de> serde::de::Visitor<'de> for ModeVisitor {
132 + impl serde::de::Visitor<'_> for ModeVisitor {
|
|