Skip to content

chore(shadowsocks-service): smoltcp v0.12 uses libcore Ipv4Addr, Ipv6… #173

chore(shadowsocks-service): smoltcp v0.12 uses libcore Ipv4Addr, Ipv6…

chore(shadowsocks-service): smoltcp v0.12 uses libcore Ipv4Addr, Ipv6… #173

GitHub Actions / clippy ubuntu-latest succeeded Nov 28, 2024 in 0s

clippy ubuntu-latest

15 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 15
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 73 in crates/shadowsocks-service/src/local/socks/client/socks5/udp_client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

manual arithmetic check found

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

Check warning on line 163 in crates/shadowsocks/src/relay/udprelay/compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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> {
    |

Check warning on line 150 in crates/shadowsocks/src/relay/udprelay/compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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> {
    |

Check warning on line 135 in crates/shadowsocks/src/relay/udprelay/compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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> {
    |

Check warning on line 121 in crates/shadowsocks/src/relay/udprelay/compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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> {
    |

Check warning on line 104 in crates/shadowsocks/src/relay/udprelay/compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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> {
    |

Check warning on line 84 in crates/shadowsocks/src/relay/udprelay/compat.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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> {
   |

Check warning on line 243 in crates/shadowsocks/src/relay/tcprelay/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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>
    |

Check warning on line 89 in crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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<'_> {
   |

Check warning on line 75 in crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v2.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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<'_> {
   |

Check warning on line 36 in crates/shadowsocks/src/relay/tcprelay/proxy_stream/protocol/v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'a

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<'_> {
   |

Check warning on line 318 in crates/shadowsocks/src/dns_resolver/resolver.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'x, 'y

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<'_, '_> {
    |

Check warning on line 1262 in crates/shadowsocks/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'de

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 {
     |

Check warning on line 1081 in crates/shadowsocks/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'de

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 {
     |

Check warning on line 132 in crates/shadowsocks/src/config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy ubuntu-latest

the following explicit lifetimes could be elided: 'de

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 {
    |