Skip to content

feat(shadowsocks): IpStackCapability check Ipv4-mapped-Ipv6 by connect()

Sign in for the full log view
GitHub Actions / clippy macos-latest succeeded Jun 16, 2024 in 0s

clippy macos-latest

5 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 5
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 (129f3b99 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 macos-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 macos-latest

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:171:12
    |
171 |     if let Ok(..) = check_ipv4_mapped_ipv6_capability() {
    |     -------^^^^^^-------------------------------------- help: try: `if check_ipv4_mapped_ipv6_capability().is_ok()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching

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

See this annotation in the file changed.

@github-actions github-actions / clippy macos-latest

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:163:20
    |
163 |             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 161 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macos-latest

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:161:16
    |
161 |         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 154 in crates/shadowsocks/src/net/sys/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy macos-latest

redundant pattern matching, consider using `is_ok()`

warning: redundant pattern matching, consider using `is_ok()`
   --> crates/shadowsocks/src/net/sys/mod.rs:154:12
    |
154 |     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