Skip to content

feat(local-redir, server): Check IP stack capability globally #1127

feat(local-redir, server): Check IP stack capability globally

feat(local-redir, server): Check IP stack capability globally #1127

GitHub Actions / clippy ubuntu-latest succeeded Jun 16, 2024 in 0s

clippy ubuntu-latest

6 warnings

Details

Results

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

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 172 in crates/shadowsocks-service/src/local/tun/tcp.rs

See this annotation in the file changed.

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

transmute used without annotations

warning: transmute used without annotations
   --> crates/shadowsocks-service/src/local/tun/tcp.rs:172:38
    |
172 |         let recv_buf = unsafe { mem::transmute::<_, &mut [u8]>(buf.unfilled_mut()) };
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<&mut [std::mem::MaybeUninit<u8>], &mut [u8]>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
    = note: `#[warn(clippy::missing_transmute_annotations)]` on by default

Check warning on line 171 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

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

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:171:20
    |
171 |             if let Ok(..) = ipv6_socket.bind(&local_host) {
    |             -------^^^^^^-------------------------------- help: try: `if ipv6_socket.bind(&local_host).is_ok()`
    |
    = note: this will change drop order of the result, as well as all temporaries
    = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

Check warning on line 169 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

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

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:169:16
    |
169 |         if let Ok(..) = ipv6_socket.set_only_v6(false) {
    |         -------^^^^^^--------------------------------- help: try: `if ipv6_socket.set_only_v6(false).is_ok()`
    |
    = note: this will change drop order of the result, as well as all temporaries
    = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

Check warning on line 161 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

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

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:161:20
    |
161 |             if let Ok(..) = ipv6_socket.bind(&local_host) {
    |             -------^^^^^^-------------------------------- help: try: `if ipv6_socket.bind(&local_host).is_ok()`
    |
    = note: this will change drop order of the result, as well as all temporaries
    = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

Check warning on line 159 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

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

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:159:16
    |
159 |         if let Ok(..) = ipv6_socket.set_only_v6(true) {
    |         -------^^^^^^-------------------------------- help: try: `if ipv6_socket.set_only_v6(true).is_ok()`
    |
    = note: this will change drop order of the result, as well as all temporaries
    = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

Check warning on line 153 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

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

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:153:12
    |
153 |     if let Ok(_) = Socket::new(Domain::IPV4, Type::STREAM, Some(Protocol::TCP)) {
    |     -------^^^^^--------------------------------------------------------------- help: try: `if Socket::new(Domain::IPV4, Type::STREAM, Some(Protocol::TCP)).is_ok()`
    |
    = note: this will change drop order of the result, as well as all temporaries
    = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
    = note: `#[warn(clippy::redundant_pattern_matching)]` on by default