Skip to content

chore: dependabot checks daily #1488

chore: dependabot checks daily

chore: dependabot checks daily #1488

Triggered via push September 22, 2024 00:41
Status Success
Total duration 2m 45s
Artifacts

clippy-check.yml

on: push
Matrix: clippy-check
Fit to window
Zoom out
Zoom in

Annotations

32 warnings
transmute used without annotations: crates/shadowsocks-service/src/local/tun/tcp.rs#L172
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
unnecessary closure used to substitute value for `Option::None`: crates/shadowsocks-service/src/local/socks/server/mod.rs#L114
warning: unnecessary closure used to substitute value for `Option::None` --> crates/shadowsocks-service/src/local/socks/server/mod.rs:114:46 | 114 | let udp_associate_addr: ServerAddr = self | ______________________________________________^ 115 | | .udp_associate_addr 116 | | .as_ref() 117 | | .or_else(|| self.udp_bind_addr.as_ref()) | |______________--------------------------------------^ | | | help: use `or(..)` instead: `or(self.udp_bind_addr.as_ref())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: crates/shadowsocks-service/src/local/socks/server/mod.rs#L114
warning: unnecessary closure used to substitute value for `Option::None` --> crates/shadowsocks-service/src/local/socks/server/mod.rs:114:46 | 114 | let udp_associate_addr: ServerAddr = self | ______________________________________________^ 115 | | .udp_associate_addr 116 | | .as_ref() 117 | | .or_else(|| self.udp_bind_addr.as_ref()) 118 | | .unwrap_or_else(|| &self.client_config) | |______________-------------------------------------^ | | | help: use `unwrap_or(..)` instead: `unwrap_or(&self.client_config)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
this `match` can be collapsed into the outer `if let`: crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/linux.rs#L77
warning: this `match` can be collapsed into the outer `if let` --> crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/linux.rs:77:21 | 77 | / match errno { 78 | | libc::ENOPROTOOPT => { 79 | | // SO_REUSEPORT is supported after 3.9 80 | | trace!("failed to set SO_REUSEPORT, error: {}", err); ... | 85 | | } 86 | | } | |_____________________^ | help: the outer pattern can be modified to include the inner pattern --> crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/linux.rs:76:29 | 76 | if let Some(errno) = err.raw_os_error() { | ^^^^^ replace this binding 77 | match errno { 78 | libc::ENOPROTOOPT => { | ^^^^^^^^^^^^^^^^^ with this pattern = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match = note: `#[warn(clippy::collapsible_match)]` on by default
transmute used without annotations: crates/shadowsocks-service/src/local/tun/tcp.rs#L172
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
casting the result of `i32::abs()` to u32: crates/shadowsocks-service/src/local/loadbalancing/server_stat.rs#L191
warning: casting the result of `i32::abs()` to u32 --> crates/shadowsocks-service/src/local/loadbalancing/server_stat.rs:191:30 | 191 | .map(|s| (*s as i32 - self.data.latency_median as i32).abs() as u32) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(*s as i32 - self.data.latency_median as i32).unsigned_abs()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default
unnecessary closure used to substitute value for `Option::None`: crates/shadowsocks-service/src/local/socks/server/mod.rs#L114
warning: unnecessary closure used to substitute value for `Option::None` --> crates/shadowsocks-service/src/local/socks/server/mod.rs:114:46 | 114 | let udp_associate_addr: ServerAddr = self | ______________________________________________^ 115 | | .udp_associate_addr 116 | | .as_ref() 117 | | .or_else(|| self.udp_bind_addr.as_ref()) | |______________--------------------------------------^ | | | help: use `or(..)` instead: `or(self.udp_bind_addr.as_ref())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
unnecessary closure used to substitute value for `Option::None`: crates/shadowsocks-service/src/local/socks/server/mod.rs#L114
warning: unnecessary closure used to substitute value for `Option::None` --> crates/shadowsocks-service/src/local/socks/server/mod.rs:114:46 | 114 | let udp_associate_addr: ServerAddr = self | ______________________________________________^ 115 | | .udp_associate_addr 116 | | .as_ref() 117 | | .or_else(|| self.udp_bind_addr.as_ref()) 118 | | .unwrap_or_else(|| &self.client_config) | |______________-------------------------------------^ | | | help: use `unwrap_or(..)` instead: `unwrap_or(&self.client_config)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
using `clone` on type `ServerStatData` which implements the `Copy` trait: crates/shadowsocks-service/src/local/loadbalancing/server_data.rs#L69
warning: using `clone` on type `ServerStatData` which implements the `Copy` trait --> crates/shadowsocks-service/src/local/loadbalancing/server_data.rs:69:9 | 69 | self.stat_data.lock().await.data().clone() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.stat_data.lock().await.data()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
this `match` can be collapsed into the outer `if let`: crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/macos.rs#L58
warning: this `match` can be collapsed into the outer `if let` --> crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/macos.rs:58:21 | 58 | / match errno { 59 | | libc::ENOPROTOOPT => { 60 | | trace!("failed to set SO_REUSEPORT, error: {}", err); 61 | | } ... | 65 | | } 66 | | } | |_____________________^ | help: the outer pattern can be modified to include the inner pattern --> crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/macos.rs:57:29 | 57 | if let Some(errno) = err.raw_os_error() { | ^^^^^ replace this binding 58 | match errno { 59 | libc::ENOPROTOOPT => { | ^^^^^^^^^^^^^^^^^ with this pattern = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match = note: `#[warn(clippy::collapsible_match)]` on by default
using `clone` on type `ServerStatData` which implements the `Copy` trait: crates/shadowsocks-service/src/local/loadbalancing/server_data.rs#L56
warning: using `clone` on type `ServerStatData` which implements the `Copy` trait --> crates/shadowsocks-service/src/local/loadbalancing/server_data.rs:56:38 | 56 | (stat.push_score(score), stat.data().clone()) | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*stat.data()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
casting the result of `i32::abs()` to u32: crates/shadowsocks-service/src/local/loadbalancing/server_stat.rs#L191
warning: casting the result of `i32::abs()` to u32 --> crates/shadowsocks-service/src/local/loadbalancing/server_stat.rs:191:30 | 191 | .map(|s| (*s as i32 - self.data.latency_median as i32).abs() as u32) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(*s as i32 - self.data.latency_median as i32).unsigned_abs()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default
redundant pattern matching, consider using `is_ok()`: crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs#L919
warning: redundant pattern matching, consider using `is_ok()` --> crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs:919:16 | 919 | if let Ok(..) = response.parse(&buf) { | -------^^^^^^----------------------- help: try: `if response.parse(&buf).is_ok()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
using `clone` on type `ServerStatData` which implements the `Copy` trait: crates/shadowsocks-service/src/local/loadbalancing/server_data.rs#L69
warning: using `clone` on type `ServerStatData` which implements the `Copy` trait --> crates/shadowsocks-service/src/local/loadbalancing/server_data.rs:69:9 | 69 | self.stat_data.lock().await.data().clone() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.stat_data.lock().await.data()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
redundant pattern matching, consider using `is_ok()`: crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs#L878
warning: redundant pattern matching, consider using `is_ok()` --> crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs:878:16 | 878 | if let Ok(..) = response.parse(&buf) { | -------^^^^^^----------------------- help: try: `if response.parse(&buf).is_ok()` | = 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
using `clone` on type `ServerStatData` which implements the `Copy` trait: crates/shadowsocks-service/src/local/loadbalancing/server_data.rs#L56
warning: using `clone` on type `ServerStatData` which implements the `Copy` trait --> crates/shadowsocks-service/src/local/loadbalancing/server_data.rs:56:38 | 56 | (stat.push_score(score), stat.data().clone()) | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*stat.data()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
the following explicit lifetimes could be elided: 'a: crates/shadowsocks/src/relay/udprelay/compat.rs#L204
warning: the following explicit lifetimes could be elided: 'a --> crates/shadowsocks/src/relay/udprelay/compat.rs:204:19 | 204 | fn send_ready<'a>(&'a self) -> SendReadyFut<'a, Self> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 204 - fn send_ready<'a>(&'a self) -> SendReadyFut<'a, Self> { 204 + fn send_ready(&self) -> SendReadyFut<'_, Self> { |
redundant pattern matching, consider using `is_ok()`: crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs#L919
warning: redundant pattern matching, consider using `is_ok()` --> crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs:919:16 | 919 | if let Ok(..) = response.parse(&buf) { | -------^^^^^^----------------------- help: try: `if response.parse(&buf).is_ok()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
the following explicit lifetimes could be elided: 'a: crates/shadowsocks/src/relay/udprelay/compat.rs#L184
warning: the following explicit lifetimes could be elided: 'a --> crates/shadowsocks/src/relay/udprelay/compat.rs:184:19 | 184 | fn recv_ready<'a>(&'a self) -> RecvReadyFut<'a, Self> { | ^^ ^^ ^^ | = 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 | 184 - fn recv_ready<'a>(&'a self) -> RecvReadyFut<'a, Self> { 184 + fn recv_ready(&self) -> RecvReadyFut<'_, Self> { |
redundant pattern matching, consider using `is_ok()`: crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs#L878
warning: redundant pattern matching, consider using `is_ok()` --> crates/shadowsocks-service/src/local/loadbalancing/ping_balancer.rs:878:16 | 878 | if let Ok(..) = response.parse(&buf) { | -------^^^^^^----------------------- help: try: `if response.parse(&buf).is_ok()` | = 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
this lifetime isn't used in the function definition: crates/shadowsocks/src/relay/udprelay/compat.rs#L179
warning: this lifetime isn't used in the function definition --> crates/shadowsocks/src/relay/udprelay/compat.rs:179:22 | 179 | fn recv_from<'a, 'b>(&'a self, buf: &'a mut [u8]) -> RecvFromFut<'a, Self> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
the following explicit lifetimes could be elided: 'a: crates/shadowsocks/src/relay/udprelay/compat.rs#L204
warning: the following explicit lifetimes could be elided: 'a --> crates/shadowsocks/src/relay/udprelay/compat.rs:204:19 | 204 | fn send_ready<'a>(&'a self) -> SendReadyFut<'a, Self> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 204 - fn send_ready<'a>(&'a self) -> SendReadyFut<'a, Self> { 204 + fn send_ready(&self) -> SendReadyFut<'_, Self> { |
this lifetime isn't used in the function definition: crates/shadowsocks/src/relay/udprelay/compat.rs#L174
warning: this lifetime isn't used in the function definition --> crates/shadowsocks/src/relay/udprelay/compat.rs:174:17 | 174 | fn recv<'a, 'b>(&'a self, buf: &'a mut [u8]) -> RecvFut<'a, Self> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
the following explicit lifetimes could be elided: 'a: crates/shadowsocks/src/relay/udprelay/compat.rs#L184
warning: the following explicit lifetimes could be elided: 'a --> crates/shadowsocks/src/relay/udprelay/compat.rs:184:19 | 184 | fn recv_ready<'a>(&'a self) -> RecvReadyFut<'a, Self> { | ^^ ^^ ^^ | = 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 | 184 - fn recv_ready<'a>(&'a self) -> RecvReadyFut<'a, Self> { 184 + fn recv_ready(&self) -> RecvReadyFut<'_, Self> { |
this lifetime isn't used in the function definition: crates/shadowsocks/src/relay/udprelay/compat.rs#L179
warning: this lifetime isn't used in the function definition --> crates/shadowsocks/src/relay/udprelay/compat.rs:179:22 | 179 | fn recv_from<'a, 'b>(&'a self, buf: &'a mut [u8]) -> RecvFromFut<'a, Self> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
this lifetime isn't used in the function definition: crates/shadowsocks/src/relay/udprelay/compat.rs#L174
warning: this lifetime isn't used in the function definition --> crates/shadowsocks/src/relay/udprelay/compat.rs:174:17 | 174 | fn recv<'a, 'b>(&'a self, buf: &'a mut [u8]) -> RecvFut<'a, Self> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
clippy-check (macos-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy-check (macos-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
clippy-check (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy-check (ubuntu-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
clippy-check (windows-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy-check (windows-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/