[INFO] cloning repository https://github.com/elsvv/rustzban-node [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/elsvv/rustzban-node" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felsvv%2Frustzban-node", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felsvv%2Frustzban-node'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5ce05160d0e4b0df0b7d312cac6debfd71f0b252 [INFO] linting elsvv/rustzban-node against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Felsvv%2Frustzban-node" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/elsvv/rustzban-node [INFO] finished tweaking git repo https://github.com/elsvv/rustzban-node [INFO] tweaked toml for git repo https://github.com/elsvv/rustzban-node written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/elsvv/rustzban-node on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/elsvv/rustzban-node already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded fs-err v3.1.1 [INFO] [stderr] Downloaded rust-ini v0.21.2 [INFO] [stderr] Downloaded toml_parser v1.0.1 [INFO] [stderr] Downloaded config v0.15.13 [INFO] [stderr] Downloaded aws-lc-rs v1.13.2 [INFO] [stderr] Downloaded rustls v0.23.29 [INFO] [stderr] Downloaded toml v0.9.2 [INFO] [stderr] Downloaded openssl-src v300.5.1+3.5.1 [INFO] [stderr] Downloaded aws-lc-sys v0.30.0 [INFO] [stderr] Downloaded axum-server v0.7.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ae06554cdcf54690f35b9abd018315b8152c6bdafab2f04386d97e15c515815e [INFO] running `Command { std: "docker" "start" "-a" "ae06554cdcf54690f35b9abd018315b8152c6bdafab2f04386d97e15c515815e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ae06554cdcf54690f35b9abd018315b8152c6bdafab2f04386d97e15c515815e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ae06554cdcf54690f35b9abd018315b8152c6bdafab2f04386d97e15c515815e", kill_on_drop: false }` [INFO] [stdout] ae06554cdcf54690f35b9abd018315b8152c6bdafab2f04386d97e15c515815e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1fdb9b0b8e84b8dfb36d943f19c584c8418aac86f0ff4e69fb26ffcfaa42f15c [INFO] running `Command { std: "docker" "start" "-a" "1fdb9b0b8e84b8dfb36d943f19c584c8418aac86f0ff4e69fb26ffcfaa42f15c", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking slab v0.4.10 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking hashbrown v0.15.4 [INFO] [stderr] Compiling zerocopy v0.8.26 [INFO] [stderr] Compiling cfg-if v1.0.1 [INFO] [stderr] Compiling aws-lc-rs v1.13.2 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling serde_json v1.0.141 [INFO] [stderr] Compiling rustls v0.23.29 [INFO] [stderr] Compiling multer v3.1.0 [INFO] [stderr] Compiling fs-err v3.1.1 [INFO] [stderr] Checking winnow v0.7.12 [INFO] [stderr] Checking hdrhistogram v7.5.4 [INFO] [stderr] Checking arraydeque v0.5.1 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling rustix v1.0.8 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Checking indexmap v2.10.0 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling cc v1.2.30 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking yaml-rust2 v0.10.3 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Checking dlv-list v0.5.2 [INFO] [stderr] Checking ordered-multimap v0.7.3 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Compiling openssl-src v300.5.1+3.5.1 [INFO] [stderr] Checking rust-ini v0.21.2 [INFO] [stderr] Checking toml_parser v1.0.1 [INFO] [stderr] Compiling aws-lc-sys v0.30.0 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking tokio v1.46.1 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking axum-core v0.5.2 [INFO] [stderr] Checking tungstenite v0.26.2 [INFO] [stderr] Compiling pest v2.8.1 [INFO] [stderr] Checking tungstenite v0.27.0 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Compiling pest_meta v2.8.1 [INFO] [stderr] Compiling pest_generator v2.8.1 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Compiling pest_derive v2.8.1 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tokio-tungstenite v0.26.2 [INFO] [stderr] Checking tokio-tungstenite v0.27.0 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Checking serde_spanned v1.0.0 [INFO] [stderr] Checking toml_datetime v0.7.0 [INFO] [stderr] Checking serde_path_to_error v0.1.17 [INFO] [stderr] Checking json5 v0.4.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking h2 v0.4.11 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking ron v0.8.1 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking toml v0.9.2 [INFO] [stderr] Checking config v0.15.13 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking rustls-webpki v0.103.4 [INFO] [stderr] Checking hyper-util v0.1.15 [INFO] [stderr] Checking axum v0.8.4 [INFO] [stderr] Checking tokio-rustls v0.26.2 [INFO] [stderr] Checking axum-server v0.7.2 [INFO] [stderr] Checking rustzban-node v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `SessionResponse` [INFO] [stdout] --> src/api/handlers.rs:12:45 [INFO] [stdout] | [INFO] [stdout] 12 | session::{SessionError, SessionManager, SessionResponse}, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tracing::info` [INFO] [stdout] --> src/utils/logging.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | use tracing::info; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tempfile::tempdir` [INFO] [stdout] --> src/xray/process.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | use tempfile::tempdir; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SessionResponse` [INFO] [stdout] --> src/api/handlers.rs:12:45 [INFO] [stdout] | [INFO] [stdout] 12 | session::{SessionError, SessionManager, SessionResponse}, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `json` [INFO] [stdout] --> src/api/handlers.rs:211:22 [INFO] [stdout] | [INFO] [stdout] 211 | let (status, json) = error.into(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_json` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `SslAuthError` is never used [INFO] [stdout] --> src/ssl/auth.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum SslAuthError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client_cert_file` is never read [INFO] [stdout] --> src/ssl/auth.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 54 | pub struct SslConfig { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | pub client_cert_file: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `SslConfig` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `validate_files` is never used [INFO] [stdout] --> src/ssl/auth.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 60 | impl SslConfig { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn validate_files(&self) -> Result<(), SslAuthError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_ssl_acceptor` is never used [INFO] [stdout] --> src/ssl/auth.rs:93:8 [INFO] [stdout] | [INFO] [stdout] 93 | pub fn create_ssl_acceptor(config: &SslConfig) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `client_cert_middleware` is never used [INFO] [stdout] --> src/ssl/auth.rs:130:14 [INFO] [stdout] | [INFO] [stdout] 130 | pub async fn client_cert_middleware( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `validate_client_certificate` is never used [INFO] [stdout] --> src/ssl/auth.rs:143:8 [INFO] [stdout] | [INFO] [stdout] 143 | pub fn validate_client_certificate(cert_pem: &str) -> Result<(), SslAuthError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated constants are never used [INFO] [stdout] --> src/utils/logging.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 13 | impl Colors { [INFO] [stdout] | ----------- associated constants in this implementation [INFO] [stdout] 14 | pub const BLACK: &'static str = "\x1b[0;30m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 15 | pub const RED: &'static str = "\x1b[0;31m"; [INFO] [stdout] 16 | pub const GREEN: &'static str = "\x1b[0;32m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub const BROWN: &'static str = "\x1b[0;33m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 18 | pub const BLUE: &'static str = "\x1b[0;34m"; [INFO] [stdout] 19 | pub const PURPLE: &'static str = "\x1b[0;35m"; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 20 | pub const CYAN: &'static str = "\x1b[0;36m"; [INFO] [stdout] 21 | pub const LIGHT_GRAY: &'static str = "\x1b[0;37m"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 22 | pub const DARK_GRAY: &'static str = "\x1b[1;30m"; [INFO] [stdout] 23 | pub const LIGHT_RED: &'static str = "\x1b[1;31m"; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 24 | pub const LIGHT_GREEN: &'static str = "\x1b[1;32m"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 25 | pub const YELLOW: &'static str = "\x1b[1;33m"; [INFO] [stdout] 26 | pub const LIGHT_BLUE: &'static str = "\x1b[1;34m"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 27 | pub const LIGHT_PURPLE: &'static str = "\x1b[1;35m"; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 28 | pub const LIGHT_CYAN: &'static str = "\x1b[1;36m"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 29 | pub const LIGHT_WHITE: &'static str = "\x1b[1;37m"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 30 | pub const BOLD: &'static str = "\x1b[1m"; [INFO] [stdout] | ^^^^ [INFO] [stdout] 31 | pub const FAINT: &'static str = "\x1b[2m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 32 | pub const ITALIC: &'static str = "\x1b[3m"; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 33 | pub const UNDERLINE: &'static str = "\x1b[4m"; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 34 | pub const BLINK: &'static str = "\x1b[5m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 35 | pub const NEGATIVE: &'static str = "\x1b[7m"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 36 | pub const CROSSED: &'static str = "\x1b[9m"; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `on_start` and `on_stop` are never used [INFO] [stdout] --> src/xray/process.rs:223:18 [INFO] [stdout] | [INFO] [stdout] 53 | impl XrayCore { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 223 | pub async fn on_start(&self, callback: F) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 232 | pub async fn on_stop(&self, callback: F) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_object` is never used [INFO] [stdout] --> src/xray/config.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl XrayConfig { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn as_object(&self) -> Option<&Map> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `len`, `is_empty`, `clear`, and `clone_buffer` are never used [INFO] [stdout] --> src/xray/logs.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl LogsBuffer { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn clone_buffer(&self) -> VecDeque { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TempLogsManager` is never constructed [INFO] [stdout] --> src/xray/logs.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | pub struct TempLogsManager { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `create_temp_buffer`, and `push_to_all` are never used [INFO] [stdout] --> src/xray/logs.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 69 | impl TempLogsManager { [INFO] [stdout] | -------------------- associated items in this implementation [INFO] [stdout] 70 | /// Create new temporary buffer manager [INFO] [stdout] 71 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn create_temp_buffer(&self) -> TempLogBuffer { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn push_to_all(&self, line: String) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TempLogBuffer` is never constructed [INFO] [stdout] --> src/xray/logs.rs:115:12 [INFO] [stdout] | [INFO] [stdout] 115 | pub struct TempLogBuffer { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_logs`, `has_logs`, `pop_log`, `len`, and `is_empty` are never used [INFO] [stdout] --> src/xray/logs.rs:123:12 [INFO] [stdout] | [INFO] [stdout] 121 | impl TempLogBuffer { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] 122 | /// Получает все логи из временного буфера [INFO] [stdout] 123 | pub fn get_logs(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 129 | pub fn has_logs(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 135 | pub fn pop_log(&self) -> Option { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 141 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 147 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ValidationErrorResponse` is never constructed [INFO] [stdout] --> src/api/handlers.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | pub struct ValidationErrorResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LogsQuery` is never constructed [INFO] [stdout] --> src/api/websocket.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | pub struct LogsQuery { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_connected` is never used [INFO] [stdout] --> src/session/mod.rs:275:18 [INFO] [stdout] | [INFO] [stdout] 27 | impl SessionManager { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 275 | pub async fn is_connected(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ssl/auth.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | / if let Some(ref client_cert) = self.client_cert_file { [INFO] [stdout] 82 | | if !Path::new(client_cert).exists() { [INFO] [stdout] 83 | | return Err(SslAuthError::CertificateNotFound(client_cert.clone())); [INFO] [stdout] 84 | | } [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 81 ~ if let Some(ref client_cert) = self.client_cert_file [INFO] [stdout] 82 ~ && !Path::new(client_cert).exists() { [INFO] [stdout] 83 | return Err(SslAuthError::CertificateNotFound(client_cert.clone())); [INFO] [stdout] 84 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `client_cert_middleware` is never used [INFO] [stdout] --> src/ssl/auth.rs:130:14 [INFO] [stdout] | [INFO] [stdout] 130 | pub async fn client_cert_middleware( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated constants are never used [INFO] [stdout] --> src/utils/logging.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 13 | impl Colors { [INFO] [stdout] | ----------- associated constants in this implementation [INFO] [stdout] 14 | pub const BLACK: &'static str = "\x1b[0;30m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 15 | pub const RED: &'static str = "\x1b[0;31m"; [INFO] [stdout] 16 | pub const GREEN: &'static str = "\x1b[0;32m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub const BROWN: &'static str = "\x1b[0;33m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 18 | pub const BLUE: &'static str = "\x1b[0;34m"; [INFO] [stdout] 19 | pub const PURPLE: &'static str = "\x1b[0;35m"; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 20 | pub const CYAN: &'static str = "\x1b[0;36m"; [INFO] [stdout] 21 | pub const LIGHT_GRAY: &'static str = "\x1b[0;37m"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 22 | pub const DARK_GRAY: &'static str = "\x1b[1;30m"; [INFO] [stdout] 23 | pub const LIGHT_RED: &'static str = "\x1b[1;31m"; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 24 | pub const LIGHT_GREEN: &'static str = "\x1b[1;32m"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 25 | pub const YELLOW: &'static str = "\x1b[1;33m"; [INFO] [stdout] 26 | pub const LIGHT_BLUE: &'static str = "\x1b[1;34m"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 27 | pub const LIGHT_PURPLE: &'static str = "\x1b[1;35m"; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 28 | pub const LIGHT_CYAN: &'static str = "\x1b[1;36m"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 29 | pub const LIGHT_WHITE: &'static str = "\x1b[1;37m"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 30 | pub const BOLD: &'static str = "\x1b[1m"; [INFO] [stdout] | ^^^^ [INFO] [stdout] 31 | pub const FAINT: &'static str = "\x1b[2m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 32 | pub const ITALIC: &'static str = "\x1b[3m"; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 33 | pub const UNDERLINE: &'static str = "\x1b[4m"; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 34 | pub const BLINK: &'static str = "\x1b[5m"; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 35 | pub const NEGATIVE: &'static str = "\x1b[7m"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 36 | pub const CROSSED: &'static str = "\x1b[9m"; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `on_start` and `on_stop` are never used [INFO] [stdout] --> src/xray/process.rs:223:18 [INFO] [stdout] | [INFO] [stdout] 53 | impl XrayCore { [INFO] [stdout] | ------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 223 | pub async fn on_start(&self, callback: F) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 232 | pub async fn on_stop(&self, callback: F) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `clear` and `clone_buffer` are never used [INFO] [stdout] --> src/xray/logs.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl LogsBuffer { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn clear(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn clone_buffer(&self) -> VecDeque { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_logs` and `has_logs` are never used [INFO] [stdout] --> src/xray/logs.rs:123:12 [INFO] [stdout] | [INFO] [stdout] 121 | impl TempLogBuffer { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] 122 | /// Получает все логи из временного буфера [INFO] [stdout] 123 | pub fn get_logs(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 129 | pub fn has_logs(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ValidationErrorResponse` is never constructed [INFO] [stdout] --> src/api/handlers.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | pub struct ValidationErrorResponse { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Some(caps) = regex::Regex::new(r"^Xray (\d+\.\d+\.\d+)")?.captures(&output_str) { [INFO] [stdout] 92 | | if let Some(version) = caps.get(1) { [INFO] [stdout] 93 | | return Ok(version.as_str().to_string()); [INFO] [stdout] 94 | | } [INFO] [stdout] 95 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 91 ~ if let Some(caps) = regex::Regex::new(r"^Xray (\d+\.\d+\.\d+)")?.captures(&output_str) [INFO] [stdout] 92 ~ && let Some(version) = caps.get(1) { [INFO] [stdout] 93 | return Ok(version.as_str().to_string()); [INFO] [stdout] 94 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | / if let Some(log) = config.as_object_mut().and_then(|obj| obj.get_mut("log")) { [INFO] [stdout] 124 | | if let Some(log_obj) = log.as_object_mut() { [INFO] [stdout] 125 | | if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | | if matches!(log_level, "none" | "error") { [INFO] [stdout] ... | [INFO] [stdout] 131 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 123 ~ if let Some(log) = config.as_object_mut().and_then(|obj| obj.get_mut("log")) [INFO] [stdout] 124 ~ && let Some(log_obj) = log.as_object_mut() { [INFO] [stdout] 125 | if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] ... [INFO] [stdout] 129 | } [INFO] [stdout] 130 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | / if let Some(log_obj) = log.as_object_mut() { [INFO] [stdout] 125 | | if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | | if matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] ... | [INFO] [stdout] 130 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ if let Some(log_obj) = log.as_object_mut() [INFO] [stdout] 125 ~ && let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | if matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] 128 | } [INFO] [stdout] 129 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | / if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | | if matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 125 ~ if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) [INFO] [stdout] 126 ~ && matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] 128 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:252:13 [INFO] [stdout] | [INFO] [stdout] 252 | / if let Some(ref mut process) = *process_lock { [INFO] [stdout] 253 | | if let Some(stdout) = process.stdout.take() { [INFO] [stdout] 254 | | let reader = BufReader::new(stdout); [INFO] [stdout] 255 | | let mut lines = reader.lines(); [INFO] [stdout] ... | [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 252 ~ if let Some(ref mut process) = *process_lock [INFO] [stdout] 253 ~ && let Some(stdout) = process.stdout.take() { [INFO] [stdout] 254 | let reader = BufReader::new(stdout); [INFO] [stdout] ... [INFO] [stdout] 269 | } [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `callbacks_lock.get(0)` [INFO] [stdout] --> src/xray/process.rs:283:38 [INFO] [stdout] | [INFO] [stdout] 283 | if let Some(_callback) = callbacks_lock.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `callbacks_lock.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `callbacks_lock.get(0)` [INFO] [stdout] --> src/xray/process.rs:296:38 [INFO] [stdout] | [INFO] [stdout] 296 | if let Some(_callback) = callbacks_lock.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `callbacks_lock.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / if let Ok(process_lock) = self.process.try_read() { [INFO] [stdout] 322 | | if process_lock.is_some() { [INFO] [stdout] 323 | | warn!("XrayCore dropped while process is still running - this may leave zombie processes"); [INFO] [stdout] 324 | | } [INFO] [stdout] 325 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 321 ~ if let Ok(process_lock) = self.process.try_read() [INFO] [stdout] 322 ~ && process_lock.is_some() { [INFO] [stdout] 323 | warn!("XrayCore dropped while process is still running - this may leave zombie processes"); [INFO] [stdout] 324 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / if let Some(inbounds) = config_obj.get_mut("inbounds") { [INFO] [stdout] 73 | | if let Some(inbounds_array) = inbounds.as_array_mut() { [INFO] [stdout] 74 | | // Создаем новый массив без API_INBOUND и с фильтрацией по INBOUNDS [INFO] [stdout] 75 | | let filtered_inbounds: Vec = inbounds_array [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if let Some(inbounds) = config_obj.get_mut("inbounds") [INFO] [stdout] 73 ~ && let Some(inbounds_array) = inbounds.as_array_mut() { [INFO] [stdout] 74 | // Создаем новый массив без API_INBOUND и с фильтрацией по INBOUNDS [INFO] [stdout] ... [INFO] [stdout] 97 | *inbounds_array = filtered_inbounds; [INFO] [stdout] 98 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | / ... if !self.inbounds_filter.is_empty() { [INFO] [stdout] 87 | | ... if let Some(tag) = obj.get("tag").and_then(|v| v.as_str()) { [INFO] [stdout] 88 | | ... return self.inbounds_filter.contains(&tag.to_string()); [INFO] [stdout] 89 | | ... } [INFO] [stdout] 90 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if !self.inbounds_filter.is_empty() [INFO] [stdout] 87 ~ && let Some(tag) = obj.get("tag").and_then(|v| v.as_str()) { [INFO] [stdout] 88 | return self.inbounds_filter.contains(&tag.to_string()); [INFO] [stdout] 89 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ssl/auth.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | / if let Some(ref client_cert) = self.client_cert_file { [INFO] [stdout] 82 | | if !Path::new(client_cert).exists() { [INFO] [stdout] 83 | | return Err(SslAuthError::CertificateNotFound(client_cert.clone())); [INFO] [stdout] 84 | | } [INFO] [stdout] 85 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 81 ~ if let Some(ref client_cert) = self.client_cert_file [INFO] [stdout] 82 ~ && !Path::new(client_cert).exists() { [INFO] [stdout] 83 | return Err(SslAuthError::CertificateNotFound(client_cert.clone())); [INFO] [stdout] 84 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Some(routing) = config_obj.get_mut("routing") { [INFO] [stdout] 110 | | if let Some(routing_obj) = routing.as_object_mut() { [INFO] [stdout] 111 | | if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 109 ~ if let Some(routing) = config_obj.get_mut("routing") [INFO] [stdout] 110 ~ && let Some(routing_obj) = routing.as_object_mut() { [INFO] [stdout] 111 | if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] 125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | / if let Some(routing_obj) = routing.as_object_mut() { [INFO] [stdout] 111 | | if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | | if let Some(ref api_tag) = api_tag { [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if let Some(routing_obj) = routing.as_object_mut() [INFO] [stdout] 111 ~ && let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] ... [INFO] [stdout] 123 | } [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | / if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | | if let Some(ref api_tag) = api_tag { [INFO] [stdout] 114 | | rules_array.retain(|rule| { [INFO] [stdout] ... | [INFO] [stdout] 124 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 111 ~ if let Some(rules) = routing_obj.get_mut("rules") [INFO] [stdout] 112 ~ && let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | if let Some(ref api_tag) = api_tag { [INFO] [stdout] ... [INFO] [stdout] 122 | } [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:112:21 [INFO] [stdout] | [INFO] [stdout] 112 | / if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | | if let Some(ref api_tag) = api_tag { [INFO] [stdout] 114 | | rules_array.retain(|rule| { [INFO] [stdout] 115 | | if let Some(rule_obj) = rule.as_object() { [INFO] [stdout] ... | [INFO] [stdout] 123 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 112 ~ if let Some(rules_array) = rules.as_array_mut() [INFO] [stdout] 113 ~ && let Some(ref api_tag) = api_tag { [INFO] [stdout] 114 | rules_array.retain(|rule| { [INFO] [stdout] ... [INFO] [stdout] 121 | }); [INFO] [stdout] 122 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:115:33 [INFO] [stdout] | [INFO] [stdout] 115 | / ... if let Some(rule_obj) = rule.as_object() { [INFO] [stdout] 116 | | ... if let Some(outbound_tag) = rule_obj.get("outboundTag").and_then(|v| v.as_str()) { [INFO] [stdout] 117 | | ... return outbound_tag != api_tag; [INFO] [stdout] 118 | | ... } [INFO] [stdout] 119 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 115 ~ if let Some(rule_obj) = rule.as_object() [INFO] [stdout] 116 ~ && let Some(outbound_tag) = rule_obj.get("outboundTag").and_then(|v| v.as_str()) { [INFO] [stdout] 117 | return outbound_tag != api_tag; [INFO] [stdout] 118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/xray/logs.rs:64:19 [INFO] [stdout] | [INFO] [stdout] 64 | temp_buffers: Arc>>>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/xray/logs.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | manager: Arc>>>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Some(caps) = regex::Regex::new(r"^Xray (\d+\.\d+\.\d+)")?.captures(&output_str) { [INFO] [stdout] 92 | | if let Some(version) = caps.get(1) { [INFO] [stdout] 93 | | return Ok(version.as_str().to_string()); [INFO] [stdout] 94 | | } [INFO] [stdout] 95 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 91 ~ if let Some(caps) = regex::Regex::new(r"^Xray (\d+\.\d+\.\d+)")?.captures(&output_str) [INFO] [stdout] 92 ~ && let Some(version) = caps.get(1) { [INFO] [stdout] 93 | return Ok(version.as_str().to_string()); [INFO] [stdout] 94 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | / if let Some(log) = config.as_object_mut().and_then(|obj| obj.get_mut("log")) { [INFO] [stdout] 124 | | if let Some(log_obj) = log.as_object_mut() { [INFO] [stdout] 125 | | if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | | if matches!(log_level, "none" | "error") { [INFO] [stdout] ... | [INFO] [stdout] 131 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 123 ~ if let Some(log) = config.as_object_mut().and_then(|obj| obj.get_mut("log")) [INFO] [stdout] 124 ~ && let Some(log_obj) = log.as_object_mut() { [INFO] [stdout] 125 | if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] ... [INFO] [stdout] 129 | } [INFO] [stdout] 130 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | / if let Some(log_obj) = log.as_object_mut() { [INFO] [stdout] 125 | | if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | | if matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] ... | [INFO] [stdout] 130 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 124 ~ if let Some(log_obj) = log.as_object_mut() [INFO] [stdout] 125 ~ && let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | if matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] 128 | } [INFO] [stdout] 129 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | / if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) { [INFO] [stdout] 126 | | if matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 125 ~ if let Some(log_level) = log_obj.get("logLevel").and_then(|v| v.as_str()) [INFO] [stdout] 126 ~ && matches!(log_level, "none" | "error") { [INFO] [stdout] 127 | log_obj.insert("logLevel".to_string(), serde_json::Value::String("warning".to_string())); [INFO] [stdout] 128 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:252:13 [INFO] [stdout] | [INFO] [stdout] 252 | / if let Some(ref mut process) = *process_lock { [INFO] [stdout] 253 | | if let Some(stdout) = process.stdout.take() { [INFO] [stdout] 254 | | let reader = BufReader::new(stdout); [INFO] [stdout] 255 | | let mut lines = reader.lines(); [INFO] [stdout] ... | [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 252 ~ if let Some(ref mut process) = *process_lock [INFO] [stdout] 253 ~ && let Some(stdout) = process.stdout.take() { [INFO] [stdout] 254 | let reader = BufReader::new(stdout); [INFO] [stdout] ... [INFO] [stdout] 269 | } [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `callbacks_lock.get(0)` [INFO] [stdout] --> src/xray/process.rs:283:38 [INFO] [stdout] | [INFO] [stdout] 283 | if let Some(_callback) = callbacks_lock.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `callbacks_lock.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `callbacks_lock.get(0)` [INFO] [stdout] --> src/xray/process.rs:296:38 [INFO] [stdout] | [INFO] [stdout] 296 | if let Some(_callback) = callbacks_lock.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `callbacks_lock.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/process.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | / if let Ok(process_lock) = self.process.try_read() { [INFO] [stdout] 322 | | if process_lock.is_some() { [INFO] [stdout] 323 | | warn!("XrayCore dropped while process is still running - this may leave zombie processes"); [INFO] [stdout] 324 | | } [INFO] [stdout] 325 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 321 ~ if let Ok(process_lock) = self.process.try_read() [INFO] [stdout] 322 ~ && process_lock.is_some() { [INFO] [stdout] 323 | warn!("XrayCore dropped while process is still running - this may leave zombie processes"); [INFO] [stdout] 324 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / if let Some(inbounds) = config_obj.get_mut("inbounds") { [INFO] [stdout] 73 | | if let Some(inbounds_array) = inbounds.as_array_mut() { [INFO] [stdout] 74 | | // Создаем новый массив без API_INBOUND и с фильтрацией по INBOUNDS [INFO] [stdout] 75 | | let filtered_inbounds: Vec = inbounds_array [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if let Some(inbounds) = config_obj.get_mut("inbounds") [INFO] [stdout] 73 ~ && let Some(inbounds_array) = inbounds.as_array_mut() { [INFO] [stdout] 74 | // Создаем новый массив без API_INBOUND и с фильтрацией по INBOUNDS [INFO] [stdout] ... [INFO] [stdout] 97 | *inbounds_array = filtered_inbounds; [INFO] [stdout] 98 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | / ... if !self.inbounds_filter.is_empty() { [INFO] [stdout] 87 | | ... if let Some(tag) = obj.get("tag").and_then(|v| v.as_str()) { [INFO] [stdout] 88 | | ... return self.inbounds_filter.contains(&tag.to_string()); [INFO] [stdout] 89 | | ... } [INFO] [stdout] 90 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if !self.inbounds_filter.is_empty() [INFO] [stdout] 87 ~ && let Some(tag) = obj.get("tag").and_then(|v| v.as_str()) { [INFO] [stdout] 88 | return self.inbounds_filter.contains(&tag.to_string()); [INFO] [stdout] 89 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | / if let Some(routing) = config_obj.get_mut("routing") { [INFO] [stdout] 110 | | if let Some(routing_obj) = routing.as_object_mut() { [INFO] [stdout] 111 | | if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 109 ~ if let Some(routing) = config_obj.get_mut("routing") [INFO] [stdout] 110 ~ && let Some(routing_obj) = routing.as_object_mut() { [INFO] [stdout] 111 | if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] 125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | / if let Some(routing_obj) = routing.as_object_mut() { [INFO] [stdout] 111 | | if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | | if let Some(ref api_tag) = api_tag { [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if let Some(routing_obj) = routing.as_object_mut() [INFO] [stdout] 111 ~ && let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] ... [INFO] [stdout] 123 | } [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | / if let Some(rules) = routing_obj.get_mut("rules") { [INFO] [stdout] 112 | | if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | | if let Some(ref api_tag) = api_tag { [INFO] [stdout] 114 | | rules_array.retain(|rule| { [INFO] [stdout] ... | [INFO] [stdout] 124 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 111 ~ if let Some(rules) = routing_obj.get_mut("rules") [INFO] [stdout] 112 ~ && let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | if let Some(ref api_tag) = api_tag { [INFO] [stdout] ... [INFO] [stdout] 122 | } [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:112:21 [INFO] [stdout] | [INFO] [stdout] 112 | / if let Some(rules_array) = rules.as_array_mut() { [INFO] [stdout] 113 | | if let Some(ref api_tag) = api_tag { [INFO] [stdout] 114 | | rules_array.retain(|rule| { [INFO] [stdout] 115 | | if let Some(rule_obj) = rule.as_object() { [INFO] [stdout] ... | [INFO] [stdout] 123 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 112 ~ if let Some(rules_array) = rules.as_array_mut() [INFO] [stdout] 113 ~ && let Some(ref api_tag) = api_tag { [INFO] [stdout] 114 | rules_array.retain(|rule| { [INFO] [stdout] ... [INFO] [stdout] 121 | }); [INFO] [stdout] 122 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/xray/config.rs:115:33 [INFO] [stdout] | [INFO] [stdout] 115 | / ... if let Some(rule_obj) = rule.as_object() { [INFO] [stdout] 116 | | ... if let Some(outbound_tag) = rule_obj.get("outboundTag").and_then(|v| v.as_str()) { [INFO] [stdout] 117 | | ... return outbound_tag != api_tag; [INFO] [stdout] 118 | | ... } [INFO] [stdout] 119 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 115 ~ if let Some(rule_obj) = rule.as_object() [INFO] [stdout] 116 ~ && let Some(outbound_tag) = rule_obj.get("outboundTag").and_then(|v| v.as_str()) { [INFO] [stdout] 117 | return outbound_tag != api_tag; [INFO] [stdout] 118 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/session/mod.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | / if *self.connected.read().await { [INFO] [stdout] 118 | | if let (Some(ip), Some(id)) = (client_ip, session_id) { [INFO] [stdout] 119 | | tracing::info!("{} disconnected, Session ID = \"{}\".", ip, id); [INFO] [stdout] 120 | | } [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 117 ~ if *self.connected.read().await [INFO] [stdout] 118 ~ && let (Some(ip), Some(id)) = (client_ip, session_id) { [INFO] [stdout] 119 | tracing::info!("{} disconnected, Session ID = \"{}\".", ip, id); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/xray/logs.rs:64:19 [INFO] [stdout] | [INFO] [stdout] 64 | temp_buffers: Arc>>>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/xray/logs.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | manager: Arc>>>>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/session/mod.rs:186:17 [INFO] [stdout] | [INFO] [stdout] 186 | / if let Some(ref version) = self.core_version { [INFO] [stdout] 187 | | if log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 188 | | return Ok(self.create_response().await); [INFO] [stdout] 189 | | } [INFO] [stdout] 190 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 186 ~ if let Some(ref version) = self.core_version [INFO] [stdout] 187 ~ && log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 188 | return Ok(self.create_response().await); [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/session/mod.rs:247:17 [INFO] [stdout] | [INFO] [stdout] 247 | / if let Some(ref version) = self.core_version { [INFO] [stdout] 248 | | if log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 249 | | return Ok(self.create_response().await); [INFO] [stdout] 250 | | } [INFO] [stdout] 251 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 247 ~ if let Some(ref version) = self.core_version [INFO] [stdout] 248 ~ && log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 249 | return Ok(self.create_response().await); [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | if !fs::metadata(&config.ssl_cert_file).is_ok() || !fs::metadata(&config.ssl_key_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(&config.ssl_cert_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:40:56 [INFO] [stdout] | [INFO] [stdout] 40 | if !fs::metadata(&config.ssl_cert_file).is_ok() || !fs::metadata(&config.ssl_key_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(&config.ssl_key_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:63:12 [INFO] [stdout] | [INFO] [stdout] 63 | if !fs::metadata(client_cert_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(client_cert_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / if let Some(ref client_cert_file) = config.ssl_client_cert_file { [INFO] [stdout] 63 | | if !fs::metadata(client_cert_file).is_ok() { [INFO] [stdout] 64 | | error!("Client's certificate file specified on SSL_CLIENT_CERT_FILE is missing"); [INFO] [stdout] 65 | | std::process::exit(1); [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Some(ref client_cert_file) = config.ssl_client_cert_file [INFO] [stdout] 63 ~ && !fs::metadata(client_cert_file).is_ok() { [INFO] [stdout] 64 | error!("Client's certificate file specified on SSL_CLIENT_CERT_FILE is missing"); [INFO] [stdout] 65 | std::process::exit(1); [INFO] [stdout] 66 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/session/mod.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | / if *self.connected.read().await { [INFO] [stdout] 118 | | if let (Some(ip), Some(id)) = (client_ip, session_id) { [INFO] [stdout] 119 | | tracing::info!("{} disconnected, Session ID = \"{}\".", ip, id); [INFO] [stdout] 120 | | } [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 117 ~ if *self.connected.read().await [INFO] [stdout] 118 ~ && let (Some(ip), Some(id)) = (client_ip, session_id) { [INFO] [stdout] 119 | tracing::info!("{} disconnected, Session ID = \"{}\".", ip, id); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/session/mod.rs:186:17 [INFO] [stdout] | [INFO] [stdout] 186 | / if let Some(ref version) = self.core_version { [INFO] [stdout] 187 | | if log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 188 | | return Ok(self.create_response().await); [INFO] [stdout] 189 | | } [INFO] [stdout] 190 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 186 ~ if let Some(ref version) = self.core_version [INFO] [stdout] 187 ~ && log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 188 | return Ok(self.create_response().await); [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/session/mod.rs:247:17 [INFO] [stdout] | [INFO] [stdout] 247 | / if let Some(ref version) = self.core_version { [INFO] [stdout] 248 | | if log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 249 | | return Ok(self.create_response().await); [INFO] [stdout] 250 | | } [INFO] [stdout] 251 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 247 ~ if let Some(ref version) = self.core_version [INFO] [stdout] 248 ~ && log.contains(&format!("Xray {} started", version)) { [INFO] [stdout] 249 | return Ok(self.create_response().await); [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | if !fs::metadata(&config.ssl_cert_file).is_ok() || !fs::metadata(&config.ssl_key_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(&config.ssl_cert_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:40:56 [INFO] [stdout] | [INFO] [stdout] 40 | if !fs::metadata(&config.ssl_cert_file).is_ok() || !fs::metadata(&config.ssl_key_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(&config.ssl_key_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:63:12 [INFO] [stdout] | [INFO] [stdout] 63 | if !fs::metadata(client_cert_file).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(client_cert_file).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / if let Some(ref client_cert_file) = config.ssl_client_cert_file { [INFO] [stdout] 63 | | if !fs::metadata(client_cert_file).is_ok() { [INFO] [stdout] 64 | | error!("Client's certificate file specified on SSL_CLIENT_CERT_FILE is missing"); [INFO] [stdout] 65 | | std::process::exit(1); [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 62 ~ if let Some(ref client_cert_file) = config.ssl_client_cert_file [INFO] [stdout] 63 ~ && !fs::metadata(client_cert_file).is_ok() { [INFO] [stdout] 64 | error!("Client's certificate file specified on SSL_CLIENT_CERT_FILE is missing"); [INFO] [stdout] 65 | std::process::exit(1); [INFO] [stdout] 66 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 21s [INFO] running `Command { std: "docker" "inspect" "1fdb9b0b8e84b8dfb36d943f19c584c8418aac86f0ff4e69fb26ffcfaa42f15c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1fdb9b0b8e84b8dfb36d943f19c584c8418aac86f0ff4e69fb26ffcfaa42f15c", kill_on_drop: false }` [INFO] [stdout] 1fdb9b0b8e84b8dfb36d943f19c584c8418aac86f0ff4e69fb26ffcfaa42f15c