Skip to content

feat(shadowsocks): ServerConfig::new returns Result #1335

feat(shadowsocks): ServerConfig::new returns Result

feat(shadowsocks): ServerConfig::new returns Result #1335

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

clippy ubuntu-latest

2 warnings

Details

Results

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

Versions

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check warning on line 486 in crates/shadowsocks-service/src/manager/server.rs

See this annotation in the file changed.

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

useless use of `format!`

warning: useless use of `format!`
   --> crates/shadowsocks-service/src/manager/server.rs:486:39
    |
486 |                 return Ok(AddResponse(format!("invalid server")));
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"invalid server".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `#[warn(clippy::useless_format)]` on by default

Check warning on line 486 in crates/shadowsocks/src/config.rs

See this annotation in the file changed.

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

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> crates/shadowsocks/src/config.rs:486:60
    |
486 | fn password_to_keys<P>(method: CipherKind, password: P) -> Result<(String, Box<[u8]>, Vec<Bytes>), ServerConfigError>
    |                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `#[warn(clippy::type_complexity)]` on by default