Skip to content

Update Cargo.toml

Update Cargo.toml #5

Triggered via pull request December 8, 2023 15:16
@ibigbugibigbug
synchronize #1
ibigbug-patch-1
Status Success
Total duration 2m 18s
Artifacts

clippy-check.yml

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

Annotations

17 warnings
the borrowed expression implements the required traits: crates/shadowsocks/src/config.rs#L636
warning: the borrowed expression implements the required traits --> crates/shadowsocks/src/config.rs:636:55 | 636 | URL_PASSWORD_BASE64_ENGINE.encode(&user_info) | ^^^^^^^^^^ help: change this to: `user_info` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
unused import: `self::unix::*`: crates/shadowsocks-service/src/local/redir/sys/mod.rs#L9
warning: unused import: `self::unix::*` --> crates/shadowsocks-service/src/local/redir/sys/mod.rs:9:17 | 9 | pub use self::unix::*; | ^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `self::linux::*`: crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/mod.rs#L6
warning: unused import: `self::linux::*` --> crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/mod.rs:6:17 | 6 | pub use self::linux::*; | ^^^^^^^^^^^^^^
unused import: `self::unix::*`: crates/shadowsocks-service/src/local/redir/tcprelay/sys/mod.rs#L6
warning: unused import: `self::unix::*` --> crates/shadowsocks-service/src/local/redir/tcprelay/sys/mod.rs:6:17 | 6 | pub use self::unix::*; | ^^^^^^^^^^^^^
very complex type used. Consider factoring parts into `type` definitions: crates/shadowsocks-service/src/local/http/http_client.rs#L42
warning: very complex type used. Consider factoring parts into `type` definitions --> crates/shadowsocks-service/src/local/http/http_client.rs:42:17 | 42 | cache_conn: Arc<Mutex<LruCache<Address, VecDeque<(HttpConnection, Instant)>>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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
this expression creates a reference which is immediately dereferenced by the compiler: crates/shadowsocks-service/src/local/http/http_client.rs#L99
warning: this expression creates a reference which is immediately dereferenced by the compiler --> crates/shadowsocks-service/src/local/http/http_client.rs:99:63 | 99 | if let Some(q) = self.cache_conn.lock().await.get_mut(&host) { | ^^^^^ help: change this to: `host` | = 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 OR pattern can be rewritten using a range: src/logging/mod.rs#L58
warning: this OR pattern can be rewritten using a range --> src/logging/mod.rs:58:9 | 58 | 0 | 1 | 2 | 3 => logging_builder | ^^^^^^^^^^^^^ help: try: `0..=3` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns = note: `#[warn(clippy::manual_range_patterns)]` on by default
useless conversion to the same type: `u32`: src/sys.rs#L123
warning: useless conversion to the same type: `u32` --> src/sys.rs:123:42 | 123 | if libc::initgroups(pwd.pw_name, pwd.pw_gid.try_into().unwrap()) != 0 { | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider removing `.try_into()` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
unneeded `return` statement: bin/ssurl.rs#L161
warning: unneeded `return` statement --> bin/ssurl.rs:161:5 | 161 | return ExitCode::FAILURE; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 161 - return ExitCode::FAILURE; 161 + ExitCode::FAILURE |
the borrowed expression implements the required traits: crates/shadowsocks/src/config.rs#L636
warning: the borrowed expression implements the required traits --> crates/shadowsocks/src/config.rs:636:55 | 636 | URL_PASSWORD_BASE64_ENGINE.encode(&user_info) | ^^^^^^^^^^ help: change this to: `user_info` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
unused import: `self::bsd::*`: crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/mod.rs#L13
warning: unused import: `self::bsd::*` --> crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/mod.rs:13:17 | 13 | pub use self::bsd::*; | ^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused import: `self::unix::*`: crates/shadowsocks-service/src/local/redir/tcprelay/sys/mod.rs#L6
warning: unused import: `self::unix::*` --> crates/shadowsocks-service/src/local/redir/tcprelay/sys/mod.rs:6:17 | 6 | pub use self::unix::*; | ^^^^^^^^^^^^^
very complex type used. Consider factoring parts into `type` definitions: crates/shadowsocks-service/src/local/http/http_client.rs#L42
warning: very complex type used. Consider factoring parts into `type` definitions --> crates/shadowsocks-service/src/local/http/http_client.rs:42:17 | 42 | cache_conn: Arc<Mutex<LruCache<Address, VecDeque<(HttpConnection, Instant)>>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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
this expression creates a reference which is immediately dereferenced by the compiler: crates/shadowsocks-service/src/local/http/http_client.rs#L99
warning: this expression creates a reference which is immediately dereferenced by the compiler --> crates/shadowsocks-service/src/local/http/http_client.rs:99:63 | 99 | if let Some(q) = self.cache_conn.lock().await.get_mut(&host) { | ^^^^^ help: change this to: `host` | = 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
use of `offset` with a `usize` casted to an `isize`: crates/shadowsocks-service/src/sys/unix/macos.rs#L62
warning: use of `offset` with a `usize` casted to an `isize` --> crates/shadowsocks-service/src/sys/unix/macos.rs:62:27 | 62 | let fd = *(fds.offset(idx as isize)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fds.add(idx)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default
this OR pattern can be rewritten using a range: src/logging/mod.rs#L58
warning: this OR pattern can be rewritten using a range --> src/logging/mod.rs:58:9 | 58 | 0 | 1 | 2 | 3 => logging_builder | ^^^^^^^^^^^^^ help: try: `0..=3` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns = note: `#[warn(clippy::manual_range_patterns)]` on by default
unneeded `return` statement: bin/ssurl.rs#L161
warning: unneeded `return` statement --> bin/ssurl.rs:161:5 | 161 | return ExitCode::FAILURE; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 161 - return ExitCode::FAILURE; 161 + ExitCode::FAILURE |