Skip to content

feat(local): online_config handled only in binary #1133

feat(local): online_config handled only in binary

feat(local): online_config handled only in binary #1133

Triggered via push May 13, 2024 15:28
Status Success
Total duration 4m 38s
Artifacts

clippy-check.yml

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

Annotations

20 warnings
this operation has no effect: src/service/local.rs#L1256
warning: this operation has no effect --> src/service/local.rs:1256:44 | 1256 | .unwrap_or(Duration::from_secs(1 * 60 * 60)); | ^^^^^^ help: consider reducing it to: `60` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op = note: `#[warn(clippy::identity_op)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/service/local.rs#L1226
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/service/local.rs:1226:27 | 1226 | ConfigDisplay(&self), | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/service/local.rs#L1207
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/service/local.rs:1207:37 | 1207 | f.write_str(&online_config_url)?; | ^^^^^^^^^^^^^^^^^^ help: change this to: `online_config_url` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/service/local.rs#L1186
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/service/local.rs:1186:64 | 1186 | let mut online_servers = get_online_config_servers(&online_config_url).await?; | ^^^^^^^^^^^^^^^^^^ help: change this to: `online_config_url` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this comparison involving the minimum or maximum element for this type contains a case that is always true or always false: crates/shadowsocks-service/src/local/tun/mod.rs#L201
warning: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false --> crates/shadowsocks-service/src/local/tun/mod.rs:201:24 | 201 | if n <= IFF_PI_PREFIX_LEN { | ^^^^^^^^^^^^^^^^^^^^^^ | = help: because `IFF_PI_PREFIX_LEN` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `n == IFF_PI_PREFIX_LEN` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons = note: requested on the command line with `-W clippy::absurd-extreme-comparisons`
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
field assignment outside of initializer for an instance created with Default::default(): crates/shadowsocks-service/src/local/fake_dns/manager.rs#L197
warning: field assignment outside of initializer for an instance created with Default::default() --> crates/shadowsocks-service/src/local/fake_dns/manager.rs:197:13 | 197 | c.ipv4_network = ipv4_network_str; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `local::fake_dns::proto::StorageMeta { ipv4_network: ipv4_network_str, ipv6_network: ipv6_network_str, version: FAKE_DNS_MANAGER_STORAGE_VERSION }` and removing relevant reassignments --> crates/shadowsocks-service/src/local/fake_dns/manager.rs:196:13 | 196 | let mut c = proto::StorageMeta::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `#[warn(clippy::field_reassign_with_default)]` on by default
clippy-check (ubuntu-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
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/
this operation has no effect: src/service/local.rs#L1256
warning: this operation has no effect --> src/service/local.rs:1256:44 | 1256 | .unwrap_or(Duration::from_secs(1 * 60 * 60)); | ^^^^^^ help: consider reducing it to: `60` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op = note: `#[warn(clippy::identity_op)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/service/local.rs#L1226
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/service/local.rs:1226:27 | 1226 | ConfigDisplay(&self), | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/service/local.rs#L1207
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/service/local.rs:1207:37 | 1207 | f.write_str(&online_config_url)?; | ^^^^^^^^^^^^^^^^^^ help: change this to: `online_config_url` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/service/local.rs#L1186
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/service/local.rs:1186:64 | 1186 | let mut online_servers = get_online_config_servers(&online_config_url).await?; | ^^^^^^^^^^^^^^^^^^ help: change this to: `online_config_url` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` 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
field assignment outside of initializer for an instance created with Default::default(): crates/shadowsocks-service/src/local/fake_dns/manager.rs#L197
warning: field assignment outside of initializer for an instance created with Default::default() --> crates/shadowsocks-service/src/local/fake_dns/manager.rs:197:13 | 197 | c.ipv4_network = ipv4_network_str; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `local::fake_dns::proto::StorageMeta { ipv4_network: ipv4_network_str, ipv6_network: ipv6_network_str, version: FAKE_DNS_MANAGER_STORAGE_VERSION }` and removing relevant reassignments --> crates/shadowsocks-service/src/local/fake_dns/manager.rs:196:13 | 196 | let mut c = proto::StorageMeta::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `#[warn(clippy::field_reassign_with_default)]` on by default
this operation has no effect: crates/shadowsocks-service/src/local/fake_dns/manager.rs#L167
warning: this operation has no effect --> crates/shadowsocks-service/src/local/fake_dns/manager.rs:167:34 | 167 | .flush_every_ms(Some(1 * 1000)) | ^^^^^^^^ help: consider reducing it to: `1000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op = note: `#[warn(clippy::identity_op)]` on by default
clippy-check (macos-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
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 (windows-latest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
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/