Skip to content

feat(local): load servers from remote before running

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

clippy macos-latest

7 warnings

Details

Results

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

Versions

  • rustc 1.80.0-nightly (78a775127 2024-05-11)
  • cargo 1.80.0-nightly (4de0094ac 2024-05-09)
  • clippy 0.1.80 (78a77512 2024-05-11)

Annotations

Check warning on line 1252 in src/service/local.rs

See this annotation in the file changed.

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

this operation has no effect

warning: this operation has no effect
    --> src/service/local.rs:1252:44
     |
1252 |             .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

Check warning on line 1222 in src/service/local.rs

See this annotation in the file changed.

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

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
    --> src/service/local.rs:1222:27
     |
1222 |             ConfigDisplay(&self),
     |                           ^^^^^ help: change this to: `self`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 1203 in src/service/local.rs

See this annotation in the file changed.

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

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
    --> src/service/local.rs:1203:37
     |
1203 |                         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

Check warning on line 1183 in src/service/local.rs

See this annotation in the file changed.

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

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
    --> src/service/local.rs:1183:64
     |
1183 |             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

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 197 in crates/shadowsocks-service/src/local/fake_dns/manager.rs

See this annotation in the file changed.

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

field assignment outside of initializer for an instance created with Default::default()

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

Check warning on line 167 in crates/shadowsocks-service/src/local/fake_dns/manager.rs

See this annotation in the file changed.

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

this operation has no effect

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