[INFO] cloning repository https://github.com/SirPigari/lym [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/SirPigari/lym" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSirPigari%2Flym", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSirPigari%2Flym'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 41283099551bd3a7ae2c16cfaa4e32c267cb377c [INFO] linting SirPigari/lym against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSirPigari%2Flym" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/SirPigari/lym [INFO] finished tweaking git repo https://github.com/SirPigari/lym [INFO] tweaked toml for git repo https://github.com/SirPigari/lym written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/SirPigari/lym 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 235 packages to latest Rust 1.96.0-nightly compatible versions [INFO] [stderr] Adding generic-array v0.14.7 (available: v0.14.9) [INFO] [stderr] Adding reqwest v0.12.28 (available: v0.13.2) [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] Downloading crates ... [INFO] [stderr] Downloaded getch-rs v0.2.0 [INFO] [stderr] Downloaded dialoguer v0.12.0 [INFO] [stderr] Downloaded console v0.16.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 26dec7044e7ddcae21dd16d561bbed72b6805dc28ebf0d26b972b5b7dc66df1d [INFO] running `Command { std: "docker" "start" "-a" "26dec7044e7ddcae21dd16d561bbed72b6805dc28ebf0d26b972b5b7dc66df1d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "26dec7044e7ddcae21dd16d561bbed72b6805dc28ebf0d26b972b5b7dc66df1d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "26dec7044e7ddcae21dd16d561bbed72b6805dc28ebf0d26b972b5b7dc66df1d", kill_on_drop: false }` [INFO] [stdout] 26dec7044e7ddcae21dd16d561bbed72b6805dc28ebf0d26b972b5b7dc66df1d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] bf97441e892704e871dfc716bb3cfd74b80fdb1f42ee51373cf430541d021cfc [INFO] running `Command { std: "docker" "start" "-a" "bf97441e892704e871dfc716bb3cfd74b80fdb1f42ee51373cf430541d021cfc", kill_on_drop: false }` [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Compiling libc v0.2.183 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking pin-project-lite v0.2.17 [INFO] [stderr] Checking stable_deref_trait v1.2.1 [INFO] [stderr] Checking futures-core v0.3.32 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Checking once_cell v1.21.4 [INFO] [stderr] Checking futures-sink v0.3.32 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking itoa v1.0.17 [INFO] [stderr] Compiling cc v1.2.57 [INFO] [stderr] Checking slab v0.4.12 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking litemap v0.8.1 [INFO] [stderr] Checking writeable v0.6.2 [INFO] [stderr] Checking futures-task v0.3.32 [INFO] [stderr] Checking futures-io v0.3.32 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Checking foreign-types-shared v0.1.1 [INFO] [stderr] Checking equivalent v1.0.2 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Compiling openssl v0.10.76 [INFO] [stderr] Checking foreign-types v0.3.2 [INFO] [stderr] Checking typenum v1.19.0 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking icu_normalizer_data v2.1.1 [INFO] [stderr] Checking icu_properties_data v2.1.2 [INFO] [stderr] Checking atomic-waker v1.1.2 [INFO] [stderr] Compiling native-tls v0.2.18 [INFO] [stderr] Checking try-lock v0.2.5 [INFO] [stderr] Checking linux-raw-sys v0.12.1 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Checking tower-service v0.3.3 [INFO] [stderr] Checking want v0.3.1 [INFO] [stderr] Compiling memoffset v0.7.1 [INFO] [stderr] Checking httparse v1.10.1 [INFO] [stderr] Checking serde_core v1.0.228 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Checking openssl-probe v0.2.1 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling getrandom v0.4.2 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling nix v0.31.2 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking sync_wrapper v1.0.2 [INFO] [stderr] Checking ipnet v2.12.0 [INFO] [stderr] Checking base64 v0.22.1 [INFO] [stderr] Checking utf8_iter v1.0.4 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Checking tower-layer v0.3.3 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Compiling portable-atomic v1.13.1 [INFO] [stderr] Checking zmij v1.0.21 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Checking iri-string v0.7.10 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Checking ryu v1.0.23 [INFO] [stderr] Checking fastrand v2.3.0 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Checking fuzzy-matcher v0.3.7 [INFO] [stderr] Checking rustls-pki-types v1.14.0 [INFO] [stderr] Checking crc32fast v1.5.0 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking cpufeatures v0.2.17 [INFO] [stderr] Checking mime v0.3.17 [INFO] [stderr] Checking unit-prefix v0.5.2 [INFO] [stderr] Checking shell-words v1.1.1 [INFO] [stderr] Checking colored v3.1.1 [INFO] [stderr] Checking glob v0.3.3 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Compiling openssl-sys v0.9.112 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking socket2 v0.6.3 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking console v0.16.3 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking filetime v0.2.27 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking indicatif v0.18.4 [INFO] [stderr] Checking xattr v1.6.1 [INFO] [stderr] Checking tempfile v3.27.0 [INFO] [stderr] Checking ctrlc v3.5.2 [INFO] [stderr] Checking dialoguer v0.12.0 [INFO] [stderr] Checking tar v0.4.44 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking getch-rs v0.2.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.1 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking tokio v1.50.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking futures-executor v0.3.32 [INFO] [stderr] Checking futures v0.3.32 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking lym v0.1.69 (/opt/rustwide/workdir) [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/db.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | self.inner.read().ok().expect("Failed to acquire read lock").contains_key(name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 32 - self.inner.read().ok().expect("Failed to acquire read lock").contains_key(name) [INFO] [stdout] 32 + self.inner.read().expect("Failed to acquire read lock").contains_key(name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | return ge(cur, req) && lt(cur, upper); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 128 - return ge(cur, req) && lt(cur, upper); [INFO] [stdout] 128 + ge(cur, req) && lt(cur, upper) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | return ge(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 135 - return ge(cur, req); [INFO] [stdout] 135 + ge(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | return le(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - return le(cur, req); [INFO] [stdout] 142 + le(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | return lt(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 149 - return lt(cur, req); [INFO] [stdout] 149 + lt(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | return gt(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - return gt(cur, req); [INFO] [stdout] 156 + gt(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | return ge(cur, req) && lt(cur, upper); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 164 - return ge(cur, req) && lt(cur, upper); [INFO] [stdout] 164 + ge(cur, req) && lt(cur, upper) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | return eq(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 170 - return eq(cur, req); [INFO] [stdout] 170 + eq(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:122:23 [INFO] [stdout] | [INFO] [stdout] 122 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:121:5 [INFO] [stdout] | [INFO] [stdout] 121 | if required.starts_with('^') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 121 ~ if let Some(req_str) = required.strip_prefix('^') { [INFO] [stdout] 122 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:130:23 [INFO] [stdout] | [INFO] [stdout] 130 | let req_str = &required[2..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:129:12 [INFO] [stdout] | [INFO] [stdout] 129 | } else if required.starts_with(">=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 129 ~ } else if let Some(req_str) = required.strip_prefix(">=") { [INFO] [stdout] 130 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:137:23 [INFO] [stdout] | [INFO] [stdout] 137 | let req_str = &required[2..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:136:12 [INFO] [stdout] | [INFO] [stdout] 136 | } else if required.starts_with("<=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 136 ~ } else if let Some(req_str) = required.strip_prefix("<=") { [INFO] [stdout] 137 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:144:23 [INFO] [stdout] | [INFO] [stdout] 144 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:143:12 [INFO] [stdout] | [INFO] [stdout] 143 | } else if required.starts_with('<') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 143 ~ } else if let Some(req_str) = required.strip_prefix('<') { [INFO] [stdout] 144 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:151:23 [INFO] [stdout] | [INFO] [stdout] 151 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:150:12 [INFO] [stdout] | [INFO] [stdout] 150 | } else if required.starts_with('>') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 150 ~ } else if let Some(req_str) = required.strip_prefix('>') { [INFO] [stdout] 151 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:158:23 [INFO] [stdout] | [INFO] [stdout] 158 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:157:12 [INFO] [stdout] | [INFO] [stdout] 157 | } else if required.starts_with('~') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 157 ~ } else if let Some(req_str) = required.strip_prefix('~') { [INFO] [stdout] 158 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `costs` [INFO] [stdout] --> src/utils.rs:218:14 [INFO] [stdout] | [INFO] [stdout] 218 | for j in 0..=b.len() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 218 - for j in 0..=b.len() { [INFO] [stdout] 218 + for (j, ) in costs.iter_mut().enumerate().take(b.len() + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/utils.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | / if let Ok(pattern) = Pattern::new(pattern_str) { [INFO] [stdout] 282 | | if pattern.matches(file_path) { [INFO] [stdout] 283 | | return true; [INFO] [stdout] 284 | | } [INFO] [stdout] 285 | | } [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] 281 ~ if let Ok(pattern) = Pattern::new(pattern_str) [INFO] [stdout] 282 ~ && pattern.matches(file_path) { [INFO] [stdout] 283 | return true; [INFO] [stdout] 284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/utils.rs:288:27 [INFO] [stdout] | [INFO] [stdout] 288 | let is_root = file.parent().map_or(true, |p| p == Path::new("") || p == Path::new(".")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 288 - let is_root = file.parent().map_or(true, |p| p == Path::new("") || p == Path::new(".")); [INFO] [stdout] 288 + let is_root = file.parent().is_none_or(|p| p == Path::new("") || p == Path::new(".")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/update_lucia.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | .items(&choices) [INFO] [stdout] | ^^^^^^^^ help: change this to: `choices` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> src/update_lucia.rs:63:18 [INFO] [stdout] | [INFO] [stdout] 63 | let result = (|| async { [INFO] [stdout] | __________________^ [INFO] [stdout] 64 | | match selection { [INFO] [stdout] 65 | | 0 => update_prebuilt_async(lucia_path, verbose).await?, [INFO] [stdout] 66 | | 1 => build_from_source(lucia_path, SourceMode::LatestCommit, verbose)?, [INFO] [stdout] ... | [INFO] [stdout] 95 | | Ok::<(), String>(()) [INFO] [stdout] 96 | | })(); [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 63 ~ let result = async { [INFO] [stdout] 64 + match selection { [INFO] [stdout] 65 + 0 => update_prebuilt_async(lucia_path, verbose).await?, [INFO] [stdout] 66 + 1 => build_from_source(lucia_path, SourceMode::LatestCommit, verbose)?, [INFO] [stdout] 67 + 2 => build_from_source(lucia_path, SourceMode::LatestRelease, verbose)?, [INFO] [stdout] 68 + 3 => { [INFO] [stdout] 69 + let commits = fetch_recent_commits_async().await?; [INFO] [stdout] 70 + let commit = select_commit_from_list(commits)?; [INFO] [stdout] 71 + build_from_source(lucia_path, SourceMode::Commit(commit), verbose)? [INFO] [stdout] 72 + } [INFO] [stdout] 73 + _ => unreachable!(), [INFO] [stdout] 74 + } [INFO] [stdout] 75 + [INFO] [stdout] 76 + init_lucia(lucia_path)?; [INFO] [stdout] 77 + let old_env = backup_path.join("src/env"); [INFO] [stdout] 78 + let new_env = lucia_path.join("src/env"); [INFO] [stdout] 79 + [INFO] [stdout] 80 + restore_env_files(&old_env, &new_env)?; [INFO] [stdout] 81 + [INFO] [stdout] 82 + if matches!(selection, 1 | 2 | 3) { [INFO] [stdout] 83 + run_cmd(lucia_path, "make", &["test"], verbose)?; [INFO] [stdout] 84 + } [INFO] [stdout] 85 + [INFO] [stdout] 86 + let version = get_lucia_version(lucia_path)?; [INFO] [stdout] 87 + if !quiet { [INFO] [stdout] 88 + println!("Lucia updated successfully to version {version}"); [INFO] [stdout] 89 + } [INFO] [stdout] 90 + [INFO] [stdout] 91 + let config_path = new_env.join("config.json"); [INFO] [stdout] 92 + update_config_with_lucia_info(&config_path) [INFO] [stdout] 93 + .map_err(|e| e.to_string())?; [INFO] [stdout] 94 + [INFO] [stdout] 95 + Ok::<(), String>(()) [INFO] [stdout] 96 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/update_lucia.rs:82:32 [INFO] [stdout] | [INFO] [stdout] 82 | if matches!(selection, 1 | 2 | 3) { [INFO] [stdout] | ^^^^^^^^^ help: try: `1..=3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> src/db.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | self.inner.read().ok().expect("Failed to acquire read lock").contains_key(name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 32 - self.inner.read().ok().expect("Failed to acquire read lock").contains_key(name) [INFO] [stdout] 32 + self.inner.read().expect("Failed to acquire read lock").contains_key(name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | return ge(cur, req) && lt(cur, upper); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 128 - return ge(cur, req) && lt(cur, upper); [INFO] [stdout] 128 + ge(cur, req) && lt(cur, upper) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | return ge(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 135 - return ge(cur, req); [INFO] [stdout] 135 + ge(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | return le(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - return le(cur, req); [INFO] [stdout] 142 + le(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | return lt(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 149 - return lt(cur, req); [INFO] [stdout] 149 + lt(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | return gt(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - return gt(cur, req); [INFO] [stdout] 156 + gt(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | return ge(cur, req) && lt(cur, upper); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 164 - return ge(cur, req) && lt(cur, upper); [INFO] [stdout] 164 + ge(cur, req) && lt(cur, upper) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | return eq(cur, req); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 170 - return eq(cur, req); [INFO] [stdout] 170 + eq(cur, req) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:122:23 [INFO] [stdout] | [INFO] [stdout] 122 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:121:5 [INFO] [stdout] | [INFO] [stdout] 121 | if required.starts_with('^') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 121 ~ if let Some(req_str) = required.strip_prefix('^') { [INFO] [stdout] 122 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:130:23 [INFO] [stdout] | [INFO] [stdout] 130 | let req_str = &required[2..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:129:12 [INFO] [stdout] | [INFO] [stdout] 129 | } else if required.starts_with(">=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 129 ~ } else if let Some(req_str) = required.strip_prefix(">=") { [INFO] [stdout] 130 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/main.rs:50:20 [INFO] [stdout] | [INFO] [stdout] 50 | return Err(io::Error::new(io::ErrorKind::Other, format!("{} exists and is not a directory", lym_dir.display()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 50 - return Err(io::Error::new(io::ErrorKind::Other, format!("{} exists and is not a directory", lym_dir.display()))); [INFO] [stdout] 50 + return Err(io::Error::other(format!("{} exists and is not a directory", lym_dir.display()))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:137:23 [INFO] [stdout] | [INFO] [stdout] 137 | let req_str = &required[2..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:136:12 [INFO] [stdout] | [INFO] [stdout] 136 | } else if required.starts_with("<=") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 136 ~ } else if let Some(req_str) = required.strip_prefix("<=") { [INFO] [stdout] 137 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:144:23 [INFO] [stdout] | [INFO] [stdout] 144 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:143:12 [INFO] [stdout] | [INFO] [stdout] 143 | } else if required.starts_with('<') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 143 ~ } else if let Some(req_str) = required.strip_prefix('<') { [INFO] [stdout] 144 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:151:23 [INFO] [stdout] | [INFO] [stdout] 151 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:150:12 [INFO] [stdout] | [INFO] [stdout] 150 | } else if required.starts_with('>') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 150 ~ } else if let Some(req_str) = required.strip_prefix('>') { [INFO] [stdout] 151 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/utils.rs:158:23 [INFO] [stdout] | [INFO] [stdout] 158 | let req_str = &required[1..]; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/utils.rs:157:12 [INFO] [stdout] | [INFO] [stdout] 157 | } else if required.starts_with('~') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 157 ~ } else if let Some(req_str) = required.strip_prefix('~') { [INFO] [stdout] 158 ~ let req = match version_to_tuple(req_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/main.rs:120:20 [INFO] [stdout] | [INFO] [stdout] 120 | return Err(io::Error::new(io::ErrorKind::Other, "Failed to run lucia --build-info")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 120 - return Err(io::Error::new(io::ErrorKind::Other, "Failed to run lucia --build-info")); [INFO] [stdout] 120 + return Err(io::Error::other("Failed to run lucia --build-info")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `costs` [INFO] [stdout] --> src/utils.rs:218:14 [INFO] [stdout] | [INFO] [stdout] 218 | for j in 0..=b.len() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 218 - for j in 0..=b.len() { [INFO] [stdout] 218 + for (j, ) in costs.iter_mut().enumerate().take(b.len() + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/main.rs:136:16 [INFO] [stdout] | [INFO] [stdout] 136 | if parts.len() >= 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/utils.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | / if let Ok(pattern) = Pattern::new(pattern_str) { [INFO] [stdout] 282 | | if pattern.matches(file_path) { [INFO] [stdout] 283 | | return true; [INFO] [stdout] 284 | | } [INFO] [stdout] 285 | | } [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] 281 ~ if let Ok(pattern) = Pattern::new(pattern_str) [INFO] [stdout] 282 ~ && pattern.matches(file_path) { [INFO] [stdout] 283 | return true; [INFO] [stdout] 284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/main.rs:154:34 [INFO] [stdout] | [INFO] [stdout] 154 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Failed to build reqwest client: {}", e)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 154 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Failed to build reqwest client: {}", e)))?; [INFO] [stdout] 154 + .map_err(|e| io::Error::other(format!("Failed to build reqwest client: {}", e)))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/utils.rs:288:27 [INFO] [stdout] | [INFO] [stdout] 288 | let is_root = file.parent().map_or(true, |p| p == Path::new("") || p == Path::new(".")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 288 - let is_root = file.parent().map_or(true, |p| p == Path::new("") || p == Path::new(".")); [INFO] [stdout] 288 + let is_root = file.parent().is_none_or(|p| p == Path::new("") || p == Path::new(".")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/update_lucia.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | .items(&choices) [INFO] [stdout] | ^^^^^^^^ help: change this to: `choices` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> src/update_lucia.rs:63:18 [INFO] [stdout] | [INFO] [stdout] 63 | let result = (|| async { [INFO] [stdout] | __________________^ [INFO] [stdout] 64 | | match selection { [INFO] [stdout] 65 | | 0 => update_prebuilt_async(lucia_path, verbose).await?, [INFO] [stdout] 66 | | 1 => build_from_source(lucia_path, SourceMode::LatestCommit, verbose)?, [INFO] [stdout] ... | [INFO] [stdout] 95 | | Ok::<(), String>(()) [INFO] [stdout] 96 | | })(); [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 63 ~ let result = async { [INFO] [stdout] 64 + match selection { [INFO] [stdout] 65 + 0 => update_prebuilt_async(lucia_path, verbose).await?, [INFO] [stdout] 66 + 1 => build_from_source(lucia_path, SourceMode::LatestCommit, verbose)?, [INFO] [stdout] 67 + 2 => build_from_source(lucia_path, SourceMode::LatestRelease, verbose)?, [INFO] [stdout] 68 + 3 => { [INFO] [stdout] 69 + let commits = fetch_recent_commits_async().await?; [INFO] [stdout] 70 + let commit = select_commit_from_list(commits)?; [INFO] [stdout] 71 + build_from_source(lucia_path, SourceMode::Commit(commit), verbose)? [INFO] [stdout] 72 + } [INFO] [stdout] 73 + _ => unreachable!(), [INFO] [stdout] 74 + } [INFO] [stdout] 75 + [INFO] [stdout] 76 + init_lucia(lucia_path)?; [INFO] [stdout] 77 + let old_env = backup_path.join("src/env"); [INFO] [stdout] 78 + let new_env = lucia_path.join("src/env"); [INFO] [stdout] 79 + [INFO] [stdout] 80 + restore_env_files(&old_env, &new_env)?; [INFO] [stdout] 81 + [INFO] [stdout] 82 + if matches!(selection, 1 | 2 | 3) { [INFO] [stdout] 83 + run_cmd(lucia_path, "make", &["test"], verbose)?; [INFO] [stdout] 84 + } [INFO] [stdout] 85 + [INFO] [stdout] 86 + let version = get_lucia_version(lucia_path)?; [INFO] [stdout] 87 + if !quiet { [INFO] [stdout] 88 + println!("Lucia updated successfully to version {version}"); [INFO] [stdout] 89 + } [INFO] [stdout] 90 + [INFO] [stdout] 91 + let config_path = new_env.join("config.json"); [INFO] [stdout] 92 + update_config_with_lucia_info(&config_path) [INFO] [stdout] 93 + .map_err(|e| e.to_string())?; [INFO] [stdout] 94 + [INFO] [stdout] 95 + Ok::<(), String>(()) [INFO] [stdout] 96 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/update_lucia.rs:82:32 [INFO] [stdout] | [INFO] [stdout] 82 | if matches!(selection, 1 | 2 | 3) { [INFO] [stdout] | ^^^^^^^^^ help: try: `1..=3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:345:67 [INFO] [stdout] | [INFO] [stdout] 345 | match rt.block_on(get_current_and_latest_version(&client, &repo_slug, &package, &libs_dir)) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_slug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:349:21 [INFO] [stdout] | [INFO] [stdout] 349 | / if !no_confirm { [INFO] [stdout] 350 | | if !Confirm::new() [INFO] [stdout] 351 | | .with_prompt(format!("Proceed with updating '{}'?", package)) [INFO] [stdout] 352 | | .default(true) [INFO] [stdout] ... | [INFO] [stdout] 358 | | } [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] 349 ~ if !no_confirm [INFO] [stdout] 350 ~ && !Confirm::new() [INFO] [stdout] 351 | .with_prompt(format!("Proceed with updating '{}'?", package)) [INFO] [stdout] ... [INFO] [stdout] 356 | continue 'pkg_loop; [INFO] [stdout] 357 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/main.rs:50:20 [INFO] [stdout] | [INFO] [stdout] 50 | return Err(io::Error::new(io::ErrorKind::Other, format!("{} exists and is not a directory", lym_dir.display()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 50 - return Err(io::Error::new(io::ErrorKind::Other, format!("{} exists and is not a directory", lym_dir.display()))); [INFO] [stdout] 50 + return Err(io::Error::other(format!("{} exists and is not a directory", lym_dir.display()))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:735:47 [INFO] [stdout] | [INFO] [stdout] 735 | let config_json = std::fs::read_to_string(&get_lym_dir().unwrap().join("config.json")).ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `get_lym_dir().unwrap().join("config.json")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:738:5 [INFO] [stdout] | [INFO] [stdout] 738 | / if let Some(config) = &config_json { [INFO] [stdout] 739 | | if let (Some(username), Some(token)) = ( [INFO] [stdout] 740 | | config.get("github_username").and_then(JsonValue::as_str), [INFO] [stdout] 741 | | config.get("github_token").and_then(JsonValue::as_str) [INFO] [stdout] ... | [INFO] [stdout] 747 | | } [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] 738 ~ if let Some(config) = &config_json [INFO] [stdout] 739 ~ && let (Some(username), Some(token)) = ( [INFO] [stdout] 740 | config.get("github_username").and_then(JsonValue::as_str), [INFO] [stdout] ... [INFO] [stdout] 745 | headers.insert(AUTHORIZATION, HeaderValue::from_str(&auth_header).unwrap()); [INFO] [stdout] 746 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/main.rs:120:20 [INFO] [stdout] | [INFO] [stdout] 120 | return Err(io::Error::new(io::ErrorKind::Other, "Failed to run lucia --build-info")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 120 - return Err(io::Error::new(io::ErrorKind::Other, "Failed to run lucia --build-info")); [INFO] [stdout] 120 + return Err(io::Error::other("Failed to run lucia --build-info")); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:769:13 [INFO] [stdout] | [INFO] [stdout] 769 | / if let Some(parent) = local_file_path.parent() { [INFO] [stdout] 770 | | if let Err(e) = tokio::fs::create_dir_all(parent).await { [INFO] [stdout] 771 | | eprintln!("Failed to create directory '{}': {}", parent.display(), e); [INFO] [stdout] 772 | | pb_clone.inc(1); [INFO] [stdout] ... | [INFO] [stdout] 775 | | } [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] 769 ~ if let Some(parent) = local_file_path.parent() [INFO] [stdout] 770 ~ && let Err(e) = tokio::fs::create_dir_all(parent).await { [INFO] [stdout] 771 | eprintln!("Failed to create directory '{}': {}", parent.display(), e); [INFO] [stdout] 772 | pb_clone.inc(1); [INFO] [stdout] 773 | return; [INFO] [stdout] 774 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/main.rs:777:32 [INFO] [stdout] | [INFO] [stdout] 777 | let timeout_secs = std::cmp::max(30, std::cmp::min(300, 30 + (size / (1024 * 1024)) * 10)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(30 + (size / (1024 * 1024)) * 10).clamp(30, 300)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/main.rs:136:16 [INFO] [stdout] | [INFO] [stdout] 136 | if parts.len() >= 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/main.rs:154:34 [INFO] [stdout] | [INFO] [stdout] 154 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Failed to build reqwest client: {}", e)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 154 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Failed to build reqwest client: {}", e)))?; [INFO] [stdout] 154 + .map_err(|e| io::Error::other(format!("Failed to build reqwest client: {}", e)))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:858:29 [INFO] [stdout] | [INFO] [stdout] 858 | / ... if write_success { [INFO] [stdout] 859 | | ... if let Err(e) = file.flush().await { [INFO] [stdout] 860 | | ... eprintln!("Failed to flush file '{}': {}", local_file_path.display(), e); [INFO] [stdout] 861 | | ... } [INFO] [stdout] 862 | | ... } [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] 858 ~ if write_success [INFO] [stdout] 859 ~ && let Err(e) = file.flush().await { [INFO] [stdout] 860 | eprintln!("Failed to flush file '{}': {}", local_file_path.display(), e); [INFO] [stdout] 861 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:906:17 [INFO] [stdout] | [INFO] [stdout] 906 | active_downloads.sort_by(|a, b| b.3.cmp(&a.3)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 906 - active_downloads.sort_by(|a, b| b.3.cmp(&a.3)); [INFO] [stdout] 906 + active_downloads.sort_by_key(|b| std::cmp::Reverse(b.3)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:959:15 [INFO] [stdout] | [INFO] [stdout] 959 | while let Some(_) = stream.next().await { [INFO] [stdout] | ----------^^^^^^^---------------------- help: try: `while stream.next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:978:5 [INFO] [stdout] | [INFO] [stdout] 978 | / if let Ok(registry_resp) = client.get(®istry_url).send() { [INFO] [stdout] 979 | | if registry_resp.status().is_success() { [INFO] [stdout] 980 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1015 | | } [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] 978 ~ if let Ok(registry_resp) = client.get(®istry_url).send() [INFO] [stdout] 979 ~ && registry_resp.status().is_success() { [INFO] [stdout] 980 | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 1013 | } [INFO] [stdout] 1014 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:979:9 [INFO] [stdout] | [INFO] [stdout] 979 | / if registry_resp.status().is_success() { [INFO] [stdout] 980 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 1014 | | } [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] 979 ~ if registry_resp.status().is_success() [INFO] [stdout] 980 ~ && let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 1012 | } [INFO] [stdout] 1013 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:980:13 [INFO] [stdout] | [INFO] [stdout] 980 | / if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... | [INFO] [stdout] 1013 | | } [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] 980 ~ if let Ok(registry_json) = registry_resp.json::() [INFO] [stdout] 981 ~ && let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 1011 | } [INFO] [stdout] 1012 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:981:17 [INFO] [stdout] | [INFO] [stdout] 981 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 1012 | | } [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] 981 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 982 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 1010 | } [INFO] [stdout] 1011 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:982:21 [INFO] [stdout] | [INFO] [stdout] 982 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 1011 | | } [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] 982 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 983 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... [INFO] [stdout] 1009 | } [INFO] [stdout] 1010 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:983:25 [INFO] [stdout] | [INFO] [stdout] 983 | / if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 986 | | for (pkg_folder, pkg_info) in packages { [INFO] [stdout] ... | [INFO] [stdout] 1010 | | } [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] 983 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 984 ~ && let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 1008 | } [INFO] [stdout] 1009 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:984:29 [INFO] [stdout] | [INFO] [stdout] 984 | / ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 986 | | ... for (pkg_folder, pkg_info) in packages { [INFO] [stdout] 987 | | ... if pkg_folder == package_name { [INFO] [stdout] ... | [INFO] [stdout] 1009 | | ... } [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] 984 ~ if let Ok(registry) = serde_json::from_str::(®istry_str) [INFO] [stdout] 985 ~ && let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 986 | for (pkg_folder, pkg_info) in packages { [INFO] [stdout] ... [INFO] [stdout] 1007 | } [INFO] [stdout] 1008 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:993:49 [INFO] [stdout] | [INFO] [stdout] 993 | / ... if let Some(alias) = name.as_str() { [INFO] [stdout] 994 | | ... if alias == package_name { [INFO] [stdout] 995 | | ... let authors = pkg_info.get("authors") [INFO] [stdout] 996 | | ... .and_then(JsonValue::as_array) [INFO] [stdout] ... | [INFO] [stdout] 1004 | | ... } [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] 993 ~ if let Some(alias) = name.as_str() [INFO] [stdout] 994 ~ && alias == package_name { [INFO] [stdout] 995 | let authors = pkg_info.get("authors") [INFO] [stdout] ... [INFO] [stdout] 1002 | conflicts.push(format!("{} ({})", pkg_folder, authors)); [INFO] [stdout] 1003 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:345:67 [INFO] [stdout] | [INFO] [stdout] 345 | match rt.block_on(get_current_and_latest_version(&client, &repo_slug, &package, &libs_dir)) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `repo_slug` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:349:21 [INFO] [stdout] | [INFO] [stdout] 349 | / if !no_confirm { [INFO] [stdout] 350 | | if !Confirm::new() [INFO] [stdout] 351 | | .with_prompt(format!("Proceed with updating '{}'?", package)) [INFO] [stdout] 352 | | .default(true) [INFO] [stdout] ... | [INFO] [stdout] 358 | | } [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] 349 ~ if !no_confirm [INFO] [stdout] 350 ~ && !Confirm::new() [INFO] [stdout] 351 | .with_prompt(format!("Proceed with updating '{}'?", package)) [INFO] [stdout] ... [INFO] [stdout] 356 | continue 'pkg_loop; [INFO] [stdout] 357 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1034:5 [INFO] [stdout] | [INFO] [stdout] 1034 | / if let Ok(registry_resp) = client.get(®istry_url).send() { [INFO] [stdout] 1035 | | if registry_resp.status().is_success() { [INFO] [stdout] 1036 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1116 | | } [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] 1034 ~ if let Ok(registry_resp) = client.get(®istry_url).send() [INFO] [stdout] 1035 ~ && registry_resp.status().is_success() { [INFO] [stdout] 1036 | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 1114 | } [INFO] [stdout] 1115 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1035:9 [INFO] [stdout] | [INFO] [stdout] 1035 | / if registry_resp.status().is_success() { [INFO] [stdout] 1036 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 1115 | | } [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] 1035 ~ if registry_resp.status().is_success() [INFO] [stdout] 1036 ~ && let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 1113 | } [INFO] [stdout] 1114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1036:13 [INFO] [stdout] | [INFO] [stdout] 1036 | / if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... | [INFO] [stdout] 1114 | | } [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] 1036 ~ if let Ok(registry_json) = registry_resp.json::() [INFO] [stdout] 1037 ~ && let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 1112 | } [INFO] [stdout] 1113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1037:17 [INFO] [stdout] | [INFO] [stdout] 1037 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 1113 | | } [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] 1037 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 1038 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 1111 | } [INFO] [stdout] 1112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1038:21 [INFO] [stdout] | [INFO] [stdout] 1038 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 1112 | | } [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] 1038 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 1039 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... [INFO] [stdout] 1110 | } [INFO] [stdout] 1111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1039:25 [INFO] [stdout] | [INFO] [stdout] 1039 | / if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 1042 | | let mut matches = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 1111 | | } [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] 1039 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 1040 ~ && let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 1109 | } [INFO] [stdout] 1110 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1040:29 [INFO] [stdout] | [INFO] [stdout] 1040 | / ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 1042 | | ... let mut matches = Vec::new(); [INFO] [stdout] 1043 | | ... for (pkg_folder, pkg_info) in packages { [INFO] [stdout] ... | [INFO] [stdout] 1110 | | ... } [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] 1040 ~ if let Ok(registry) = serde_json::from_str::(®istry_str) [INFO] [stdout] 1041 ~ && let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 1042 | let mut matches = Vec::new(); [INFO] [stdout] ... [INFO] [stdout] 1108 | } [INFO] [stdout] 1109 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1046:49 [INFO] [stdout] | [INFO] [stdout] 1046 | / ... if let Some(alias) = name.as_str() { [INFO] [stdout] 1047 | | ... if alias == pkg_name { [INFO] [stdout] 1048 | | ... let authors = pkg_info.get("authors") [INFO] [stdout] 1049 | | ... .and_then(JsonValue::as_array) [INFO] [stdout] ... | [INFO] [stdout] 1057 | | ... } [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] 1046 ~ if let Some(alias) = name.as_str() [INFO] [stdout] 1047 ~ && alias == pkg_name { [INFO] [stdout] 1048 | let authors = pkg_info.get("authors") [INFO] [stdout] ... [INFO] [stdout] 1055 | matches.push((pkg_folder.clone(), authors)); [INFO] [stdout] 1056 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1079:41 [INFO] [stdout] | [INFO] [stdout] 1079 | / ... if let Ok(choice) = input.trim().parse::() { [INFO] [stdout] 1080 | | ... if choice > 0 && choice <= matches.len() { [INFO] [stdout] 1081 | | ... return Ok(matches[choice - 1].0.clone()); [INFO] [stdout] 1082 | | ... } [INFO] [stdout] 1083 | | ... } [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] 1079 ~ if let Ok(choice) = input.trim().parse::() [INFO] [stdout] 1080 ~ && choice > 0 && choice <= matches.len() { [INFO] [stdout] 1081 | return Ok(matches[choice - 1].0.clone()); [INFO] [stdout] 1082 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1104:37 [INFO] [stdout] | [INFO] [stdout] 1104 | / ... if let Some(closest) = find_closest_match(pkg_name, &all_searchable) { [INFO] [stdout] 1105 | | ... if name_to_folder.contains_key(closest) { [INFO] [stdout] 1106 | | ... return Err(format!("Package '{}' not found. Did you mean '{}'?", pkg_name, closest)); [INFO] [stdout] 1107 | | ... } [INFO] [stdout] 1108 | | ... } [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] 1104 ~ if let Some(closest) = find_closest_match(pkg_name, &all_searchable) [INFO] [stdout] 1105 ~ && name_to_folder.contains_key(closest) { [INFO] [stdout] 1106 | return Err(format!("Package '{}' not found. Did you mean '{}'?", pkg_name, closest)); [INFO] [stdout] 1107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:1512:24 [INFO] [stdout] | [INFO] [stdout] 1512 | if !lucia_config.get(key).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lucia_config.get(key).is_none()` [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: stripping a prefix manually [INFO] [stdout] --> src/main.rs:1225:45 [INFO] [stdout] | [INFO] [stdout] 1225 | if name.starts_with('@') { Some(name[1..].to_string()) } else { None } [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/main.rs:1225:13 [INFO] [stdout] | [INFO] [stdout] 1225 | if name.starts_with('@') { Some(name[1..].to_string()) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1225 - if name.starts_with('@') { Some(name[1..].to_string()) } else { None } [INFO] [stdout] 1225 + if let Some() = name.strip_prefix('@') { Some(.to_string()) } else { None } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:735:47 [INFO] [stdout] | [INFO] [stdout] 735 | let config_json = std::fs::read_to_string(&get_lym_dir().unwrap().join("config.json")).ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `get_lym_dir().unwrap().join("config.json")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:738:5 [INFO] [stdout] | [INFO] [stdout] 738 | / if let Some(config) = &config_json { [INFO] [stdout] 739 | | if let (Some(username), Some(token)) = ( [INFO] [stdout] 740 | | config.get("github_username").and_then(JsonValue::as_str), [INFO] [stdout] 741 | | config.get("github_token").and_then(JsonValue::as_str) [INFO] [stdout] ... | [INFO] [stdout] 747 | | } [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] 738 ~ if let Some(config) = &config_json [INFO] [stdout] 739 ~ && let (Some(username), Some(token)) = ( [INFO] [stdout] 740 | config.get("github_username").and_then(JsonValue::as_str), [INFO] [stdout] ... [INFO] [stdout] 745 | headers.insert(AUTHORIZATION, HeaderValue::from_str(&auth_header).unwrap()); [INFO] [stdout] 746 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1256:9 [INFO] [stdout] | [INFO] [stdout] 1256 | / if manifest_file.exists() { [INFO] [stdout] 1257 | | if let Ok(data) = fs::read_to_string(&manifest_file) { [INFO] [stdout] 1258 | | if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1264 | | } [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] 1256 ~ if manifest_file.exists() [INFO] [stdout] 1257 ~ && let Ok(data) = fs::read_to_string(&manifest_file) { [INFO] [stdout] 1258 | if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] ... [INFO] [stdout] 1262 | } [INFO] [stdout] 1263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1257:13 [INFO] [stdout] | [INFO] [stdout] 1257 | / if let Ok(data) = fs::read_to_string(&manifest_file) { [INFO] [stdout] 1258 | | if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | | installed_version = Some(ver.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 1263 | | } [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] 1257 ~ if let Ok(data) = fs::read_to_string(&manifest_file) [INFO] [stdout] 1258 ~ && let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | installed_version = Some(ver.to_string()); [INFO] [stdout] 1261 | } [INFO] [stdout] 1262 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1258:17 [INFO] [stdout] | [INFO] [stdout] 1258 | / if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | | installed_version = Some(ver.to_string()); [INFO] [stdout] 1261 | | } [INFO] [stdout] 1262 | | } [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] 1258 ~ if let Ok(manifest_json) = serde_json::from_str::(&data) [INFO] [stdout] 1259 ~ && let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | installed_version = Some(ver.to_string()); [INFO] [stdout] 1261 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:769:13 [INFO] [stdout] | [INFO] [stdout] 769 | / if let Some(parent) = local_file_path.parent() { [INFO] [stdout] 770 | | if let Err(e) = tokio::fs::create_dir_all(parent).await { [INFO] [stdout] 771 | | eprintln!("Failed to create directory '{}': {}", parent.display(), e); [INFO] [stdout] 772 | | pb_clone.inc(1); [INFO] [stdout] ... | [INFO] [stdout] 775 | | } [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] 769 ~ if let Some(parent) = local_file_path.parent() [INFO] [stdout] 770 ~ && let Err(e) = tokio::fs::create_dir_all(parent).await { [INFO] [stdout] 771 | eprintln!("Failed to create directory '{}': {}", parent.display(), e); [INFO] [stdout] 772 | pb_clone.inc(1); [INFO] [stdout] 773 | return; [INFO] [stdout] 774 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/main.rs:777:32 [INFO] [stdout] | [INFO] [stdout] 777 | let timeout_secs = std::cmp::max(30, std::cmp::min(300, 30 + (size / (1024 * 1024)) * 10)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `(30 + (size / (1024 * 1024)) * 10).clamp(30, 300)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1313:5 [INFO] [stdout] | [INFO] [stdout] 1313 | / if let Ok(lym_resp) = client.get(&lym_config_url).send() { [INFO] [stdout] 1314 | | if lym_resp.status().is_success() { [INFO] [stdout] 1315 | | if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1389 | | } [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] 1313 ~ if let Ok(lym_resp) = client.get(&lym_config_url).send() [INFO] [stdout] 1314 ~ && lym_resp.status().is_success() { [INFO] [stdout] 1315 | if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 1387 | } [INFO] [stdout] 1388 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1314:9 [INFO] [stdout] | [INFO] [stdout] 1314 | / if lym_resp.status().is_success() { [INFO] [stdout] 1315 | | if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1317 | | let content = encoded_content.replace('\n', ""); [INFO] [stdout] ... | [INFO] [stdout] 1388 | | } [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] 1314 ~ if lym_resp.status().is_success() [INFO] [stdout] 1315 ~ && let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 1386 | } [INFO] [stdout] 1387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:858:29 [INFO] [stdout] | [INFO] [stdout] 858 | / ... if write_success { [INFO] [stdout] 859 | | ... if let Err(e) = file.flush().await { [INFO] [stdout] 860 | | ... eprintln!("Failed to flush file '{}': {}", local_file_path.display(), e); [INFO] [stdout] 861 | | ... } [INFO] [stdout] 862 | | ... } [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] 858 ~ if write_success [INFO] [stdout] 859 ~ && let Err(e) = file.flush().await { [INFO] [stdout] 860 | eprintln!("Failed to flush file '{}': {}", local_file_path.display(), e); [INFO] [stdout] 861 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1315:13 [INFO] [stdout] | [INFO] [stdout] 1315 | / if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1317 | | let content = encoded_content.replace('\n', ""); [INFO] [stdout] 1318 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(&content) { [INFO] [stdout] ... | [INFO] [stdout] 1387 | | } [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] 1315 ~ if let Ok(lym_json) = lym_resp.json::() [INFO] [stdout] 1316 ~ && let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1317 | let content = encoded_content.replace('\n', ""); [INFO] [stdout] ... [INFO] [stdout] 1385 | } [INFO] [stdout] 1386 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1318:21 [INFO] [stdout] | [INFO] [stdout] 1318 | / if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(&content) { [INFO] [stdout] 1319 | | if let Ok(config_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 1320 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 1321 | | if verbose { [INFO] [stdout] ... | [INFO] [stdout] 1385 | | } [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] 1318 ~ if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(&content) [INFO] [stdout] 1319 ~ && let Ok(config_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 1320 | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] ... [INFO] [stdout] 1383 | } [INFO] [stdout] 1384 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1319:25 [INFO] [stdout] | [INFO] [stdout] 1319 | / if let Ok(config_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 1320 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 1321 | | if verbose { [INFO] [stdout] 1322 | | println!("{}", "Found lym.json configuration".bright_cyan()); [INFO] [stdout] ... | [INFO] [stdout] 1384 | | } [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] 1319 ~ if let Ok(config_str) = String::from_utf8(decoded_bytes) [INFO] [stdout] 1320 ~ && let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 1321 | if verbose { [INFO] [stdout] ... [INFO] [stdout] 1382 | } [INFO] [stdout] 1383 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/main.rs:906:17 [INFO] [stdout] | [INFO] [stdout] 906 | active_downloads.sort_by(|a, b| b.3.cmp(&a.3)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 906 - active_downloads.sort_by(|a, b| b.3.cmp(&a.3)); [INFO] [stdout] 906 + active_downloads.sort_by_key(|b| std::cmp::Reverse(b.3)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:959:15 [INFO] [stdout] | [INFO] [stdout] 959 | while let Some(_) = stream.next().await { [INFO] [stdout] | ----------^^^^^^^---------------------- help: try: `while stream.next().await.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:978:5 [INFO] [stdout] | [INFO] [stdout] 978 | / if let Ok(registry_resp) = client.get(®istry_url).send() { [INFO] [stdout] 979 | | if registry_resp.status().is_success() { [INFO] [stdout] 980 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1015 | | } [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] 978 ~ if let Ok(registry_resp) = client.get(®istry_url).send() [INFO] [stdout] 979 ~ && registry_resp.status().is_success() { [INFO] [stdout] 980 | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 1013 | } [INFO] [stdout] 1014 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:979:9 [INFO] [stdout] | [INFO] [stdout] 979 | / if registry_resp.status().is_success() { [INFO] [stdout] 980 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 1014 | | } [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] 979 ~ if registry_resp.status().is_success() [INFO] [stdout] 980 ~ && let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 1012 | } [INFO] [stdout] 1013 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:980:13 [INFO] [stdout] | [INFO] [stdout] 980 | / if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 981 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... | [INFO] [stdout] 1013 | | } [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] 980 ~ if let Ok(registry_json) = registry_resp.json::() [INFO] [stdout] 981 ~ && let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 1011 | } [INFO] [stdout] 1012 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:981:17 [INFO] [stdout] | [INFO] [stdout] 981 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 982 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 1012 | | } [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] 981 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 982 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 1010 | } [INFO] [stdout] 1011 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:982:21 [INFO] [stdout] | [INFO] [stdout] 982 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 983 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 1011 | | } [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] 982 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 983 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... [INFO] [stdout] 1009 | } [INFO] [stdout] 1010 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:983:25 [INFO] [stdout] | [INFO] [stdout] 983 | / if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 984 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 986 | | for (pkg_folder, pkg_info) in packages { [INFO] [stdout] ... | [INFO] [stdout] 1010 | | } [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] 983 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 984 ~ && let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 1008 | } [INFO] [stdout] 1009 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:984:29 [INFO] [stdout] | [INFO] [stdout] 984 | / ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 985 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 986 | | ... for (pkg_folder, pkg_info) in packages { [INFO] [stdout] 987 | | ... if pkg_folder == package_name { [INFO] [stdout] ... | [INFO] [stdout] 1009 | | ... } [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] 984 ~ if let Ok(registry) = serde_json::from_str::(®istry_str) [INFO] [stdout] 985 ~ && let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 986 | for (pkg_folder, pkg_info) in packages { [INFO] [stdout] ... [INFO] [stdout] 1007 | } [INFO] [stdout] 1008 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:993:49 [INFO] [stdout] | [INFO] [stdout] 993 | / ... if let Some(alias) = name.as_str() { [INFO] [stdout] 994 | | ... if alias == package_name { [INFO] [stdout] 995 | | ... let authors = pkg_info.get("authors") [INFO] [stdout] 996 | | ... .and_then(JsonValue::as_array) [INFO] [stdout] ... | [INFO] [stdout] 1004 | | ... } [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] 993 ~ if let Some(alias) = name.as_str() [INFO] [stdout] 994 ~ && alias == package_name { [INFO] [stdout] 995 | let authors = pkg_info.get("authors") [INFO] [stdout] ... [INFO] [stdout] 1002 | conflicts.push(format!("{} ({})", pkg_folder, authors)); [INFO] [stdout] 1003 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1492:5 [INFO] [stdout] | [INFO] [stdout] 1492 | / if !lym_config.skip_config_check { [INFO] [stdout] 1493 | | if let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) { [INFO] [stdout] 1494 | | if !required_config.is_empty() { [INFO] [stdout] 1495 | | let lucia_config_path = lucia_real [INFO] [stdout] ... | [INFO] [stdout] 1526 | | } [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] 1492 ~ if !lym_config.skip_config_check [INFO] [stdout] 1493 ~ && let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) { [INFO] [stdout] 1494 | if !required_config.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 1524 | } [INFO] [stdout] 1525 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1493:9 [INFO] [stdout] | [INFO] [stdout] 1493 | / if let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) { [INFO] [stdout] 1494 | | if !required_config.is_empty() { [INFO] [stdout] 1495 | | let lucia_config_path = lucia_real [INFO] [stdout] 1496 | | .parent() [INFO] [stdout] ... | [INFO] [stdout] 1525 | | } [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] 1493 ~ if let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) [INFO] [stdout] 1494 ~ && !required_config.is_empty() { [INFO] [stdout] 1495 | let lucia_config_path = lucia_real [INFO] [stdout] ... [INFO] [stdout] 1523 | } [INFO] [stdout] 1524 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1034:5 [INFO] [stdout] | [INFO] [stdout] 1034 | / if let Ok(registry_resp) = client.get(®istry_url).send() { [INFO] [stdout] 1035 | | if registry_resp.status().is_success() { [INFO] [stdout] 1036 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1116 | | } [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] 1034 ~ if let Ok(registry_resp) = client.get(®istry_url).send() [INFO] [stdout] 1035 ~ && registry_resp.status().is_success() { [INFO] [stdout] 1036 | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 1114 | } [INFO] [stdout] 1115 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1035:9 [INFO] [stdout] | [INFO] [stdout] 1035 | / if registry_resp.status().is_success() { [INFO] [stdout] 1036 | | if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 1115 | | } [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] 1035 ~ if registry_resp.status().is_success() [INFO] [stdout] 1036 ~ && let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 1113 | } [INFO] [stdout] 1114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1036:13 [INFO] [stdout] | [INFO] [stdout] 1036 | / if let Ok(registry_json) = registry_resp.json::() { [INFO] [stdout] 1037 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... | [INFO] [stdout] 1114 | | } [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] 1036 ~ if let Ok(registry_json) = registry_resp.json::() [INFO] [stdout] 1037 ~ && let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 1112 | } [INFO] [stdout] 1113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1037:17 [INFO] [stdout] | [INFO] [stdout] 1037 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1038 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 1113 | | } [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] 1037 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 1038 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 1111 | } [INFO] [stdout] 1112 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/main.rs:1538:9 [INFO] [stdout] | [INFO] [stdout] 1538 | / println!("{}", format!("Checking lucia version: required '{}' vs current '{}'", [INFO] [stdout] 1539 | | required_version.bright_green(), current_version.bright_green())); [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1038:21 [INFO] [stdout] | [INFO] [stdout] 1038 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 1039 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 1112 | | } [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] 1038 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 1039 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... [INFO] [stdout] 1110 | } [INFO] [stdout] 1111 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1039:25 [INFO] [stdout] | [INFO] [stdout] 1039 | / if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 1040 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 1042 | | let mut matches = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 1111 | | } [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] 1039 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 1040 ~ && let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 1109 | } [INFO] [stdout] 1110 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1040:29 [INFO] [stdout] | [INFO] [stdout] 1040 | / ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 1041 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 1042 | | ... let mut matches = Vec::new(); [INFO] [stdout] 1043 | | ... for (pkg_folder, pkg_info) in packages { [INFO] [stdout] ... | [INFO] [stdout] 1110 | | ... } [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] 1040 ~ if let Ok(registry) = serde_json::from_str::(®istry_str) [INFO] [stdout] 1041 ~ && let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 1042 | let mut matches = Vec::new(); [INFO] [stdout] ... [INFO] [stdout] 1108 | } [INFO] [stdout] 1109 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1046:49 [INFO] [stdout] | [INFO] [stdout] 1046 | / ... if let Some(alias) = name.as_str() { [INFO] [stdout] 1047 | | ... if alias == pkg_name { [INFO] [stdout] 1048 | | ... let authors = pkg_info.get("authors") [INFO] [stdout] 1049 | | ... .and_then(JsonValue::as_array) [INFO] [stdout] ... | [INFO] [stdout] 1057 | | ... } [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] 1046 ~ if let Some(alias) = name.as_str() [INFO] [stdout] 1047 ~ && alias == pkg_name { [INFO] [stdout] 1048 | let authors = pkg_info.get("authors") [INFO] [stdout] ... [INFO] [stdout] 1055 | matches.push((pkg_folder.clone(), authors)); [INFO] [stdout] 1056 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1079:41 [INFO] [stdout] | [INFO] [stdout] 1079 | / ... if let Ok(choice) = input.trim().parse::() { [INFO] [stdout] 1080 | | ... if choice > 0 && choice <= matches.len() { [INFO] [stdout] 1081 | | ... return Ok(matches[choice - 1].0.clone()); [INFO] [stdout] 1082 | | ... } [INFO] [stdout] 1083 | | ... } [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] 1079 ~ if let Ok(choice) = input.trim().parse::() [INFO] [stdout] 1080 ~ && choice > 0 && choice <= matches.len() { [INFO] [stdout] 1081 | return Ok(matches[choice - 1].0.clone()); [INFO] [stdout] 1082 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1603:25 [INFO] [stdout] | [INFO] [stdout] 1603 | / if dep_manifest.exists() { [INFO] [stdout] 1604 | | if let Ok(data) = fs::read_to_string(&dep_manifest) { [INFO] [stdout] 1605 | | if let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | | dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 1609 | | } [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] 1603 ~ if dep_manifest.exists() [INFO] [stdout] 1604 ~ && let Ok(data) = fs::read_to_string(&dep_manifest) { [INFO] [stdout] 1605 | if let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 1607 | } [INFO] [stdout] 1608 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1604:29 [INFO] [stdout] | [INFO] [stdout] 1604 | / ... if let Ok(data) = fs::read_to_string(&dep_manifest) { [INFO] [stdout] 1605 | | ... if let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | | ... dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 1607 | | ... } [INFO] [stdout] 1608 | | ... } [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] 1604 ~ if let Ok(data) = fs::read_to_string(&dep_manifest) [INFO] [stdout] 1605 ~ && let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 1607 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1104:37 [INFO] [stdout] | [INFO] [stdout] 1104 | / ... if let Some(closest) = find_closest_match(pkg_name, &all_searchable) { [INFO] [stdout] 1105 | | ... if name_to_folder.contains_key(closest) { [INFO] [stdout] 1106 | | ... return Err(format!("Package '{}' not found. Did you mean '{}'?", pkg_name, closest)); [INFO] [stdout] 1107 | | ... } [INFO] [stdout] 1108 | | ... } [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] 1104 ~ if let Some(closest) = find_closest_match(pkg_name, &all_searchable) [INFO] [stdout] 1105 ~ && name_to_folder.contains_key(closest) { [INFO] [stdout] 1106 | return Err(format!("Package '{}' not found. Did you mean '{}'?", pkg_name, closest)); [INFO] [stdout] 1107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:1617:40 [INFO] [stdout] | [INFO] [stdout] 1617 | if cmp_version(&dep_version, &inst_ver) == Some(Ordering::Greater) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `dep_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:1619:47 [INFO] [stdout] | [INFO] [stdout] 1619 | } else if cmp_version(&dep_version, &inst_ver) == Some(Ordering::Less) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `dep_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:1512:24 [INFO] [stdout] | [INFO] [stdout] 1512 | if !lucia_config.get(key).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lucia_config.get(key).is_none()` [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 block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:1674:37 [INFO] [stdout] | [INFO] [stdout] 1674 | / ... if let Err(e) = install_result { [INFO] [stdout] 1675 | | ... return Err(e); [INFO] [stdout] 1676 | | ... } [INFO] [stdout] | |_______________________^ help: replace it with: `install_result?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1726:9 [INFO] [stdout] | [INFO] [stdout] 1726 | / if let Some(ignored_hash) = ignore_hashes.get(relative_path) { [INFO] [stdout] 1727 | | if ignored_hash == remote_sha { [INFO] [stdout] 1728 | | return false; [INFO] [stdout] 1729 | | } [INFO] [stdout] 1730 | | } [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] 1726 ~ if let Some(ignored_hash) = ignore_hashes.get(relative_path) [INFO] [stdout] 1727 ~ && ignored_hash == remote_sha { [INFO] [stdout] 1728 | return false; [INFO] [stdout] 1729 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1732:9 [INFO] [stdout] | [INFO] [stdout] 1732 | / if !overwrite_existing && local_file_path.exists() { [INFO] [stdout] 1733 | | if let Ok(local_hash) = git_blob_hash(local_file_path) { [INFO] [stdout] 1734 | | if local_hash == remote_sha { [INFO] [stdout] 1735 | | return false; [INFO] [stdout] ... | [INFO] [stdout] 1738 | | } [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] 1732 ~ if !overwrite_existing && local_file_path.exists() [INFO] [stdout] 1733 ~ && let Ok(local_hash) = git_blob_hash(local_file_path) { [INFO] [stdout] 1734 | if local_hash == remote_sha { [INFO] [stdout] 1735 | return false; [INFO] [stdout] 1736 | } [INFO] [stdout] 1737 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1733:13 [INFO] [stdout] | [INFO] [stdout] 1733 | / if let Ok(local_hash) = git_blob_hash(local_file_path) { [INFO] [stdout] 1734 | | if local_hash == remote_sha { [INFO] [stdout] 1735 | | return false; [INFO] [stdout] 1736 | | } [INFO] [stdout] 1737 | | } [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] 1733 ~ if let Ok(local_hash) = git_blob_hash(local_file_path) [INFO] [stdout] 1734 ~ && local_hash == remote_sha { [INFO] [stdout] 1735 | return false; [INFO] [stdout] 1736 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/main.rs:1752:10 [INFO] [stdout] | [INFO] [stdout] 1752 | ) -> Result, String> { [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: this function has too many arguments (8/7) [INFO] [stdout] --> src/main.rs:1743:5 [INFO] [stdout] | [INFO] [stdout] 1743 | / fn collect_files_to_download( [INFO] [stdout] 1744 | | client: &Client, [INFO] [stdout] 1745 | | repo_slug: &str, [INFO] [stdout] 1746 | | remote_path: &str, [INFO] [stdout] ... | [INFO] [stdout] 1751 | | ignore_hashes: &HashMap, [INFO] [stdout] 1752 | | ) -> Result, String> { [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:1758:22 [INFO] [stdout] | [INFO] [stdout] 1758 | .get(&format!("https://api.github.com/repos/{}/contents/{}", repo_slug, current_remote_path)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("https://api.github.com/repos/{}/contents/{}", repo_slug, current_remote_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/main.rs:1225:45 [INFO] [stdout] | [INFO] [stdout] 1225 | if name.starts_with('@') { Some(name[1..].to_string()) } else { None } [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/main.rs:1225:13 [INFO] [stdout] | [INFO] [stdout] 1225 | if name.starts_with('@') { Some(name[1..].to_string()) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 1225 - if name.starts_with('@') { Some(name[1..].to_string()) } else { None } [INFO] [stdout] 1225 + if let Some() = name.strip_prefix('@') { Some(.to_string()) } else { None } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1256:9 [INFO] [stdout] | [INFO] [stdout] 1256 | / if manifest_file.exists() { [INFO] [stdout] 1257 | | if let Ok(data) = fs::read_to_string(&manifest_file) { [INFO] [stdout] 1258 | | if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1264 | | } [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] 1256 ~ if manifest_file.exists() [INFO] [stdout] 1257 ~ && let Ok(data) = fs::read_to_string(&manifest_file) { [INFO] [stdout] 1258 | if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] ... [INFO] [stdout] 1262 | } [INFO] [stdout] 1263 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1257:13 [INFO] [stdout] | [INFO] [stdout] 1257 | / if let Ok(data) = fs::read_to_string(&manifest_file) { [INFO] [stdout] 1258 | | if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | | installed_version = Some(ver.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 1263 | | } [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] 1257 ~ if let Ok(data) = fs::read_to_string(&manifest_file) [INFO] [stdout] 1258 ~ && let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | installed_version = Some(ver.to_string()); [INFO] [stdout] 1261 | } [INFO] [stdout] 1262 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1258:17 [INFO] [stdout] | [INFO] [stdout] 1258 | / if let Ok(manifest_json) = serde_json::from_str::(&data) { [INFO] [stdout] 1259 | | if let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | | installed_version = Some(ver.to_string()); [INFO] [stdout] 1261 | | } [INFO] [stdout] 1262 | | } [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] 1258 ~ if let Ok(manifest_json) = serde_json::from_str::(&data) [INFO] [stdout] 1259 ~ && let Some(ver) = manifest_json.get("version").and_then(JsonValue::as_str) { [INFO] [stdout] 1260 | installed_version = Some(ver.to_string()); [INFO] [stdout] 1261 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:1836:18 [INFO] [stdout] | [INFO] [stdout] 1836 | .arg(&script_file) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1313:5 [INFO] [stdout] | [INFO] [stdout] 1313 | / if let Ok(lym_resp) = client.get(&lym_config_url).send() { [INFO] [stdout] 1314 | | if lym_resp.status().is_success() { [INFO] [stdout] 1315 | | if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 1389 | | } [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] 1313 ~ if let Ok(lym_resp) = client.get(&lym_config_url).send() [INFO] [stdout] 1314 ~ && lym_resp.status().is_success() { [INFO] [stdout] 1315 | if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 1387 | } [INFO] [stdout] 1388 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1314:9 [INFO] [stdout] | [INFO] [stdout] 1314 | / if lym_resp.status().is_success() { [INFO] [stdout] 1315 | | if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1317 | | let content = encoded_content.replace('\n', ""); [INFO] [stdout] ... | [INFO] [stdout] 1388 | | } [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] 1314 ~ if lym_resp.status().is_success() [INFO] [stdout] 1315 ~ && let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 1386 | } [INFO] [stdout] 1387 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1315:13 [INFO] [stdout] | [INFO] [stdout] 1315 | / if let Ok(lym_json) = lym_resp.json::() { [INFO] [stdout] 1316 | | if let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1317 | | let content = encoded_content.replace('\n', ""); [INFO] [stdout] 1318 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(&content) { [INFO] [stdout] ... | [INFO] [stdout] 1387 | | } [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] 1315 ~ if let Ok(lym_json) = lym_resp.json::() [INFO] [stdout] 1316 ~ && let Some(encoded_content) = lym_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 1317 | let content = encoded_content.replace('\n', ""); [INFO] [stdout] ... [INFO] [stdout] 1385 | } [INFO] [stdout] 1386 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1318:21 [INFO] [stdout] | [INFO] [stdout] 1318 | / if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(&content) { [INFO] [stdout] 1319 | | if let Ok(config_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 1320 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 1321 | | if verbose { [INFO] [stdout] ... | [INFO] [stdout] 1385 | | } [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] 1318 ~ if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(&content) [INFO] [stdout] 1319 ~ && let Ok(config_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 1320 | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] ... [INFO] [stdout] 1383 | } [INFO] [stdout] 1384 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1319:25 [INFO] [stdout] | [INFO] [stdout] 1319 | / if let Ok(config_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 1320 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 1321 | | if verbose { [INFO] [stdout] 1322 | | println!("{}", "Found lym.json configuration".bright_cyan()); [INFO] [stdout] ... | [INFO] [stdout] 1384 | | } [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] 1319 ~ if let Ok(config_str) = String::from_utf8(decoded_bytes) [INFO] [stdout] 1320 ~ && let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 1321 | if verbose { [INFO] [stdout] ... [INFO] [stdout] 1382 | } [INFO] [stdout] 1383 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2030:5 [INFO] [stdout] | [INFO] [stdout] 2030 | / if !store_dir.exists() { [INFO] [stdout] 2031 | | if let Err(e) = fs::create_dir_all(&store_dir) { [INFO] [stdout] 2032 | | eprintln!("{}", format!("Failed to create store dir: {}", e).red()); [INFO] [stdout] 2033 | | exit(1); [INFO] [stdout] 2034 | | } [INFO] [stdout] 2035 | | } [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] 2030 ~ if !store_dir.exists() [INFO] [stdout] 2031 ~ && let Err(e) = fs::create_dir_all(&store_dir) { [INFO] [stdout] 2032 | eprintln!("{}", format!("Failed to create store dir: {}", e).red()); [INFO] [stdout] 2033 | exit(1); [INFO] [stdout] 2034 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1492:5 [INFO] [stdout] | [INFO] [stdout] 1492 | / if !lym_config.skip_config_check { [INFO] [stdout] 1493 | | if let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) { [INFO] [stdout] 1494 | | if !required_config.is_empty() { [INFO] [stdout] 1495 | | let lucia_config_path = lucia_real [INFO] [stdout] ... | [INFO] [stdout] 1526 | | } [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] 1492 ~ if !lym_config.skip_config_check [INFO] [stdout] 1493 ~ && let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) { [INFO] [stdout] 1494 | if !required_config.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 1524 | } [INFO] [stdout] 1525 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1493:9 [INFO] [stdout] | [INFO] [stdout] 1493 | / if let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) { [INFO] [stdout] 1494 | | if !required_config.is_empty() { [INFO] [stdout] 1495 | | let lucia_config_path = lucia_real [INFO] [stdout] 1496 | | .parent() [INFO] [stdout] ... | [INFO] [stdout] 1525 | | } [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] 1493 ~ if let Some(required_config) = manifest.get("config").and_then(JsonValue::as_object) [INFO] [stdout] 1494 ~ && !required_config.is_empty() { [INFO] [stdout] 1495 | let lucia_config_path = lucia_real [INFO] [stdout] ... [INFO] [stdout] 1523 | } [INFO] [stdout] 1524 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/main.rs:1538:9 [INFO] [stdout] | [INFO] [stdout] 1538 | / println!("{}", format!("Checking lucia version: required '{}' vs current '{}'", [INFO] [stdout] 1539 | | required_version.bright_green(), current_version.bright_green())); [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1603:25 [INFO] [stdout] | [INFO] [stdout] 1603 | / if dep_manifest.exists() { [INFO] [stdout] 1604 | | if let Ok(data) = fs::read_to_string(&dep_manifest) { [INFO] [stdout] 1605 | | if let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | | dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 1609 | | } [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] 1603 ~ if dep_manifest.exists() [INFO] [stdout] 1604 ~ && let Ok(data) = fs::read_to_string(&dep_manifest) { [INFO] [stdout] 1605 | if let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 1607 | } [INFO] [stdout] 1608 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1604:29 [INFO] [stdout] | [INFO] [stdout] 1604 | / ... if let Ok(data) = fs::read_to_string(&dep_manifest) { [INFO] [stdout] 1605 | | ... if let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | | ... dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 1607 | | ... } [INFO] [stdout] 1608 | | ... } [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] 1604 ~ if let Ok(data) = fs::read_to_string(&dep_manifest) [INFO] [stdout] 1605 ~ && let Ok(json) = serde_json::from_str::(&data) { [INFO] [stdout] 1606 | dep_installed_version = json.get("version").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 1607 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:1617:40 [INFO] [stdout] | [INFO] [stdout] 1617 | if cmp_version(&dep_version, &inst_ver) == Some(Ordering::Greater) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `dep_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:1619:47 [INFO] [stdout] | [INFO] [stdout] 1619 | } else if cmp_version(&dep_version, &inst_ver) == Some(Ordering::Less) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `dep_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2246:5 [INFO] [stdout] | [INFO] [stdout] 2246 | / if !show_info_all && module_name_filter.is_none() { [INFO] [stdout] 2247 | | if let Ok(registry_resp) = client.get(®istry_url).send().await { [INFO] [stdout] 2248 | | if registry_resp.status().is_success() { [INFO] [stdout] 2249 | | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] ... | [INFO] [stdout] 2283 | | } [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] 2246 ~ if !show_info_all && module_name_filter.is_none() [INFO] [stdout] 2247 ~ && let Ok(registry_resp) = client.get(®istry_url).send().await { [INFO] [stdout] 2248 | if registry_resp.status().is_success() { [INFO] [stdout] ... [INFO] [stdout] 2281 | } [INFO] [stdout] 2282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2247:9 [INFO] [stdout] | [INFO] [stdout] 2247 | / if let Ok(registry_resp) = client.get(®istry_url).send().await { [INFO] [stdout] 2248 | | if registry_resp.status().is_success() { [INFO] [stdout] 2249 | | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 2282 | | } [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] 2247 ~ if let Ok(registry_resp) = client.get(®istry_url).send().await [INFO] [stdout] 2248 ~ && registry_resp.status().is_success() { [INFO] [stdout] 2249 | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] ... [INFO] [stdout] 2280 | } [INFO] [stdout] 2281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/main.rs:1674:37 [INFO] [stdout] | [INFO] [stdout] 1674 | / ... if let Err(e) = install_result { [INFO] [stdout] 1675 | | ... return Err(e); [INFO] [stdout] 1676 | | ... } [INFO] [stdout] | |_______________________^ help: replace it with: `install_result?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2248:13 [INFO] [stdout] | [INFO] [stdout] 2248 | / if registry_resp.status().is_success() { [INFO] [stdout] 2249 | | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2281 | | } [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] 2248 ~ if registry_resp.status().is_success() [INFO] [stdout] 2249 ~ && let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2279 | } [INFO] [stdout] 2280 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2249:17 [INFO] [stdout] | [INFO] [stdout] 2249 | / if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... | [INFO] [stdout] 2280 | | } [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] 2249 ~ if let Ok(registry_json) = registry_resp.json::().await [INFO] [stdout] 2250 ~ && let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2278 | } [INFO] [stdout] 2279 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2250:21 [INFO] [stdout] | [INFO] [stdout] 2250 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 2279 | | } [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] 2250 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2251 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 2277 | } [INFO] [stdout] 2278 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2251:25 [INFO] [stdout] | [INFO] [stdout] 2251 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 2278 | | } [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] 2251 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 2252 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... [INFO] [stdout] 2276 | } [INFO] [stdout] 2277 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1726:9 [INFO] [stdout] | [INFO] [stdout] 1726 | / if let Some(ignored_hash) = ignore_hashes.get(relative_path) { [INFO] [stdout] 1727 | | if ignored_hash == remote_sha { [INFO] [stdout] 1728 | | return false; [INFO] [stdout] 1729 | | } [INFO] [stdout] 1730 | | } [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] 1726 ~ if let Some(ignored_hash) = ignore_hashes.get(relative_path) [INFO] [stdout] 1727 ~ && ignored_hash == remote_sha { [INFO] [stdout] 1728 | return false; [INFO] [stdout] 1729 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2252:29 [INFO] [stdout] | [INFO] [stdout] 2252 | / ... if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | | ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 2255 | | ... for (pkg_name, pkg_info) in packages { [INFO] [stdout] ... | [INFO] [stdout] 2277 | | ... } [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] 2252 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 2253 ~ && let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 2275 | } [INFO] [stdout] 2276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1732:9 [INFO] [stdout] | [INFO] [stdout] 1732 | / if !overwrite_existing && local_file_path.exists() { [INFO] [stdout] 1733 | | if let Ok(local_hash) = git_blob_hash(local_file_path) { [INFO] [stdout] 1734 | | if local_hash == remote_sha { [INFO] [stdout] 1735 | | return false; [INFO] [stdout] ... | [INFO] [stdout] 1738 | | } [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] 1732 ~ if !overwrite_existing && local_file_path.exists() [INFO] [stdout] 1733 ~ && let Ok(local_hash) = git_blob_hash(local_file_path) { [INFO] [stdout] 1734 | if local_hash == remote_sha { [INFO] [stdout] 1735 | return false; [INFO] [stdout] 1736 | } [INFO] [stdout] 1737 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2253:33 [INFO] [stdout] | [INFO] [stdout] 2253 | / ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 2255 | | ... for (pkg_name, pkg_info) in packages { [INFO] [stdout] 2256 | | ... let mut line = format!(" {}", pkg_name.bright_cyan()); [INFO] [stdout] ... | [INFO] [stdout] 2276 | | ... } [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] 2253 ~ if let Ok(registry) = serde_json::from_str::(®istry_str) [INFO] [stdout] 2254 ~ && let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 2255 | for (pkg_name, pkg_info) in packages { [INFO] [stdout] ... [INFO] [stdout] 2274 | return; [INFO] [stdout] 2275 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2258:45 [INFO] [stdout] | [INFO] [stdout] 2258 | / ... if show_ver { [INFO] [stdout] 2259 | | ... if let Some(version) = pkg_info.get("latest_version").and_then(JsonValue::as_str) { [INFO] [stdout] 2260 | | ... line += &format!(" v{}", version); [INFO] [stdout] 2261 | | ... } [INFO] [stdout] 2262 | | ... } [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] 2258 ~ if show_ver [INFO] [stdout] 2259 ~ && let Some(version) = pkg_info.get("latest_version").and_then(JsonValue::as_str) { [INFO] [stdout] 2260 | line += &format!(" v{}", version); [INFO] [stdout] 2261 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:1733:13 [INFO] [stdout] | [INFO] [stdout] 1733 | / if let Ok(local_hash) = git_blob_hash(local_file_path) { [INFO] [stdout] 1734 | | if local_hash == remote_sha { [INFO] [stdout] 1735 | | return false; [INFO] [stdout] 1736 | | } [INFO] [stdout] 1737 | | } [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] 1733 ~ if let Ok(local_hash) = git_blob_hash(local_file_path) [INFO] [stdout] 1734 ~ && local_hash == remote_sha { [INFO] [stdout] 1735 | return false; [INFO] [stdout] 1736 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/main.rs:1752:10 [INFO] [stdout] | [INFO] [stdout] 1752 | ) -> Result, String> { [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: this function has too many arguments (8/7) [INFO] [stdout] --> src/main.rs:1743:5 [INFO] [stdout] | [INFO] [stdout] 1743 | / fn collect_files_to_download( [INFO] [stdout] 1744 | | client: &Client, [INFO] [stdout] 1745 | | repo_slug: &str, [INFO] [stdout] 1746 | | remote_path: &str, [INFO] [stdout] ... | [INFO] [stdout] 1751 | | ignore_hashes: &HashMap, [INFO] [stdout] 1752 | | ) -> Result, String> { [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:1758:22 [INFO] [stdout] | [INFO] [stdout] 1758 | .get(&format!("https://api.github.com/repos/{}/contents/{}", repo_slug, current_remote_path)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("https://api.github.com/repos/{}/contents/{}", repo_slug, current_remote_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2264:45 [INFO] [stdout] | [INFO] [stdout] 2264 | / ... if show_desc { [INFO] [stdout] 2265 | | ... if let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2266 | | ... if !desc.is_empty() { [INFO] [stdout] 2267 | | ... line += &format!(" - {}", desc); [INFO] [stdout] ... | [INFO] [stdout] 2270 | | ... } [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] 2264 ~ if show_desc [INFO] [stdout] 2265 ~ && let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2266 | if !desc.is_empty() { [INFO] [stdout] 2267 | line += &format!(" - {}", desc); [INFO] [stdout] 2268 | } [INFO] [stdout] 2269 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2265:49 [INFO] [stdout] | [INFO] [stdout] 2265 | / ... if let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2266 | | ... if !desc.is_empty() { [INFO] [stdout] 2267 | | ... line += &format!(" - {}", desc); [INFO] [stdout] 2268 | | ... } [INFO] [stdout] 2269 | | ... } [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] 2265 ~ if let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) [INFO] [stdout] 2266 ~ && !desc.is_empty() { [INFO] [stdout] 2267 | line += &format!(" - {}", desc); [INFO] [stdout] 2268 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2314:9 [INFO] [stdout] | [INFO] [stdout] 2314 | / if let Some(filter) = &module_name_filter { [INFO] [stdout] 2315 | | if name != filter { continue; } [INFO] [stdout] 2316 | | } [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] 2314 ~ if let Some(filter) = &module_name_filter [INFO] [stdout] 2315 ~ && name != filter { continue; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:2343:13 [INFO] [stdout] | [INFO] [stdout] 2343 | / if let Some(info) = package_info { [INFO] [stdout] 2344 | | println!("{}", info); [INFO] [stdout] 2345 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:2342:19 [INFO] [stdout] | [INFO] [stdout] 2342 | if let Ok(package_info) = result { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 2343 | if let Some(info) = package_info { [INFO] [stdout] | ^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2342:9 [INFO] [stdout] | [INFO] [stdout] 2342 | / if let Ok(package_info) = result { [INFO] [stdout] 2343 | | if let Some(info) = package_info { [INFO] [stdout] 2344 | | println!("{}", info); [INFO] [stdout] 2345 | | } [INFO] [stdout] 2346 | | } [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] 2342 ~ if let Ok(package_info) = result [INFO] [stdout] 2343 ~ && let Some(info) = package_info { [INFO] [stdout] 2344 | println!("{}", info); [INFO] [stdout] 2345 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:1836:18 [INFO] [stdout] | [INFO] [stdout] 1836 | .arg(&script_file) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2403:9 [INFO] [stdout] | [INFO] [stdout] 2403 | / if let Ok(manifest_resp) = client.get(&manifest_url).send().await { [INFO] [stdout] 2404 | | if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2405 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2494 | | } [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] 2403 ~ if let Ok(manifest_resp) = client.get(&manifest_url).send().await [INFO] [stdout] 2404 ~ && let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2405 | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2492 | } [INFO] [stdout] 2493 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2404:13 [INFO] [stdout] | [INFO] [stdout] 2404 | / if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2405 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... | [INFO] [stdout] 2493 | | } [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] 2404 ~ if let Ok(manifest_json) = manifest_resp.json::().await [INFO] [stdout] 2405 ~ && let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2491 | } [INFO] [stdout] 2492 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2405:17 [INFO] [stdout] | [INFO] [stdout] 2405 | / if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... | [INFO] [stdout] 2492 | | } [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] 2405 ~ if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2406 ~ && let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... [INFO] [stdout] 2490 | } [INFO] [stdout] 2491 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2406:21 [INFO] [stdout] | [INFO] [stdout] 2406 | / if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2409 | | let authors = manifest.get("authors") [INFO] [stdout] ... | [INFO] [stdout] 2491 | | } [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] 2406 ~ if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) [INFO] [stdout] 2407 ~ && let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... [INFO] [stdout] 2489 | } [INFO] [stdout] 2490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2407:25 [INFO] [stdout] | [INFO] [stdout] 2407 | / if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2409 | | let authors = manifest.get("authors") [INFO] [stdout] 2410 | | .and_then(JsonValue::as_array) [INFO] [stdout] ... | [INFO] [stdout] 2490 | | } [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] 2407 ~ if let Ok(decoded_str) = String::from_utf8(decoded_bytes) [INFO] [stdout] 2408 ~ && let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2409 | let authors = manifest.get("authors") [INFO] [stdout] ... [INFO] [stdout] 2488 | return Some(String::new()); [INFO] [stdout] 2489 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2441:41 [INFO] [stdout] | [INFO] [stdout] 2441 | / ... if let Ok(ver_resp) = client_clone.get(&ver_manifest_url).send().await { [INFO] [stdout] 2442 | | ... if let Ok(ver_json) = ver_resp.json::().await { [INFO] [stdout] 2443 | | ... if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | | ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2468 | | ... } [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] 2441 ~ if let Ok(ver_resp) = client_clone.get(&ver_manifest_url).send().await [INFO] [stdout] 2442 ~ && let Ok(ver_json) = ver_resp.json::().await { [INFO] [stdout] 2443 | if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2466 | } [INFO] [stdout] 2467 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2442:45 [INFO] [stdout] | [INFO] [stdout] 2442 | / ... if let Ok(ver_json) = ver_resp.json::().await { [INFO] [stdout] 2443 | | ... if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | | ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | | ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] ... | [INFO] [stdout] 2467 | | ... } [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] 2442 ~ if let Ok(ver_json) = ver_resp.json::().await [INFO] [stdout] 2443 ~ && let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2465 | } [INFO] [stdout] 2466 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2443:49 [INFO] [stdout] | [INFO] [stdout] 2443 | / ... if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | | ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | | ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | | ... if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] ... | [INFO] [stdout] 2466 | | ... } [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] 2443 ~ if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2444 ~ && let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] ... [INFO] [stdout] 2464 | } [INFO] [stdout] 2465 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2444:53 [INFO] [stdout] | [INFO] [stdout] 2444 | / ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | | ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | | ... if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] 2447 | | ... let desc = ver_manifest.get("description").and_then(JsonValue::as_str).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 2465 | | ... } [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] 2444 ~ if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) [INFO] [stdout] 2445 ~ && let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] ... [INFO] [stdout] 2463 | } [INFO] [stdout] 2464 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2445:57 [INFO] [stdout] | [INFO] [stdout] 2445 | / ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | | ... if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] 2447 | | ... let desc = ver_manifest.get("description").and_then(JsonValue::as_str).unwrap_or(""); [INFO] [stdout] 2448 | | ... let mut result = format!(" {} - {}", format!("v{}", ver_clone).green(), desc); [INFO] [stdout] ... | [INFO] [stdout] 2464 | | ... } [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] 2445 ~ if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) [INFO] [stdout] 2446 ~ && let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] 2447 | let desc = ver_manifest.get("description").and_then(JsonValue::as_str).unwrap_or(""); [INFO] [stdout] ... [INFO] [stdout] 2462 | return Some((ver_clone, result)); [INFO] [stdout] 2463 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2450:65 [INFO] [stdout] | [INFO] [stdout] 2450 | / ... if ver_clone == latest_ver_clone { [INFO] [stdout] 2451 | | ... if let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2452 | | ... if !deps_obj.is_empty() { [INFO] [stdout] 2453 | | ... result += "\n Dependencies:"; [INFO] [stdout] ... | [INFO] [stdout] 2461 | | ... } [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] 2450 ~ if ver_clone == latest_ver_clone [INFO] [stdout] 2451 ~ && let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2452 | if !deps_obj.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 2459 | } [INFO] [stdout] 2460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2451:69 [INFO] [stdout] | [INFO] [stdout] 2451 | / ... if let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2452 | | ... if !deps_obj.is_empty() { [INFO] [stdout] 2453 | | ... result += "\n Dependencies:"; [INFO] [stdout] 2454 | | ... for (dep_name, dep_version) in deps_obj { [INFO] [stdout] ... | [INFO] [stdout] 2460 | | ... } [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] 2451 ~ if let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) [INFO] [stdout] 2452 ~ && !deps_obj.is_empty() { [INFO] [stdout] 2453 | result += "\n Dependencies:"; [INFO] [stdout] ... [INFO] [stdout] 2458 | } [INFO] [stdout] 2459 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2030:5 [INFO] [stdout] | [INFO] [stdout] 2030 | / if !store_dir.exists() { [INFO] [stdout] 2031 | | if let Err(e) = fs::create_dir_all(&store_dir) { [INFO] [stdout] 2032 | | eprintln!("{}", format!("Failed to create store dir: {}", e).red()); [INFO] [stdout] 2033 | | exit(1); [INFO] [stdout] 2034 | | } [INFO] [stdout] 2035 | | } [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] 2030 ~ if !store_dir.exists() [INFO] [stdout] 2031 ~ && let Err(e) = fs::create_dir_all(&store_dir) { [INFO] [stdout] 2032 | eprintln!("{}", format!("Failed to create store dir: {}", e).red()); [INFO] [stdout] 2033 | exit(1); [INFO] [stdout] 2034 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2508:9 [INFO] [stdout] | [INFO] [stdout] 2508 | / if let Ok(manifest_resp) = client.get(&manifest_url).send().await { [INFO] [stdout] 2509 | | if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2510 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2524 | | } [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] 2508 ~ if let Ok(manifest_resp) = client.get(&manifest_url).send().await [INFO] [stdout] 2509 ~ && let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2510 | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2522 | } [INFO] [stdout] 2523 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2509:13 [INFO] [stdout] | [INFO] [stdout] 2509 | / if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2510 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... | [INFO] [stdout] 2523 | | } [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] 2509 ~ if let Ok(manifest_json) = manifest_resp.json::().await [INFO] [stdout] 2510 ~ && let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2521 | } [INFO] [stdout] 2522 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2510:17 [INFO] [stdout] | [INFO] [stdout] 2510 | / if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... | [INFO] [stdout] 2522 | | } [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] 2510 ~ if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2511 ~ && let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... [INFO] [stdout] 2520 | } [INFO] [stdout] 2521 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2511:21 [INFO] [stdout] | [INFO] [stdout] 2511 | / if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | | if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 2521 | | } [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] 2511 ~ if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) [INFO] [stdout] 2512 ~ && let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... [INFO] [stdout] 2519 | } [INFO] [stdout] 2520 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2512:25 [INFO] [stdout] | [INFO] [stdout] 2512 | / if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | | if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | | if !desc.is_empty() { [INFO] [stdout] ... | [INFO] [stdout] 2520 | | } [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] 2512 ~ if let Ok(decoded_str) = String::from_utf8(decoded_bytes) [INFO] [stdout] 2513 ~ && let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2518 | } [INFO] [stdout] 2519 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2513:29 [INFO] [stdout] | [INFO] [stdout] 2513 | / ... if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | | ... if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | | ... if !desc.is_empty() { [INFO] [stdout] 2516 | | ... line += &format!(" - {}", desc); [INFO] [stdout] ... | [INFO] [stdout] 2519 | | ... } [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] 2513 ~ if let Ok(manifest) = serde_json::from_str::(&decoded_str) [INFO] [stdout] 2514 ~ && let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | if !desc.is_empty() { [INFO] [stdout] 2516 | line += &format!(" - {}", desc); [INFO] [stdout] 2517 | } [INFO] [stdout] 2518 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2514:33 [INFO] [stdout] | [INFO] [stdout] 2514 | / ... if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | | ... if !desc.is_empty() { [INFO] [stdout] 2516 | | ... line += &format!(" - {}", desc); [INFO] [stdout] 2517 | | ... } [INFO] [stdout] 2518 | | ... } [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] 2514 ~ if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) [INFO] [stdout] 2515 ~ && !desc.is_empty() { [INFO] [stdout] 2516 | line += &format!(" - {}", desc); [INFO] [stdout] 2517 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/main.rs:2607:9 [INFO] [stdout] | [INFO] [stdout] 2607 | / for entry in entries { [INFO] [stdout] 2608 | | if let Ok(entry) = entry { [INFO] [stdout] 2609 | | let path = entry.path(); [INFO] [stdout] 2610 | | let module_name = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 2691 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/main.rs:2608:13 [INFO] [stdout] | [INFO] [stdout] 2608 | / if let Ok(entry) = entry { [INFO] [stdout] 2609 | | let path = entry.path(); [INFO] [stdout] 2610 | | let module_name = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 2690 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2607 ~ for entry in entries.flatten() { [INFO] [stdout] 2608 + let path = entry.path(); [INFO] [stdout] 2609 + let module_name = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); [INFO] [stdout] 2610 + [INFO] [stdout] 2611 + if let Some(ref filter) = module_name_filter { [INFO] [stdout] 2612 + if module_name != filter { [INFO] [stdout] 2613 + continue; [INFO] [stdout] 2614 + } [INFO] [stdout] 2615 + } [INFO] [stdout] 2616 + [INFO] [stdout] 2617 + let is_std = STD_LIBS.contains_key(module_name); [INFO] [stdout] 2618 + if !list_std && is_std { [INFO] [stdout] 2619 + continue; [INFO] [stdout] 2620 + } [INFO] [stdout] 2621 + [INFO] [stdout] 2622 + let mut versions = vec![]; [INFO] [stdout] 2623 + let mut description: Option = None; [INFO] [stdout] 2624 + [INFO] [stdout] 2625 + if path.is_dir() { [INFO] [stdout] 2626 + let manifest_path = path.join("manifest.json"); [INFO] [stdout] 2627 + if manifest_path.exists() { [INFO] [stdout] 2628 + if let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2629 + if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2630 + let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] 2631 + versions.push(current_version); [INFO] [stdout] 2632 + description = manifest_json.get("description").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 2633 + [INFO] [stdout] 2634 + if show_all_versions { [INFO] [stdout] 2635 + if let Some(authors_array) = manifest_json.get("authors").and_then(JsonValue::as_array) { [INFO] [stdout] 2636 + let authors: Vec = authors_array.iter() [INFO] [stdout] 2637 + .filter_map(|v| v.as_str()) [INFO] [stdout] 2638 + .map(|s| s.to_string()) [INFO] [stdout] 2639 + .collect(); [INFO] [stdout] 2640 + if !authors.is_empty() { [INFO] [stdout] 2641 + let author_str = authors.iter().map(|a| a.yellow().to_string()).collect::>().join(", "); [INFO] [stdout] 2642 + println!(" Authors: {}", author_str); [INFO] [stdout] 2643 + } [INFO] [stdout] 2644 + } [INFO] [stdout] 2645 + [INFO] [stdout] 2646 + if let Some(deps_obj) = manifest_json.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2647 + if !deps_obj.is_empty() { [INFO] [stdout] 2648 + println!(" Dependencies:"); [INFO] [stdout] 2649 + for (dep_name, dep_version) in deps_obj { [INFO] [stdout] 2650 + if let Some(ver_str) = dep_version.as_str() { [INFO] [stdout] 2651 + println!(" {} {}", dep_name.bright_magenta(), ver_str.green()); [INFO] [stdout] 2652 + } [INFO] [stdout] 2653 + } [INFO] [stdout] 2654 + } [INFO] [stdout] 2655 + } [INFO] [stdout] 2656 + } [INFO] [stdout] 2657 + } [INFO] [stdout] 2658 + } [INFO] [stdout] 2659 + } [INFO] [stdout] 2660 + } [INFO] [stdout] 2661 + [INFO] [stdout] 2662 + if is_std { [INFO] [stdout] 2663 + if let Some(std_info) = STD_LIBS.get(module_name) { [INFO] [stdout] 2664 + versions.push(std_info.version.to_string()); [INFO] [stdout] 2665 + description = Some(std_info.description.to_string()); [INFO] [stdout] 2666 + } [INFO] [stdout] 2667 + } [INFO] [stdout] 2668 + [INFO] [stdout] 2669 + for ver in versions { [INFO] [stdout] 2670 + let mut line = if is_std { [INFO] [stdout] 2671 + format!(" {} [standard lib]", module_name.bright_blue().bold()) [INFO] [stdout] 2672 + } else { [INFO] [stdout] 2673 + format!(" {}", module_name.bright_cyan()) [INFO] [stdout] 2674 + }; [INFO] [stdout] 2675 + [INFO] [stdout] 2676 + if show_ver { [INFO] [stdout] 2677 + line += &format!(" v{}", ver); [INFO] [stdout] 2678 + } [INFO] [stdout] 2679 + if show_desc { [INFO] [stdout] 2680 + if let Some(ref desc) = description { [INFO] [stdout] 2681 + if !desc.is_empty() { [INFO] [stdout] 2682 + line += &format!(" - {}", desc); [INFO] [stdout] 2683 + } [INFO] [stdout] 2684 + } [INFO] [stdout] 2685 + } [INFO] [stdout] 2686 + [INFO] [stdout] 2687 + println!("{}", line); [INFO] [stdout] 2688 + } [INFO] [stdout] 2689 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2612:17 [INFO] [stdout] | [INFO] [stdout] 2612 | / if let Some(ref filter) = module_name_filter { [INFO] [stdout] 2613 | | if module_name != filter { [INFO] [stdout] 2614 | | continue; [INFO] [stdout] 2615 | | } [INFO] [stdout] 2616 | | } [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] 2612 ~ if let Some(ref filter) = module_name_filter [INFO] [stdout] 2613 ~ && module_name != filter { [INFO] [stdout] 2614 | continue; [INFO] [stdout] 2615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2628:21 [INFO] [stdout] | [INFO] [stdout] 2628 | / ... if manifest_path.exists() { [INFO] [stdout] 2629 | | ... if let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2630 | | ... if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2631 | | ... let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2660 | | ... } [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] 2628 ~ if manifest_path.exists() [INFO] [stdout] 2629 ~ && let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2630 | if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] ... [INFO] [stdout] 2658 | } [INFO] [stdout] 2659 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2629:25 [INFO] [stdout] | [INFO] [stdout] 2629 | / ... if let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2630 | | ... if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2631 | | ... let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] 2632 | | ... versions.push(current_version); [INFO] [stdout] ... | [INFO] [stdout] 2659 | | ... } [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] 2629 ~ if let Ok(manifest_str) = fs::read_to_string(&manifest_path) [INFO] [stdout] 2630 ~ && let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2631 | let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] ... [INFO] [stdout] 2657 | } [INFO] [stdout] 2658 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2647:37 [INFO] [stdout] | [INFO] [stdout] 2647 | / ... if let Some(deps_obj) = manifest_json.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2648 | | ... if !deps_obj.is_empty() { [INFO] [stdout] 2649 | | ... println!(" Dependencies:"); [INFO] [stdout] 2650 | | ... for (dep_name, dep_version) in deps_obj { [INFO] [stdout] ... | [INFO] [stdout] 2656 | | ... } [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] 2647 ~ if let Some(deps_obj) = manifest_json.get("dependencies").and_then(JsonValue::as_object) [INFO] [stdout] 2648 ~ && !deps_obj.is_empty() { [INFO] [stdout] 2649 | println!(" Dependencies:"); [INFO] [stdout] ... [INFO] [stdout] 2654 | } [INFO] [stdout] 2655 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2663:17 [INFO] [stdout] | [INFO] [stdout] 2663 | / if is_std { [INFO] [stdout] 2664 | | if let Some(std_info) = STD_LIBS.get(module_name) { [INFO] [stdout] 2665 | | versions.push(std_info.version.to_string()); [INFO] [stdout] 2666 | | description = Some(std_info.description.to_string()); [INFO] [stdout] 2667 | | } [INFO] [stdout] 2668 | | } [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] 2663 ~ if is_std [INFO] [stdout] 2664 ~ && let Some(std_info) = STD_LIBS.get(module_name) { [INFO] [stdout] 2665 | versions.push(std_info.version.to_string()); [INFO] [stdout] 2666 | description = Some(std_info.description.to_string()); [INFO] [stdout] 2667 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2680:21 [INFO] [stdout] | [INFO] [stdout] 2680 | / if show_desc { [INFO] [stdout] 2681 | | if let Some(ref desc) = description { [INFO] [stdout] 2682 | | if !desc.is_empty() { [INFO] [stdout] 2683 | | line += &format!(" - {}", desc); [INFO] [stdout] ... | [INFO] [stdout] 2686 | | } [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] 2680 ~ if show_desc [INFO] [stdout] 2681 ~ && let Some(ref desc) = description { [INFO] [stdout] 2682 | if !desc.is_empty() { [INFO] [stdout] 2683 | line += &format!(" - {}", desc); [INFO] [stdout] 2684 | } [INFO] [stdout] 2685 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2246:5 [INFO] [stdout] | [INFO] [stdout] 2246 | / if !show_info_all && module_name_filter.is_none() { [INFO] [stdout] 2247 | | if let Ok(registry_resp) = client.get(®istry_url).send().await { [INFO] [stdout] 2248 | | if registry_resp.status().is_success() { [INFO] [stdout] 2249 | | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] ... | [INFO] [stdout] 2283 | | } [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] 2246 ~ if !show_info_all && module_name_filter.is_none() [INFO] [stdout] 2247 ~ && let Ok(registry_resp) = client.get(®istry_url).send().await { [INFO] [stdout] 2248 | if registry_resp.status().is_success() { [INFO] [stdout] ... [INFO] [stdout] 2281 | } [INFO] [stdout] 2282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2681:25 [INFO] [stdout] | [INFO] [stdout] 2681 | / if let Some(ref desc) = description { [INFO] [stdout] 2682 | | if !desc.is_empty() { [INFO] [stdout] 2683 | | line += &format!(" - {}", desc); [INFO] [stdout] 2684 | | } [INFO] [stdout] 2685 | | } [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] 2681 ~ if let Some(ref desc) = description [INFO] [stdout] 2682 ~ && !desc.is_empty() { [INFO] [stdout] 2683 | line += &format!(" - {}", desc); [INFO] [stdout] 2684 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2247:9 [INFO] [stdout] | [INFO] [stdout] 2247 | / if let Ok(registry_resp) = client.get(®istry_url).send().await { [INFO] [stdout] 2248 | | if registry_resp.status().is_success() { [INFO] [stdout] 2249 | | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 2282 | | } [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] 2247 ~ if let Ok(registry_resp) = client.get(®istry_url).send().await [INFO] [stdout] 2248 ~ && registry_resp.status().is_success() { [INFO] [stdout] 2249 | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] ... [INFO] [stdout] 2280 | } [INFO] [stdout] 2281 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2248:13 [INFO] [stdout] | [INFO] [stdout] 2248 | / if registry_resp.status().is_success() { [INFO] [stdout] 2249 | | if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2281 | | } [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] 2248 ~ if registry_resp.status().is_success() [INFO] [stdout] 2249 ~ && let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2279 | } [INFO] [stdout] 2280 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2249:17 [INFO] [stdout] | [INFO] [stdout] 2249 | / if let Ok(registry_json) = registry_resp.json::().await { [INFO] [stdout] 2250 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... | [INFO] [stdout] 2280 | | } [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] 2249 ~ if let Ok(registry_json) = registry_resp.json::().await [INFO] [stdout] 2250 ~ && let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2278 | } [INFO] [stdout] 2279 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2250:21 [INFO] [stdout] | [INFO] [stdout] 2250 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2251 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 2279 | | } [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] 2250 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2251 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 2277 | } [INFO] [stdout] 2278 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2251:25 [INFO] [stdout] | [INFO] [stdout] 2251 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 2252 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 2278 | | } [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] 2251 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 2252 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... [INFO] [stdout] 2276 | } [INFO] [stdout] 2277 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2252:29 [INFO] [stdout] | [INFO] [stdout] 2252 | / ... if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 2253 | | ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 2255 | | ... for (pkg_name, pkg_info) in packages { [INFO] [stdout] ... | [INFO] [stdout] 2277 | | ... } [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] 2252 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 2253 ~ && let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 2275 | } [INFO] [stdout] 2276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2253:33 [INFO] [stdout] | [INFO] [stdout] 2253 | / ... if let Ok(registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 2254 | | ... if let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 2255 | | ... for (pkg_name, pkg_info) in packages { [INFO] [stdout] 2256 | | ... let mut line = format!(" {}", pkg_name.bright_cyan()); [INFO] [stdout] ... | [INFO] [stdout] 2276 | | ... } [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] 2253 ~ if let Ok(registry) = serde_json::from_str::(®istry_str) [INFO] [stdout] 2254 ~ && let Some(packages) = registry.get("packages").and_then(JsonValue::as_object) { [INFO] [stdout] 2255 | for (pkg_name, pkg_info) in packages { [INFO] [stdout] ... [INFO] [stdout] 2274 | return; [INFO] [stdout] 2275 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2258:45 [INFO] [stdout] | [INFO] [stdout] 2258 | / ... if show_ver { [INFO] [stdout] 2259 | | ... if let Some(version) = pkg_info.get("latest_version").and_then(JsonValue::as_str) { [INFO] [stdout] 2260 | | ... line += &format!(" v{}", version); [INFO] [stdout] 2261 | | ... } [INFO] [stdout] 2262 | | ... } [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] 2258 ~ if show_ver [INFO] [stdout] 2259 ~ && let Some(version) = pkg_info.get("latest_version").and_then(JsonValue::as_str) { [INFO] [stdout] 2260 | line += &format!(" v{}", version); [INFO] [stdout] 2261 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2264:45 [INFO] [stdout] | [INFO] [stdout] 2264 | / ... if show_desc { [INFO] [stdout] 2265 | | ... if let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2266 | | ... if !desc.is_empty() { [INFO] [stdout] 2267 | | ... line += &format!(" - {}", desc); [INFO] [stdout] ... | [INFO] [stdout] 2270 | | ... } [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] 2264 ~ if show_desc [INFO] [stdout] 2265 ~ && let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2266 | if !desc.is_empty() { [INFO] [stdout] 2267 | line += &format!(" - {}", desc); [INFO] [stdout] 2268 | } [INFO] [stdout] 2269 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2265:49 [INFO] [stdout] | [INFO] [stdout] 2265 | / ... if let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2266 | | ... if !desc.is_empty() { [INFO] [stdout] 2267 | | ... line += &format!(" - {}", desc); [INFO] [stdout] 2268 | | ... } [INFO] [stdout] 2269 | | ... } [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] 2265 ~ if let Some(desc) = pkg_info.get("description").and_then(JsonValue::as_str) [INFO] [stdout] 2266 ~ && !desc.is_empty() { [INFO] [stdout] 2267 | line += &format!(" - {}", desc); [INFO] [stdout] 2268 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2314:9 [INFO] [stdout] | [INFO] [stdout] 2314 | / if let Some(filter) = &module_name_filter { [INFO] [stdout] 2315 | | if name != filter { continue; } [INFO] [stdout] 2316 | | } [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] 2314 ~ if let Some(filter) = &module_name_filter [INFO] [stdout] 2315 ~ && name != filter { continue; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:2343:13 [INFO] [stdout] | [INFO] [stdout] 2343 | / if let Some(info) = package_info { [INFO] [stdout] 2344 | | println!("{}", info); [INFO] [stdout] 2345 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:2342:19 [INFO] [stdout] | [INFO] [stdout] 2342 | if let Ok(package_info) = result { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 2343 | if let Some(info) = package_info { [INFO] [stdout] | ^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2342:9 [INFO] [stdout] | [INFO] [stdout] 2342 | / if let Ok(package_info) = result { [INFO] [stdout] 2343 | | if let Some(info) = package_info { [INFO] [stdout] 2344 | | println!("{}", info); [INFO] [stdout] 2345 | | } [INFO] [stdout] 2346 | | } [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] 2342 ~ if let Ok(package_info) = result [INFO] [stdout] 2343 ~ && let Some(info) = package_info { [INFO] [stdout] 2344 | println!("{}", info); [INFO] [stdout] 2345 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2901:5 [INFO] [stdout] | [INFO] [stdout] 2901 | / if !final_output_path.exists() { [INFO] [stdout] 2902 | | if let Err(e) = fs::create_dir_all(&final_output_path) { [INFO] [stdout] 2903 | | eprintln!("{}", format!("Failed to create directory '{}': {}", final_output_path.display(), e).red()); [INFO] [stdout] 2904 | | return; [INFO] [stdout] 2905 | | } [INFO] [stdout] 2906 | | } [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] 2901 ~ if !final_output_path.exists() [INFO] [stdout] 2902 ~ && let Err(e) = fs::create_dir_all(&final_output_path) { [INFO] [stdout] 2903 | eprintln!("{}", format!("Failed to create directory '{}': {}", final_output_path.display(), e).red()); [INFO] [stdout] 2904 | return; [INFO] [stdout] 2905 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2403:9 [INFO] [stdout] | [INFO] [stdout] 2403 | / if let Ok(manifest_resp) = client.get(&manifest_url).send().await { [INFO] [stdout] 2404 | | if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2405 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2494 | | } [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] 2403 ~ if let Ok(manifest_resp) = client.get(&manifest_url).send().await [INFO] [stdout] 2404 ~ && let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2405 | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2492 | } [INFO] [stdout] 2493 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2404:13 [INFO] [stdout] | [INFO] [stdout] 2404 | / if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2405 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... | [INFO] [stdout] 2493 | | } [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] 2404 ~ if let Ok(manifest_json) = manifest_resp.json::().await [INFO] [stdout] 2405 ~ && let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2491 | } [INFO] [stdout] 2492 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2405:17 [INFO] [stdout] | [INFO] [stdout] 2405 | / if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2406 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... | [INFO] [stdout] 2492 | | } [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] 2405 ~ if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2406 ~ && let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... [INFO] [stdout] 2490 | } [INFO] [stdout] 2491 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2939:21 [INFO] [stdout] | [INFO] [stdout] 2939 | / if let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2940 | | if resp.status().is_success() { [INFO] [stdout] 2941 | | if let Ok(bytes) = resp.bytes() { [INFO] [stdout] 2942 | | let _ = fs::write(&dest_path, &bytes); [INFO] [stdout] ... | [INFO] [stdout] 2950 | | } [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] 2939 ~ if let Ok(resp) = client.get(url).send() [INFO] [stdout] 2940 ~ && resp.status().is_success() { [INFO] [stdout] 2941 | if let Ok(bytes) = resp.bytes() { [INFO] [stdout] ... [INFO] [stdout] 2948 | } [INFO] [stdout] 2949 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2406:21 [INFO] [stdout] | [INFO] [stdout] 2406 | / if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2407 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2409 | | let authors = manifest.get("authors") [INFO] [stdout] ... | [INFO] [stdout] 2491 | | } [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] 2406 ~ if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) [INFO] [stdout] 2407 ~ && let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... [INFO] [stdout] 2489 | } [INFO] [stdout] 2490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2940:25 [INFO] [stdout] | [INFO] [stdout] 2940 | / if resp.status().is_success() { [INFO] [stdout] 2941 | | if let Ok(bytes) = resp.bytes() { [INFO] [stdout] 2942 | | let _ = fs::write(&dest_path, &bytes); [INFO] [stdout] 2943 | | if verbose { [INFO] [stdout] ... | [INFO] [stdout] 2949 | | } [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] 2940 ~ if resp.status().is_success() [INFO] [stdout] 2941 ~ && let Ok(bytes) = resp.bytes() { [INFO] [stdout] 2942 | let _ = fs::write(&dest_path, &bytes); [INFO] [stdout] ... [INFO] [stdout] 2947 | } [INFO] [stdout] 2948 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2956:17 [INFO] [stdout] | [INFO] [stdout] 2956 | / if let Some(url) = item.get("url").and_then(serde_json::Value::as_str) { [INFO] [stdout] 2957 | | if let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2958 | | if let Ok(children) = resp.json::>() { [INFO] [stdout] 2959 | | for child in children { [INFO] [stdout] ... | [INFO] [stdout] 2964 | | } [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] 2956 ~ if let Some(url) = item.get("url").and_then(serde_json::Value::as_str) [INFO] [stdout] 2957 ~ && let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2958 | if let Ok(children) = resp.json::>() { [INFO] [stdout] ... [INFO] [stdout] 2962 | } [INFO] [stdout] 2963 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2407:25 [INFO] [stdout] | [INFO] [stdout] 2407 | / if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2408 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2409 | | let authors = manifest.get("authors") [INFO] [stdout] 2410 | | .and_then(JsonValue::as_array) [INFO] [stdout] ... | [INFO] [stdout] 2490 | | } [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] 2407 ~ if let Ok(decoded_str) = String::from_utf8(decoded_bytes) [INFO] [stdout] 2408 ~ && let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2409 | let authors = manifest.get("authors") [INFO] [stdout] ... [INFO] [stdout] 2488 | return Some(String::new()); [INFO] [stdout] 2489 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2957:21 [INFO] [stdout] | [INFO] [stdout] 2957 | / if let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2958 | | if let Ok(children) = resp.json::>() { [INFO] [stdout] 2959 | | for child in children { [INFO] [stdout] 2960 | | download_item(client, &child, &sub_dir, verbose); [INFO] [stdout] ... | [INFO] [stdout] 2963 | | } [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] 2957 ~ if let Ok(resp) = client.get(url).send() [INFO] [stdout] 2958 ~ && let Ok(children) = resp.json::>() { [INFO] [stdout] 2959 | for child in children { [INFO] [stdout] 2960 | download_item(client, &child, &sub_dir, verbose); [INFO] [stdout] 2961 | } [INFO] [stdout] 2962 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2441:41 [INFO] [stdout] | [INFO] [stdout] 2441 | / ... if let Ok(ver_resp) = client_clone.get(&ver_manifest_url).send().await { [INFO] [stdout] 2442 | | ... if let Ok(ver_json) = ver_resp.json::().await { [INFO] [stdout] 2443 | | ... if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | | ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2468 | | ... } [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] 2441 ~ if let Ok(ver_resp) = client_clone.get(&ver_manifest_url).send().await [INFO] [stdout] 2442 ~ && let Ok(ver_json) = ver_resp.json::().await { [INFO] [stdout] 2443 | if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2466 | } [INFO] [stdout] 2467 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2442:45 [INFO] [stdout] | [INFO] [stdout] 2442 | / ... if let Ok(ver_json) = ver_resp.json::().await { [INFO] [stdout] 2443 | | ... if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | | ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | | ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] ... | [INFO] [stdout] 2467 | | ... } [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] 2442 ~ if let Ok(ver_json) = ver_resp.json::().await [INFO] [stdout] 2443 ~ && let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2465 | } [INFO] [stdout] 2466 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2443:49 [INFO] [stdout] | [INFO] [stdout] 2443 | / ... if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2444 | | ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | | ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | | ... if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] ... | [INFO] [stdout] 2466 | | ... } [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] 2443 ~ if let Some(ver_content) = ver_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2444 ~ && let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] ... [INFO] [stdout] 2464 | } [INFO] [stdout] 2465 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2444:53 [INFO] [stdout] | [INFO] [stdout] 2444 | / ... if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) { [INFO] [stdout] 2445 | | ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | | ... if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] 2447 | | ... let desc = ver_manifest.get("description").and_then(JsonValue::as_str).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 2465 | | ... } [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] 2444 ~ if let Ok(ver_decoded) = general_purpose::STANDARD.decode(ver_content.replace('\n', "")) [INFO] [stdout] 2445 ~ && let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] ... [INFO] [stdout] 2463 | } [INFO] [stdout] 2464 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2445:57 [INFO] [stdout] | [INFO] [stdout] 2445 | / ... if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) { [INFO] [stdout] 2446 | | ... if let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] 2447 | | ... let desc = ver_manifest.get("description").and_then(JsonValue::as_str).unwrap_or(""); [INFO] [stdout] 2448 | | ... let mut result = format!(" {} - {}", format!("v{}", ver_clone).green(), desc); [INFO] [stdout] ... | [INFO] [stdout] 2464 | | ... } [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] 2445 ~ if let Ok(ver_decoded_str) = String::from_utf8(ver_decoded) [INFO] [stdout] 2446 ~ && let Ok(ver_manifest) = serde_json::from_str::(&ver_decoded_str) { [INFO] [stdout] 2447 | let desc = ver_manifest.get("description").and_then(JsonValue::as_str).unwrap_or(""); [INFO] [stdout] ... [INFO] [stdout] 2462 | return Some((ver_clone, result)); [INFO] [stdout] 2463 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2450:65 [INFO] [stdout] | [INFO] [stdout] 2450 | / ... if ver_clone == latest_ver_clone { [INFO] [stdout] 2451 | | ... if let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2452 | | ... if !deps_obj.is_empty() { [INFO] [stdout] 2453 | | ... result += "\n Dependencies:"; [INFO] [stdout] ... | [INFO] [stdout] 2461 | | ... } [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] 2450 ~ if ver_clone == latest_ver_clone [INFO] [stdout] 2451 ~ && let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2452 | if !deps_obj.is_empty() { [INFO] [stdout] ... [INFO] [stdout] 2459 | } [INFO] [stdout] 2460 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2451:69 [INFO] [stdout] | [INFO] [stdout] 2451 | / ... if let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2452 | | ... if !deps_obj.is_empty() { [INFO] [stdout] 2453 | | ... result += "\n Dependencies:"; [INFO] [stdout] 2454 | | ... for (dep_name, dep_version) in deps_obj { [INFO] [stdout] ... | [INFO] [stdout] 2460 | | ... } [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] 2451 ~ if let Some(deps_obj) = ver_manifest.get("dependencies").and_then(JsonValue::as_object) [INFO] [stdout] 2452 ~ && !deps_obj.is_empty() { [INFO] [stdout] 2453 | result += "\n Dependencies:"; [INFO] [stdout] ... [INFO] [stdout] 2458 | } [INFO] [stdout] 2459 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2508:9 [INFO] [stdout] | [INFO] [stdout] 2508 | / if let Ok(manifest_resp) = client.get(&manifest_url).send().await { [INFO] [stdout] 2509 | | if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2510 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... | [INFO] [stdout] 2524 | | } [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] 2508 ~ if let Ok(manifest_resp) = client.get(&manifest_url).send().await [INFO] [stdout] 2509 ~ && let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2510 | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2522 | } [INFO] [stdout] 2523 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2509:13 [INFO] [stdout] | [INFO] [stdout] 2509 | / if let Ok(manifest_json) = manifest_resp.json::().await { [INFO] [stdout] 2510 | | if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... | [INFO] [stdout] 2523 | | } [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] 2509 ~ if let Ok(manifest_json) = manifest_resp.json::().await [INFO] [stdout] 2510 ~ && let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] ... [INFO] [stdout] 2521 | } [INFO] [stdout] 2522 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3095:9 [INFO] [stdout] | [INFO] [stdout] 3095 | / if lym_config_path.exists() { [INFO] [stdout] 3096 | | if let Ok(config_str) = fs::read_to_string(&lym_config_path) { [INFO] [stdout] 3097 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 3109 | | } [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] 3095 ~ if lym_config_path.exists() [INFO] [stdout] 3096 ~ && let Ok(config_str) = fs::read_to_string(&lym_config_path) { [INFO] [stdout] 3097 | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] ... [INFO] [stdout] 3107 | } [INFO] [stdout] 3108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3096:13 [INFO] [stdout] | [INFO] [stdout] 3096 | / if let Ok(config_str) = fs::read_to_string(&lym_config_path) { [INFO] [stdout] 3097 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] 3099 | | for (script_name, script_path) in scripts { [INFO] [stdout] ... | [INFO] [stdout] 3108 | | } [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] 3096 ~ if let Ok(config_str) = fs::read_to_string(&lym_config_path) [INFO] [stdout] 3097 ~ && let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 3106 | } [INFO] [stdout] 3107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2510:17 [INFO] [stdout] | [INFO] [stdout] 2510 | / if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 2511 | | if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... | [INFO] [stdout] 2522 | | } [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] 2510 ~ if let Some(content_encoded) = manifest_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 2511 ~ && let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] ... [INFO] [stdout] 2520 | } [INFO] [stdout] 2521 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3097:17 [INFO] [stdout] | [INFO] [stdout] 3097 | / if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] 3099 | | for (script_name, script_path) in scripts { [INFO] [stdout] 3100 | | if script_name == "pre_uninstall" || script_name == "post_uninstall" { [INFO] [stdout] ... | [INFO] [stdout] 3107 | | } [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] 3097 ~ if let Ok(config_json) = serde_json::from_str::(&config_str) [INFO] [stdout] 3098 ~ && let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] 3099 | for (script_name, script_path) in scripts { [INFO] [stdout] ... [INFO] [stdout] 3105 | } [INFO] [stdout] 3106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2511:21 [INFO] [stdout] | [INFO] [stdout] 2511 | / if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) { [INFO] [stdout] 2512 | | if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | | if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 2521 | | } [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] 2511 ~ if let Ok(decoded_bytes) = general_purpose::STANDARD.decode(content_encoded.replace('\n', "")) [INFO] [stdout] 2512 ~ && let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] ... [INFO] [stdout] 2519 | } [INFO] [stdout] 2520 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2512:25 [INFO] [stdout] | [INFO] [stdout] 2512 | / if let Ok(decoded_str) = String::from_utf8(decoded_bytes) { [INFO] [stdout] 2513 | | if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | | if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | | if !desc.is_empty() { [INFO] [stdout] ... | [INFO] [stdout] 2520 | | } [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] 2512 ~ if let Ok(decoded_str) = String::from_utf8(decoded_bytes) [INFO] [stdout] 2513 ~ && let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] ... [INFO] [stdout] 2518 | } [INFO] [stdout] 2519 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3100:29 [INFO] [stdout] | [INFO] [stdout] 3100 | / ... if script_name == "pre_uninstall" || script_name == "post_uninstall" { [INFO] [stdout] 3101 | | ... if let Some(path) = script_path.as_str() { [INFO] [stdout] 3102 | | ... uninstall_scripts.insert(script_name.clone(), path.to_string()); [INFO] [stdout] 3103 | | ... } [INFO] [stdout] 3104 | | ... } [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] 3100 ~ if (script_name == "pre_uninstall" || script_name == "post_uninstall") { [INFO] [stdout] 3101 ~ && let Some(path) = script_path.as_str() { [INFO] [stdout] 3102 | uninstall_scripts.insert(script_name.clone(), path.to_string()); [INFO] [stdout] 3103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2513:29 [INFO] [stdout] | [INFO] [stdout] 2513 | / ... if let Ok(manifest) = serde_json::from_str::(&decoded_str) { [INFO] [stdout] 2514 | | ... if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | | ... if !desc.is_empty() { [INFO] [stdout] 2516 | | ... line += &format!(" - {}", desc); [INFO] [stdout] ... | [INFO] [stdout] 2519 | | ... } [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] 2513 ~ if let Ok(manifest) = serde_json::from_str::(&decoded_str) [INFO] [stdout] 2514 ~ && let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | if !desc.is_empty() { [INFO] [stdout] 2516 | line += &format!(" - {}", desc); [INFO] [stdout] 2517 | } [INFO] [stdout] 2518 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2514:33 [INFO] [stdout] | [INFO] [stdout] 2514 | / ... if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) { [INFO] [stdout] 2515 | | ... if !desc.is_empty() { [INFO] [stdout] 2516 | | ... line += &format!(" - {}", desc); [INFO] [stdout] 2517 | | ... } [INFO] [stdout] 2518 | | ... } [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] 2514 ~ if let Some(desc) = manifest.get("description").and_then(JsonValue::as_str) [INFO] [stdout] 2515 ~ && !desc.is_empty() { [INFO] [stdout] 2516 | line += &format!(" - {}", desc); [INFO] [stdout] 2517 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:3132:39 [INFO] [stdout] | [INFO] [stdout] 3132 | let output = Command::new(&lucia_executable) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `lucia_executable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:3133:22 [INFO] [stdout] | [INFO] [stdout] 3133 | .arg(&script_file) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/main.rs:2607:9 [INFO] [stdout] | [INFO] [stdout] 2607 | / for entry in entries { [INFO] [stdout] 2608 | | if let Ok(entry) = entry { [INFO] [stdout] 2609 | | let path = entry.path(); [INFO] [stdout] 2610 | | let module_name = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 2691 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/main.rs:2608:13 [INFO] [stdout] | [INFO] [stdout] 2608 | / if let Ok(entry) = entry { [INFO] [stdout] 2609 | | let path = entry.path(); [INFO] [stdout] 2610 | | let module_name = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); [INFO] [stdout] ... | [INFO] [stdout] 2690 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2607 ~ for entry in entries.flatten() { [INFO] [stdout] 2608 + let path = entry.path(); [INFO] [stdout] 2609 + let module_name = path.file_name().and_then(|n| n.to_str()).unwrap_or(""); [INFO] [stdout] 2610 + [INFO] [stdout] 2611 + if let Some(ref filter) = module_name_filter { [INFO] [stdout] 2612 + if module_name != filter { [INFO] [stdout] 2613 + continue; [INFO] [stdout] 2614 + } [INFO] [stdout] 2615 + } [INFO] [stdout] 2616 + [INFO] [stdout] 2617 + let is_std = STD_LIBS.contains_key(module_name); [INFO] [stdout] 2618 + if !list_std && is_std { [INFO] [stdout] 2619 + continue; [INFO] [stdout] 2620 + } [INFO] [stdout] 2621 + [INFO] [stdout] 2622 + let mut versions = vec![]; [INFO] [stdout] 2623 + let mut description: Option = None; [INFO] [stdout] 2624 + [INFO] [stdout] 2625 + if path.is_dir() { [INFO] [stdout] 2626 + let manifest_path = path.join("manifest.json"); [INFO] [stdout] 2627 + if manifest_path.exists() { [INFO] [stdout] 2628 + if let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2629 + if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2630 + let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] 2631 + versions.push(current_version); [INFO] [stdout] 2632 + description = manifest_json.get("description").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 2633 + [INFO] [stdout] 2634 + if show_all_versions { [INFO] [stdout] 2635 + if let Some(authors_array) = manifest_json.get("authors").and_then(JsonValue::as_array) { [INFO] [stdout] 2636 + let authors: Vec = authors_array.iter() [INFO] [stdout] 2637 + .filter_map(|v| v.as_str()) [INFO] [stdout] 2638 + .map(|s| s.to_string()) [INFO] [stdout] 2639 + .collect(); [INFO] [stdout] 2640 + if !authors.is_empty() { [INFO] [stdout] 2641 + let author_str = authors.iter().map(|a| a.yellow().to_string()).collect::>().join(", "); [INFO] [stdout] 2642 + println!(" Authors: {}", author_str); [INFO] [stdout] 2643 + } [INFO] [stdout] 2644 + } [INFO] [stdout] 2645 + [INFO] [stdout] 2646 + if let Some(deps_obj) = manifest_json.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2647 + if !deps_obj.is_empty() { [INFO] [stdout] 2648 + println!(" Dependencies:"); [INFO] [stdout] 2649 + for (dep_name, dep_version) in deps_obj { [INFO] [stdout] 2650 + if let Some(ver_str) = dep_version.as_str() { [INFO] [stdout] 2651 + println!(" {} {}", dep_name.bright_magenta(), ver_str.green()); [INFO] [stdout] 2652 + } [INFO] [stdout] 2653 + } [INFO] [stdout] 2654 + } [INFO] [stdout] 2655 + } [INFO] [stdout] 2656 + } [INFO] [stdout] 2657 + } [INFO] [stdout] 2658 + } [INFO] [stdout] 2659 + } [INFO] [stdout] 2660 + } [INFO] [stdout] 2661 + [INFO] [stdout] 2662 + if is_std { [INFO] [stdout] 2663 + if let Some(std_info) = STD_LIBS.get(module_name) { [INFO] [stdout] 2664 + versions.push(std_info.version.to_string()); [INFO] [stdout] 2665 + description = Some(std_info.description.to_string()); [INFO] [stdout] 2666 + } [INFO] [stdout] 2667 + } [INFO] [stdout] 2668 + [INFO] [stdout] 2669 + for ver in versions { [INFO] [stdout] 2670 + let mut line = if is_std { [INFO] [stdout] 2671 + format!(" {} [standard lib]", module_name.bright_blue().bold()) [INFO] [stdout] 2672 + } else { [INFO] [stdout] 2673 + format!(" {}", module_name.bright_cyan()) [INFO] [stdout] 2674 + }; [INFO] [stdout] 2675 + [INFO] [stdout] 2676 + if show_ver { [INFO] [stdout] 2677 + line += &format!(" v{}", ver); [INFO] [stdout] 2678 + } [INFO] [stdout] 2679 + if show_desc { [INFO] [stdout] 2680 + if let Some(ref desc) = description { [INFO] [stdout] 2681 + if !desc.is_empty() { [INFO] [stdout] 2682 + line += &format!(" - {}", desc); [INFO] [stdout] 2683 + } [INFO] [stdout] 2684 + } [INFO] [stdout] 2685 + } [INFO] [stdout] 2686 + [INFO] [stdout] 2687 + println!("{}", line); [INFO] [stdout] 2688 + } [INFO] [stdout] 2689 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2612:17 [INFO] [stdout] | [INFO] [stdout] 2612 | / if let Some(ref filter) = module_name_filter { [INFO] [stdout] 2613 | | if module_name != filter { [INFO] [stdout] 2614 | | continue; [INFO] [stdout] 2615 | | } [INFO] [stdout] 2616 | | } [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] 2612 ~ if let Some(ref filter) = module_name_filter [INFO] [stdout] 2613 ~ && module_name != filter { [INFO] [stdout] 2614 | continue; [INFO] [stdout] 2615 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2628:21 [INFO] [stdout] | [INFO] [stdout] 2628 | / ... if manifest_path.exists() { [INFO] [stdout] 2629 | | ... if let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2630 | | ... if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2631 | | ... let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2660 | | ... } [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] 2628 ~ if manifest_path.exists() [INFO] [stdout] 2629 ~ && let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2630 | if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] ... [INFO] [stdout] 2658 | } [INFO] [stdout] 2659 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2629:25 [INFO] [stdout] | [INFO] [stdout] 2629 | / ... if let Ok(manifest_str) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 2630 | | ... if let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2631 | | ... let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] 2632 | | ... versions.push(current_version); [INFO] [stdout] ... | [INFO] [stdout] 2659 | | ... } [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] 2629 ~ if let Ok(manifest_str) = fs::read_to_string(&manifest_path) [INFO] [stdout] 2630 ~ && let Ok(manifest_json) = serde_json::from_str::(&manifest_str) { [INFO] [stdout] 2631 | let current_version = manifest_json.get("version").and_then(JsonValue::as_str).unwrap_or("unknown").to_string(); [INFO] [stdout] ... [INFO] [stdout] 2657 | } [INFO] [stdout] 2658 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2647:37 [INFO] [stdout] | [INFO] [stdout] 2647 | / ... if let Some(deps_obj) = manifest_json.get("dependencies").and_then(JsonValue::as_object) { [INFO] [stdout] 2648 | | ... if !deps_obj.is_empty() { [INFO] [stdout] 2649 | | ... println!(" Dependencies:"); [INFO] [stdout] 2650 | | ... for (dep_name, dep_version) in deps_obj { [INFO] [stdout] ... | [INFO] [stdout] 2656 | | ... } [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] 2647 ~ if let Some(deps_obj) = manifest_json.get("dependencies").and_then(JsonValue::as_object) [INFO] [stdout] 2648 ~ && !deps_obj.is_empty() { [INFO] [stdout] 2649 | println!(" Dependencies:"); [INFO] [stdout] ... [INFO] [stdout] 2654 | } [INFO] [stdout] 2655 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2663:17 [INFO] [stdout] | [INFO] [stdout] 2663 | / if is_std { [INFO] [stdout] 2664 | | if let Some(std_info) = STD_LIBS.get(module_name) { [INFO] [stdout] 2665 | | versions.push(std_info.version.to_string()); [INFO] [stdout] 2666 | | description = Some(std_info.description.to_string()); [INFO] [stdout] 2667 | | } [INFO] [stdout] 2668 | | } [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] 2663 ~ if is_std [INFO] [stdout] 2664 ~ && let Some(std_info) = STD_LIBS.get(module_name) { [INFO] [stdout] 2665 | versions.push(std_info.version.to_string()); [INFO] [stdout] 2666 | description = Some(std_info.description.to_string()); [INFO] [stdout] 2667 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2680:21 [INFO] [stdout] | [INFO] [stdout] 2680 | / if show_desc { [INFO] [stdout] 2681 | | if let Some(ref desc) = description { [INFO] [stdout] 2682 | | if !desc.is_empty() { [INFO] [stdout] 2683 | | line += &format!(" - {}", desc); [INFO] [stdout] ... | [INFO] [stdout] 2686 | | } [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] 2680 ~ if show_desc [INFO] [stdout] 2681 ~ && let Some(ref desc) = description { [INFO] [stdout] 2682 | if !desc.is_empty() { [INFO] [stdout] 2683 | line += &format!(" - {}", desc); [INFO] [stdout] 2684 | } [INFO] [stdout] 2685 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2681:25 [INFO] [stdout] | [INFO] [stdout] 2681 | / if let Some(ref desc) = description { [INFO] [stdout] 2682 | | if !desc.is_empty() { [INFO] [stdout] 2683 | | line += &format!(" - {}", desc); [INFO] [stdout] 2684 | | } [INFO] [stdout] 2685 | | } [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] 2681 ~ if let Some(ref desc) = description [INFO] [stdout] 2682 ~ && !desc.is_empty() { [INFO] [stdout] 2683 | line += &format!(" - {}", desc); [INFO] [stdout] 2684 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2901:5 [INFO] [stdout] | [INFO] [stdout] 2901 | / if !final_output_path.exists() { [INFO] [stdout] 2902 | | if let Err(e) = fs::create_dir_all(&final_output_path) { [INFO] [stdout] 2903 | | eprintln!("{}", format!("Failed to create directory '{}': {}", final_output_path.display(), e).red()); [INFO] [stdout] 2904 | | return; [INFO] [stdout] 2905 | | } [INFO] [stdout] 2906 | | } [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] 2901 ~ if !final_output_path.exists() [INFO] [stdout] 2902 ~ && let Err(e) = fs::create_dir_all(&final_output_path) { [INFO] [stdout] 2903 | eprintln!("{}", format!("Failed to create directory '{}': {}", final_output_path.display(), e).red()); [INFO] [stdout] 2904 | return; [INFO] [stdout] 2905 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/main.rs:3472:5 [INFO] [stdout] | [INFO] [stdout] 3472 | while let Some(arg) = args.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for arg in args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/main.rs:3518:28 [INFO] [stdout] | [INFO] [stdout] 3518 | let real = p.canonicalize().unwrap_or_else(|_| p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 3518 - let real = p.canonicalize().unwrap_or_else(|_| p); [INFO] [stdout] 3518 + let real = p.canonicalize().unwrap_or(p); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2939:21 [INFO] [stdout] | [INFO] [stdout] 2939 | / if let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2940 | | if resp.status().is_success() { [INFO] [stdout] 2941 | | if let Ok(bytes) = resp.bytes() { [INFO] [stdout] 2942 | | let _ = fs::write(&dest_path, &bytes); [INFO] [stdout] ... | [INFO] [stdout] 2950 | | } [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] 2939 ~ if let Ok(resp) = client.get(url).send() [INFO] [stdout] 2940 ~ && resp.status().is_success() { [INFO] [stdout] 2941 | if let Ok(bytes) = resp.bytes() { [INFO] [stdout] ... [INFO] [stdout] 2948 | } [INFO] [stdout] 2949 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2940:25 [INFO] [stdout] | [INFO] [stdout] 2940 | / if resp.status().is_success() { [INFO] [stdout] 2941 | | if let Ok(bytes) = resp.bytes() { [INFO] [stdout] 2942 | | let _ = fs::write(&dest_path, &bytes); [INFO] [stdout] 2943 | | if verbose { [INFO] [stdout] ... | [INFO] [stdout] 2949 | | } [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] 2940 ~ if resp.status().is_success() [INFO] [stdout] 2941 ~ && let Ok(bytes) = resp.bytes() { [INFO] [stdout] 2942 | let _ = fs::write(&dest_path, &bytes); [INFO] [stdout] ... [INFO] [stdout] 2947 | } [INFO] [stdout] 2948 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2956:17 [INFO] [stdout] | [INFO] [stdout] 2956 | / if let Some(url) = item.get("url").and_then(serde_json::Value::as_str) { [INFO] [stdout] 2957 | | if let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2958 | | if let Ok(children) = resp.json::>() { [INFO] [stdout] 2959 | | for child in children { [INFO] [stdout] ... | [INFO] [stdout] 2964 | | } [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] 2956 ~ if let Some(url) = item.get("url").and_then(serde_json::Value::as_str) [INFO] [stdout] 2957 ~ && let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2958 | if let Ok(children) = resp.json::>() { [INFO] [stdout] ... [INFO] [stdout] 2962 | } [INFO] [stdout] 2963 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:2957:21 [INFO] [stdout] | [INFO] [stdout] 2957 | / if let Ok(resp) = client.get(url).send() { [INFO] [stdout] 2958 | | if let Ok(children) = resp.json::>() { [INFO] [stdout] 2959 | | for child in children { [INFO] [stdout] 2960 | | download_item(client, &child, &sub_dir, verbose); [INFO] [stdout] ... | [INFO] [stdout] 2963 | | } [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] 2957 ~ if let Ok(resp) = client.get(url).send() [INFO] [stdout] 2958 ~ && let Ok(children) = resp.json::>() { [INFO] [stdout] 2959 | for child in children { [INFO] [stdout] 2960 | download_item(client, &child, &sub_dir, verbose); [INFO] [stdout] 2961 | } [INFO] [stdout] 2962 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3095:9 [INFO] [stdout] | [INFO] [stdout] 3095 | / if lym_config_path.exists() { [INFO] [stdout] 3096 | | if let Ok(config_str) = fs::read_to_string(&lym_config_path) { [INFO] [stdout] 3097 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] ... | [INFO] [stdout] 3109 | | } [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] 3095 ~ if lym_config_path.exists() [INFO] [stdout] 3096 ~ && let Ok(config_str) = fs::read_to_string(&lym_config_path) { [INFO] [stdout] 3097 | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] ... [INFO] [stdout] 3107 | } [INFO] [stdout] 3108 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3096:13 [INFO] [stdout] | [INFO] [stdout] 3096 | / if let Ok(config_str) = fs::read_to_string(&lym_config_path) { [INFO] [stdout] 3097 | | if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] 3099 | | for (script_name, script_path) in scripts { [INFO] [stdout] ... | [INFO] [stdout] 3108 | | } [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] 3096 ~ if let Ok(config_str) = fs::read_to_string(&lym_config_path) [INFO] [stdout] 3097 ~ && let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] ... [INFO] [stdout] 3106 | } [INFO] [stdout] 3107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3097:17 [INFO] [stdout] | [INFO] [stdout] 3097 | / if let Ok(config_json) = serde_json::from_str::(&config_str) { [INFO] [stdout] 3098 | | if let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] 3099 | | for (script_name, script_path) in scripts { [INFO] [stdout] 3100 | | if script_name == "pre_uninstall" || script_name == "post_uninstall" { [INFO] [stdout] ... | [INFO] [stdout] 3107 | | } [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] 3097 ~ if let Ok(config_json) = serde_json::from_str::(&config_str) [INFO] [stdout] 3098 ~ && let Some(scripts) = config_json.get("scripts").and_then(JsonValue::as_object) { [INFO] [stdout] 3099 | for (script_name, script_path) in scripts { [INFO] [stdout] ... [INFO] [stdout] 3105 | } [INFO] [stdout] 3106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:3100:29 [INFO] [stdout] | [INFO] [stdout] 3100 | / ... if script_name == "pre_uninstall" || script_name == "post_uninstall" { [INFO] [stdout] 3101 | | ... if let Some(path) = script_path.as_str() { [INFO] [stdout] 3102 | | ... uninstall_scripts.insert(script_name.clone(), path.to_string()); [INFO] [stdout] 3103 | | ... } [INFO] [stdout] 3104 | | ... } [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] 3100 ~ if (script_name == "pre_uninstall" || script_name == "post_uninstall") { [INFO] [stdout] 3101 ~ && let Some(path) = script_path.as_str() { [INFO] [stdout] 3102 | uninstall_scripts.insert(script_name.clone(), path.to_string()); [INFO] [stdout] 3103 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:3132:39 [INFO] [stdout] | [INFO] [stdout] 3132 | let output = Command::new(&lucia_executable) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `lucia_executable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:3133:22 [INFO] [stdout] | [INFO] [stdout] 3133 | .arg(&script_file) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `script_file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/main.rs:3800:1 [INFO] [stdout] | [INFO] [stdout] 3800 | / fn create_interactive_project( [INFO] [stdout] 3801 | | name: &str, [INFO] [stdout] 3802 | | version: &str, [INFO] [stdout] 3803 | | description: &str, [INFO] [stdout] ... | [INFO] [stdout] 3809 | | no_confirm: bool, [INFO] [stdout] 3810 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:4190:50 [INFO] [stdout] | [INFO] [stdout] 4190 | let content = if template == "basic" { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 4191 | | generate_basic_template() [INFO] [stdout] 4192 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:4192:20 [INFO] [stdout] | [INFO] [stdout] 4192 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 4193 | | generate_basic_template() [INFO] [stdout] 4194 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:4255:15 [INFO] [stdout] | [INFO] [stdout] 4255 | .args(&["clone", url, target_path.to_str().unwrap_or(&name)]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["clone", url, target_path.to_str().unwrap_or(&name)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4265:13 [INFO] [stdout] | [INFO] [stdout] 4265 | / if manifest_path.exists() { [INFO] [stdout] 4266 | | if let Ok(content) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 4267 | | if let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] 4268 | | manifest["name"] = json!(name); [INFO] [stdout] ... | [INFO] [stdout] 4275 | | } [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] 4265 ~ if manifest_path.exists() [INFO] [stdout] 4266 ~ && let Ok(content) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 4267 | if let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] ... [INFO] [stdout] 4273 | } [INFO] [stdout] 4274 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4266:17 [INFO] [stdout] | [INFO] [stdout] 4266 | / if let Ok(content) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 4267 | | if let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] 4268 | | manifest["name"] = json!(name); [INFO] [stdout] 4269 | | if let Ok(updated) = serde_json::to_string_pretty(&manifest) { [INFO] [stdout] ... | [INFO] [stdout] 4274 | | } [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] 4266 ~ if let Ok(content) = fs::read_to_string(&manifest_path) [INFO] [stdout] 4267 ~ && let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] 4268 | manifest["name"] = json!(name); [INFO] [stdout] ... [INFO] [stdout] 4272 | } [INFO] [stdout] 4273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/main.rs:3472:5 [INFO] [stdout] | [INFO] [stdout] 3472 | while let Some(arg) = args.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for arg in args` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4309:5 [INFO] [stdout] | [INFO] [stdout] 4309 | / if let Ok(resp) = client.get(®istry_url) [INFO] [stdout] 4310 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 4311 | | .basic_auth(username, Some(token)) [INFO] [stdout] 4312 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 4327 | | } [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] 4312 ~ .send() [INFO] [stdout] 4313 ~ && resp.status().is_success() { [INFO] [stdout] 4314 | if let Ok(registry_json) = resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 4325 | } [INFO] [stdout] 4326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4313:9 [INFO] [stdout] | [INFO] [stdout] 4313 | / if resp.status().is_success() { [INFO] [stdout] 4314 | | if let Ok(registry_json) = resp.json::() { [INFO] [stdout] 4315 | | sha = registry_json.get("sha").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 4316 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 4326 | | } [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] 4313 ~ if resp.status().is_success() [INFO] [stdout] 4314 ~ && let Ok(registry_json) = resp.json::() { [INFO] [stdout] 4315 | sha = registry_json.get("sha").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] ... [INFO] [stdout] 4324 | } [INFO] [stdout] 4325 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4316:17 [INFO] [stdout] | [INFO] [stdout] 4316 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 4317 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 4318 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 4324 | | } [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] 4316 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 4317 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 4318 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 4322 | } [INFO] [stdout] 4323 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/main.rs:3518:28 [INFO] [stdout] | [INFO] [stdout] 3518 | let real = p.canonicalize().unwrap_or_else(|_| p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 3518 - let real = p.canonicalize().unwrap_or_else(|_| p); [INFO] [stdout] 3518 + let real = p.canonicalize().unwrap_or(p); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4317:21 [INFO] [stdout] | [INFO] [stdout] 4317 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 4318 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | | registry = existing_registry; [INFO] [stdout] ... | [INFO] [stdout] 4323 | | } [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] 4317 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 4318 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | registry = existing_registry; [INFO] [stdout] 4321 | } [INFO] [stdout] 4322 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4318:25 [INFO] [stdout] | [INFO] [stdout] 4318 | / if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | | registry = existing_registry; [INFO] [stdout] 4321 | | } [INFO] [stdout] 4322 | | } [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] 4318 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 4319 ~ && let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | registry = existing_registry; [INFO] [stdout] 4321 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4335:9 [INFO] [stdout] | [INFO] [stdout] 4335 | / if let Some(existing_pkg) = packages.get(package_name) { [INFO] [stdout] 4336 | | if existing_pkg.get("latest_version").and_then(JsonValue::as_str) == Some(version) && [INFO] [stdout] 4337 | | existing_pkg.get("description").and_then(JsonValue::as_str) == Some(description) && [INFO] [stdout] 4338 | | existing_pkg.get("authors") == Some(&authors) && [INFO] [stdout] ... | [INFO] [stdout] 4345 | | } [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] 4335 ~ if let Some(existing_pkg) = packages.get(package_name) [INFO] [stdout] 4336 ~ && existing_pkg.get("latest_version").and_then(JsonValue::as_str) == Some(version) && [INFO] [stdout] 4337 | existing_pkg.get("description").and_then(JsonValue::as_str) == Some(description) && [INFO] [stdout] ... [INFO] [stdout] 4343 | return Ok(()); [INFO] [stdout] 4344 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:4430:17 [INFO] [stdout] | [INFO] [stdout] 4430 | yaml.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `yaml.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `rsplit_once` [INFO] [stdout] --> src/main.rs:4454:25 [INFO] [stdout] | [INFO] [stdout] 4454 | full_dest.rsplitn(2, '/').nth(1).unwrap_or("") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `full_dest.rsplit_once('/').map(|x| x.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:4464:17 [INFO] [stdout] | [INFO] [stdout] 4464 | yaml.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `yaml.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/main.rs:3800:1 [INFO] [stdout] | [INFO] [stdout] 3800 | / fn create_interactive_project( [INFO] [stdout] 3801 | | name: &str, [INFO] [stdout] 3802 | | version: &str, [INFO] [stdout] 3803 | | description: &str, [INFO] [stdout] ... | [INFO] [stdout] 3809 | | no_confirm: bool, [INFO] [stdout] 3810 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4538:5 [INFO] [stdout] | [INFO] [stdout] 4538 | / if lym_json_path.exists() { [INFO] [stdout] 4539 | | if let Ok(lym_content) = fs::read_to_string(&lym_json_path) { [INFO] [stdout] 4540 | | if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] ... | [INFO] [stdout] 4595 | | } [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] 4538 ~ if lym_json_path.exists() [INFO] [stdout] 4539 ~ && let Ok(lym_content) = fs::read_to_string(&lym_json_path) { [INFO] [stdout] 4540 | if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] ... [INFO] [stdout] 4593 | } [INFO] [stdout] 4594 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4539:9 [INFO] [stdout] | [INFO] [stdout] 4539 | / if let Ok(lym_content) = fs::read_to_string(&lym_json_path) { [INFO] [stdout] 4540 | | if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] 4542 | | for artifact_obj in artifacts_arr { [INFO] [stdout] ... | [INFO] [stdout] 4594 | | } [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] 4539 ~ if let Ok(lym_content) = fs::read_to_string(&lym_json_path) [INFO] [stdout] 4540 ~ && let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] ... [INFO] [stdout] 4592 | } [INFO] [stdout] 4593 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4540:13 [INFO] [stdout] | [INFO] [stdout] 4540 | / if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] 4542 | | for artifact_obj in artifacts_arr { [INFO] [stdout] 4543 | | if let Some(runner_str) = artifact_obj.get("runner").and_then(Value::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 4593 | | } [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] 4540 ~ if let Ok(lym_json) = serde_json::from_str::(&lym_content) [INFO] [stdout] 4541 ~ && let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] 4542 | for artifact_obj in artifacts_arr { [INFO] [stdout] ... [INFO] [stdout] 4591 | } [INFO] [stdout] 4592 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4636:5 [INFO] [stdout] | [INFO] [stdout] 4636 | / if let Ok(conflicts) = check_alias_conflicts(&temp_client, repo_slug, lib_name) { [INFO] [stdout] 4637 | | if !conflicts.is_empty() { [INFO] [stdout] 4638 | | println!(); [INFO] [stdout] 4639 | | println!("{}", "⚠️ WARNING: Package alias conflict detected!".bright_yellow().bold()); [INFO] [stdout] ... | [INFO] [stdout] 4661 | | } [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] 4636 ~ if let Ok(conflicts) = check_alias_conflicts(&temp_client, repo_slug, lib_name) [INFO] [stdout] 4637 ~ && !conflicts.is_empty() { [INFO] [stdout] 4638 | println!(); [INFO] [stdout] ... [INFO] [stdout] 4659 | } [INFO] [stdout] 4660 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:4190:50 [INFO] [stdout] | [INFO] [stdout] 4190 | let content = if template == "basic" { [INFO] [stdout] | __________________________________________________^ [INFO] [stdout] 4191 | | generate_basic_template() [INFO] [stdout] 4192 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:4192:20 [INFO] [stdout] | [INFO] [stdout] 4192 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 4193 | | generate_basic_template() [INFO] [stdout] 4194 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:4255:15 [INFO] [stdout] | [INFO] [stdout] 4255 | .args(&["clone", url, target_path.to_str().unwrap_or(&name)]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["clone", url, target_path.to_str().unwrap_or(&name)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4265:13 [INFO] [stdout] | [INFO] [stdout] 4265 | / if manifest_path.exists() { [INFO] [stdout] 4266 | | if let Ok(content) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 4267 | | if let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] 4268 | | manifest["name"] = json!(name); [INFO] [stdout] ... | [INFO] [stdout] 4275 | | } [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] 4265 ~ if manifest_path.exists() [INFO] [stdout] 4266 ~ && let Ok(content) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 4267 | if let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] ... [INFO] [stdout] 4273 | } [INFO] [stdout] 4274 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4266:17 [INFO] [stdout] | [INFO] [stdout] 4266 | / if let Ok(content) = fs::read_to_string(&manifest_path) { [INFO] [stdout] 4267 | | if let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] 4268 | | manifest["name"] = json!(name); [INFO] [stdout] 4269 | | if let Ok(updated) = serde_json::to_string_pretty(&manifest) { [INFO] [stdout] ... | [INFO] [stdout] 4274 | | } [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] 4266 ~ if let Ok(content) = fs::read_to_string(&manifest_path) [INFO] [stdout] 4267 ~ && let Ok(mut manifest) = serde_json::from_str::(&content) { [INFO] [stdout] 4268 | manifest["name"] = json!(name); [INFO] [stdout] ... [INFO] [stdout] 4272 | } [INFO] [stdout] 4273 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4309:5 [INFO] [stdout] | [INFO] [stdout] 4309 | / if let Ok(resp) = client.get(®istry_url) [INFO] [stdout] 4310 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 4311 | | .basic_auth(username, Some(token)) [INFO] [stdout] 4312 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 4327 | | } [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] 4312 ~ .send() [INFO] [stdout] 4313 ~ && resp.status().is_success() { [INFO] [stdout] 4314 | if let Ok(registry_json) = resp.json::() { [INFO] [stdout] ... [INFO] [stdout] 4325 | } [INFO] [stdout] 4326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4313:9 [INFO] [stdout] | [INFO] [stdout] 4313 | / if resp.status().is_success() { [INFO] [stdout] 4314 | | if let Ok(registry_json) = resp.json::() { [INFO] [stdout] 4315 | | sha = registry_json.get("sha").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] 4316 | | if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 4326 | | } [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] 4313 ~ if resp.status().is_success() [INFO] [stdout] 4314 ~ && let Ok(registry_json) = resp.json::() { [INFO] [stdout] 4315 | sha = registry_json.get("sha").and_then(JsonValue::as_str).map(|s| s.to_string()); [INFO] [stdout] ... [INFO] [stdout] 4324 | } [INFO] [stdout] 4325 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4316:17 [INFO] [stdout] | [INFO] [stdout] 4316 | / if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) { [INFO] [stdout] 4317 | | if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 4318 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] ... | [INFO] [stdout] 4324 | | } [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] 4316 ~ if let Some(content) = registry_json.get("content").and_then(JsonValue::as_str) [INFO] [stdout] 4317 ~ && let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 4318 | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] ... [INFO] [stdout] 4322 | } [INFO] [stdout] 4323 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4317:21 [INFO] [stdout] | [INFO] [stdout] 4317 | / if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) { [INFO] [stdout] 4318 | | if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | | registry = existing_registry; [INFO] [stdout] ... | [INFO] [stdout] 4323 | | } [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] 4317 ~ if let Ok(decoded) = general_purpose::STANDARD.decode(content.replace('\n', "")) [INFO] [stdout] 4318 ~ && let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | registry = existing_registry; [INFO] [stdout] 4321 | } [INFO] [stdout] 4322 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4318:25 [INFO] [stdout] | [INFO] [stdout] 4318 | / if let Ok(registry_str) = String::from_utf8(decoded) { [INFO] [stdout] 4319 | | if let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | | registry = existing_registry; [INFO] [stdout] 4321 | | } [INFO] [stdout] 4322 | | } [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] 4318 ~ if let Ok(registry_str) = String::from_utf8(decoded) [INFO] [stdout] 4319 ~ && let Ok(existing_registry) = serde_json::from_str::(®istry_str) { [INFO] [stdout] 4320 | registry = existing_registry; [INFO] [stdout] 4321 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4832:5 [INFO] [stdout] | [INFO] [stdout] 4832 | / if let Ok(tree_resp) = client.get(&tree_url) [INFO] [stdout] 4833 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 4834 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] 4835 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 4852 | | } [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] 4835 ~ .send() [INFO] [stdout] 4836 ~ && let Ok(tree_json) = tree_resp.json::() { [INFO] [stdout] 4837 | if let Some(tree_items) = tree_json.get("tree").and_then(JsonValue::as_array) { [INFO] [stdout] ... [INFO] [stdout] 4850 | } [INFO] [stdout] 4851 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4836:9 [INFO] [stdout] | [INFO] [stdout] 4836 | / if let Ok(tree_json) = tree_resp.json::() { [INFO] [stdout] 4837 | | if let Some(tree_items) = tree_json.get("tree").and_then(JsonValue::as_array) { [INFO] [stdout] 4838 | | existing_file_hashes = tree_items.iter() [INFO] [stdout] 4839 | | .filter_map(|item| { [INFO] [stdout] ... | [INFO] [stdout] 4851 | | } [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] 4836 ~ if let Ok(tree_json) = tree_resp.json::() [INFO] [stdout] 4837 ~ && let Some(tree_items) = tree_json.get("tree").and_then(JsonValue::as_array) { [INFO] [stdout] 4838 | existing_file_hashes = tree_items.iter() [INFO] [stdout] ... [INFO] [stdout] 4849 | .collect(); [INFO] [stdout] 4850 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4335:9 [INFO] [stdout] | [INFO] [stdout] 4335 | / if let Some(existing_pkg) = packages.get(package_name) { [INFO] [stdout] 4336 | | if existing_pkg.get("latest_version").and_then(JsonValue::as_str) == Some(version) && [INFO] [stdout] 4337 | | existing_pkg.get("description").and_then(JsonValue::as_str) == Some(description) && [INFO] [stdout] 4338 | | existing_pkg.get("authors") == Some(&authors) && [INFO] [stdout] ... | [INFO] [stdout] 4345 | | } [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] 4335 ~ if let Some(existing_pkg) = packages.get(package_name) [INFO] [stdout] 4336 ~ && existing_pkg.get("latest_version").and_then(JsonValue::as_str) == Some(version) && [INFO] [stdout] 4337 | existing_pkg.get("description").and_then(JsonValue::as_str) == Some(description) && [INFO] [stdout] ... [INFO] [stdout] 4343 | return Ok(()); [INFO] [stdout] 4344 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:4430:17 [INFO] [stdout] | [INFO] [stdout] 4430 | yaml.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `yaml.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `rsplit_once` [INFO] [stdout] --> src/main.rs:4454:25 [INFO] [stdout] | [INFO] [stdout] 4454 | full_dest.rsplitn(2, '/').nth(1).unwrap_or("") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `full_dest.rsplit_once('/').map(|x| x.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:4464:17 [INFO] [stdout] | [INFO] [stdout] 4464 | yaml.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `yaml.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4538:5 [INFO] [stdout] | [INFO] [stdout] 4538 | / if lym_json_path.exists() { [INFO] [stdout] 4539 | | if let Ok(lym_content) = fs::read_to_string(&lym_json_path) { [INFO] [stdout] 4540 | | if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] ... | [INFO] [stdout] 4595 | | } [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] 4538 ~ if lym_json_path.exists() [INFO] [stdout] 4539 ~ && let Ok(lym_content) = fs::read_to_string(&lym_json_path) { [INFO] [stdout] 4540 | if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] ... [INFO] [stdout] 4593 | } [INFO] [stdout] 4594 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4539:9 [INFO] [stdout] | [INFO] [stdout] 4539 | / if let Ok(lym_content) = fs::read_to_string(&lym_json_path) { [INFO] [stdout] 4540 | | if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] 4542 | | for artifact_obj in artifacts_arr { [INFO] [stdout] ... | [INFO] [stdout] 4594 | | } [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] 4539 ~ if let Ok(lym_content) = fs::read_to_string(&lym_json_path) [INFO] [stdout] 4540 ~ && let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] ... [INFO] [stdout] 4592 | } [INFO] [stdout] 4593 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4540:13 [INFO] [stdout] | [INFO] [stdout] 4540 | / if let Ok(lym_json) = serde_json::from_str::(&lym_content) { [INFO] [stdout] 4541 | | if let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] 4542 | | for artifact_obj in artifacts_arr { [INFO] [stdout] 4543 | | if let Some(runner_str) = artifact_obj.get("runner").and_then(Value::as_str) { [INFO] [stdout] ... | [INFO] [stdout] 4593 | | } [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] 4540 ~ if let Ok(lym_json) = serde_json::from_str::(&lym_content) [INFO] [stdout] 4541 ~ && let Some(artifacts_arr) = lym_json.get("artifacts").and_then(Value::as_array) { [INFO] [stdout] 4542 | for artifact_obj in artifacts_arr { [INFO] [stdout] ... [INFO] [stdout] 4591 | } [INFO] [stdout] 4592 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4636:5 [INFO] [stdout] | [INFO] [stdout] 4636 | / if let Ok(conflicts) = check_alias_conflicts(&temp_client, repo_slug, lib_name) { [INFO] [stdout] 4637 | | if !conflicts.is_empty() { [INFO] [stdout] 4638 | | println!(); [INFO] [stdout] 4639 | | println!("{}", "⚠️ WARNING: Package alias conflict detected!".bright_yellow().bold()); [INFO] [stdout] ... | [INFO] [stdout] 4661 | | } [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] 4636 ~ if let Ok(conflicts) = check_alias_conflicts(&temp_client, repo_slug, lib_name) [INFO] [stdout] 4637 ~ && !conflicts.is_empty() { [INFO] [stdout] 4638 | println!(); [INFO] [stdout] ... [INFO] [stdout] 4659 | } [INFO] [stdout] 4660 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5132:9 [INFO] [stdout] | [INFO] [stdout] 5132 | / if let Some(existing_hash) = existing_file_hashes.get(&workflow_path) { [INFO] [stdout] 5133 | | if existing_hash == &workflow_content_hash { [INFO] [stdout] 5134 | | skip_workflow_commit = true; [INFO] [stdout] 5135 | | if verbose { [INFO] [stdout] ... | [INFO] [stdout] 5139 | | } [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] 5132 ~ if let Some(existing_hash) = existing_file_hashes.get(&workflow_path) [INFO] [stdout] 5133 ~ && existing_hash == &workflow_content_hash { [INFO] [stdout] 5134 | skip_workflow_commit = true; [INFO] [stdout] ... [INFO] [stdout] 5137 | } [INFO] [stdout] 5138 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4832:5 [INFO] [stdout] | [INFO] [stdout] 4832 | / if let Ok(tree_resp) = client.get(&tree_url) [INFO] [stdout] 4833 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 4834 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] 4835 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 4852 | | } [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] 4835 ~ .send() [INFO] [stdout] 4836 ~ && let Ok(tree_json) = tree_resp.json::() { [INFO] [stdout] 4837 | if let Some(tree_items) = tree_json.get("tree").and_then(JsonValue::as_array) { [INFO] [stdout] ... [INFO] [stdout] 4850 | } [INFO] [stdout] 4851 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:4836:9 [INFO] [stdout] | [INFO] [stdout] 4836 | / if let Ok(tree_json) = tree_resp.json::() { [INFO] [stdout] 4837 | | if let Some(tree_items) = tree_json.get("tree").and_then(JsonValue::as_array) { [INFO] [stdout] 4838 | | existing_file_hashes = tree_items.iter() [INFO] [stdout] 4839 | | .filter_map(|item| { [INFO] [stdout] ... | [INFO] [stdout] 4851 | | } [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] 4836 ~ if let Ok(tree_json) = tree_resp.json::() [INFO] [stdout] 4837 ~ && let Some(tree_items) = tree_json.get("tree").and_then(JsonValue::as_array) { [INFO] [stdout] 4838 | existing_file_hashes = tree_items.iter() [INFO] [stdout] ... [INFO] [stdout] 4849 | .collect(); [INFO] [stdout] 4850 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/main.rs:5292:39 [INFO] [stdout] | [INFO] [stdout] 5292 | for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 5292 - for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] 5292 + for existing_path in existing_file_hashes.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/main.rs:5395:39 [INFO] [stdout] | [INFO] [stdout] 5395 | for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 5395 - for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] 5395 + for existing_path in existing_file_hashes.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5555:13 [INFO] [stdout] | [INFO] [stdout] 5555 | / if let Ok(runs_resp) = client.get(&workflow_runs_url) [INFO] [stdout] 5556 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 5557 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] 5558 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 5585 | | } [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] 5558 ~ .send() [INFO] [stdout] 5559 ~ && let Ok(runs_json) = runs_resp.json::() { [INFO] [stdout] 5560 | if verbose && attempts == 0 { [INFO] [stdout] ... [INFO] [stdout] 5583 | } [INFO] [stdout] 5584 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5132:9 [INFO] [stdout] | [INFO] [stdout] 5132 | / if let Some(existing_hash) = existing_file_hashes.get(&workflow_path) { [INFO] [stdout] 5133 | | if existing_hash == &workflow_content_hash { [INFO] [stdout] 5134 | | skip_workflow_commit = true; [INFO] [stdout] 5135 | | if verbose { [INFO] [stdout] ... | [INFO] [stdout] 5139 | | } [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] 5132 ~ if let Some(existing_hash) = existing_file_hashes.get(&workflow_path) [INFO] [stdout] 5133 ~ && existing_hash == &workflow_content_hash { [INFO] [stdout] 5134 | skip_workflow_commit = true; [INFO] [stdout] ... [INFO] [stdout] 5137 | } [INFO] [stdout] 5138 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:5561:44 [INFO] [stdout] | [INFO] [stdout] 5561 | ... println!("{}", format!("Checking for workflow runs...").bright_blue()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Checking for workflow runs...".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5575:37 [INFO] [stdout] | [INFO] [stdout] 5575 | / ... if workflow_name == format!("Build Artifacts for {}@{}", lib_name, version) { [INFO] [stdout] 5576 | | ... if let Some(id) = run.get("id").and_then(JsonValue::as_u64) { [INFO] [stdout] 5577 | | ... workflow_run_id = Some(id); [INFO] [stdout] 5578 | | ... break; [INFO] [stdout] 5579 | | ... } [INFO] [stdout] 5580 | | ... } [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] 5575 ~ if workflow_name == format!("Build Artifacts for {}@{}", lib_name, version) [INFO] [stdout] 5576 ~ && let Some(id) = run.get("id").and_then(JsonValue::as_u64) { [INFO] [stdout] 5577 | workflow_run_id = Some(id); [INFO] [stdout] 5578 | break; [INFO] [stdout] 5579 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5619:13 [INFO] [stdout] | [INFO] [stdout] 5619 | / if let Ok(run_resp) = client.get(&run_url) [INFO] [stdout] 5620 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 5621 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] 5622 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 5690 | | } [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] 5622 ~ .send() [INFO] [stdout] 5623 ~ && let Ok(run_json) = run_resp.json::() { [INFO] [stdout] 5624 | let status = run_json.get("status") [INFO] [stdout] ... [INFO] [stdout] 5688 | } [INFO] [stdout] 5689 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5635:25 [INFO] [stdout] | [INFO] [stdout] 5635 | / if status != "completed" { [INFO] [stdout] 5636 | | if let Ok(jobs_resp) = client.get(&jobs_url) [INFO] [stdout] 5637 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 5638 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] ... | [INFO] [stdout] 5670 | | } [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] 5635 ~ if status != "completed" [INFO] [stdout] 5636 ~ && let Ok(jobs_resp) = client.get(&jobs_url) [INFO] [stdout] 5637 | .header("User-Agent", "lym-publish") [INFO] [stdout] ... [INFO] [stdout] 5668 | } [INFO] [stdout] 5669 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5636:29 [INFO] [stdout] | [INFO] [stdout] 5636 | / ... if let Ok(jobs_resp) = client.get(&jobs_url) [INFO] [stdout] 5637 | | ... .header("User-Agent", "lym-publish") [INFO] [stdout] 5638 | | ... .basic_auth(&username, Some(&token)) [INFO] [stdout] 5639 | | ... .send() { [INFO] [stdout] ... | [INFO] [stdout] 5669 | | ... } [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] 5639 ~ .send() [INFO] [stdout] 5640 ~ && let Ok(jobs_json) = jobs_resp.json::() { [INFO] [stdout] 5641 | if let Some(jobs_arr) = jobs_json.get("jobs").and_then(JsonValue::as_array) { [INFO] [stdout] ... [INFO] [stdout] 5667 | } [INFO] [stdout] 5668 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5640:37 [INFO] [stdout] | [INFO] [stdout] 5640 | / ... if let Ok(jobs_json) = jobs_resp.json::() { [INFO] [stdout] 5641 | | ... if let Some(jobs_arr) = jobs_json.get("jobs").and_then(JsonValue::as_array) { [INFO] [stdout] 5642 | | ... for job in jobs_arr { [INFO] [stdout] 5643 | | ... if let (Some(job_name), Some(job_status)) = ( [INFO] [stdout] ... | [INFO] [stdout] 5668 | | ... } [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] 5640 ~ if let Ok(jobs_json) = jobs_resp.json::() [INFO] [stdout] 5641 ~ && let Some(jobs_arr) = jobs_json.get("jobs").and_then(JsonValue::as_array) { [INFO] [stdout] 5642 | for job in jobs_arr { [INFO] [stdout] ... [INFO] [stdout] 5666 | } [INFO] [stdout] 5667 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/main.rs:5662:57 [INFO] [stdout] | [INFO] [stdout] 5662 | ... println!("{}", format!(" {} runner: {}", job_name, status_display)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/main.rs:5292:39 [INFO] [stdout] | [INFO] [stdout] 5292 | for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 5292 - for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] 5292 + for existing_path in existing_file_hashes.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/main.rs:5395:39 [INFO] [stdout] | [INFO] [stdout] 5395 | for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 5395 - for (existing_path, _) in &existing_file_hashes { [INFO] [stdout] 5395 + for existing_path in existing_file_hashes.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5796:5 [INFO] [stdout] | [INFO] [stdout] 5796 | / if should_update { [INFO] [stdout] 5797 | | if let Err(e) = update_config_with_lucia_info(&config_path) { [INFO] [stdout] 5798 | | eprintln!("{}", format!("Warning: Could not update config with lucia info: {}", e).yellow()); [INFO] [stdout] 5799 | | exit(1); [INFO] [stdout] 5800 | | } [INFO] [stdout] 5801 | | } [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] 5796 ~ if should_update [INFO] [stdout] 5797 ~ && let Err(e) = update_config_with_lucia_info(&config_path) { [INFO] [stdout] 5798 | eprintln!("{}", format!("Warning: Could not update config with lucia info: {}", e).yellow()); [INFO] [stdout] 5799 | exit(1); [INFO] [stdout] 5800 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:5804:8 [INFO] [stdout] | [INFO] [stdout] 5804 | if args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/main.rs:1393:25 [INFO] [stdout] | [INFO] [stdout] 1393 | let all_platforms = vec!["windows".to_string(), "linux".to_string(), "macos".to_string(), "freebsd".to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["windows".to_string(), "linux".to_string(), "macos".to_string(), "freebsd".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5555:13 [INFO] [stdout] | [INFO] [stdout] 5555 | / if let Ok(runs_resp) = client.get(&workflow_runs_url) [INFO] [stdout] 5556 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 5557 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] 5558 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 5585 | | } [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] 5558 ~ .send() [INFO] [stdout] 5559 ~ && let Ok(runs_json) = runs_resp.json::() { [INFO] [stdout] 5560 | if verbose && attempts == 0 { [INFO] [stdout] ... [INFO] [stdout] 5583 | } [INFO] [stdout] 5584 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:5561:44 [INFO] [stdout] | [INFO] [stdout] 5561 | ... println!("{}", format!("Checking for workflow runs...").bright_blue()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Checking for workflow runs...".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5575:37 [INFO] [stdout] | [INFO] [stdout] 5575 | / ... if workflow_name == format!("Build Artifacts for {}@{}", lib_name, version) { [INFO] [stdout] 5576 | | ... if let Some(id) = run.get("id").and_then(JsonValue::as_u64) { [INFO] [stdout] 5577 | | ... workflow_run_id = Some(id); [INFO] [stdout] 5578 | | ... break; [INFO] [stdout] 5579 | | ... } [INFO] [stdout] 5580 | | ... } [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] 5575 ~ if workflow_name == format!("Build Artifacts for {}@{}", lib_name, version) [INFO] [stdout] 5576 ~ && let Some(id) = run.get("id").and_then(JsonValue::as_u64) { [INFO] [stdout] 5577 | workflow_run_id = Some(id); [INFO] [stdout] 5578 | break; [INFO] [stdout] 5579 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5619:13 [INFO] [stdout] | [INFO] [stdout] 5619 | / if let Ok(run_resp) = client.get(&run_url) [INFO] [stdout] 5620 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 5621 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] 5622 | | .send() { [INFO] [stdout] ... | [INFO] [stdout] 5690 | | } [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] 5622 ~ .send() [INFO] [stdout] 5623 ~ && let Ok(run_json) = run_resp.json::() { [INFO] [stdout] 5624 | let status = run_json.get("status") [INFO] [stdout] ... [INFO] [stdout] 5688 | } [INFO] [stdout] 5689 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5635:25 [INFO] [stdout] | [INFO] [stdout] 5635 | / if status != "completed" { [INFO] [stdout] 5636 | | if let Ok(jobs_resp) = client.get(&jobs_url) [INFO] [stdout] 5637 | | .header("User-Agent", "lym-publish") [INFO] [stdout] 5638 | | .basic_auth(&username, Some(&token)) [INFO] [stdout] ... | [INFO] [stdout] 5670 | | } [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] 5635 ~ if status != "completed" [INFO] [stdout] 5636 ~ && let Ok(jobs_resp) = client.get(&jobs_url) [INFO] [stdout] 5637 | .header("User-Agent", "lym-publish") [INFO] [stdout] ... [INFO] [stdout] 5668 | } [INFO] [stdout] 5669 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5636:29 [INFO] [stdout] | [INFO] [stdout] 5636 | / ... if let Ok(jobs_resp) = client.get(&jobs_url) [INFO] [stdout] 5637 | | ... .header("User-Agent", "lym-publish") [INFO] [stdout] 5638 | | ... .basic_auth(&username, Some(&token)) [INFO] [stdout] 5639 | | ... .send() { [INFO] [stdout] ... | [INFO] [stdout] 5669 | | ... } [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] 5639 ~ .send() [INFO] [stdout] 5640 ~ && let Ok(jobs_json) = jobs_resp.json::() { [INFO] [stdout] 5641 | if let Some(jobs_arr) = jobs_json.get("jobs").and_then(JsonValue::as_array) { [INFO] [stdout] ... [INFO] [stdout] 5667 | } [INFO] [stdout] 5668 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5640:37 [INFO] [stdout] | [INFO] [stdout] 5640 | / ... if let Ok(jobs_json) = jobs_resp.json::() { [INFO] [stdout] 5641 | | ... if let Some(jobs_arr) = jobs_json.get("jobs").and_then(JsonValue::as_array) { [INFO] [stdout] 5642 | | ... for job in jobs_arr { [INFO] [stdout] 5643 | | ... if let (Some(job_name), Some(job_status)) = ( [INFO] [stdout] ... | [INFO] [stdout] 5668 | | ... } [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] 5640 ~ if let Ok(jobs_json) = jobs_resp.json::() [INFO] [stdout] 5641 ~ && let Some(jobs_arr) = jobs_json.get("jobs").and_then(JsonValue::as_array) { [INFO] [stdout] 5642 | for job in jobs_arr { [INFO] [stdout] ... [INFO] [stdout] 5666 | } [INFO] [stdout] 5667 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/main.rs:5662:57 [INFO] [stdout] | [INFO] [stdout] 5662 | ... println!("{}", format!(" {} runner: {}", job_name, status_display)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:5796:5 [INFO] [stdout] | [INFO] [stdout] 5796 | / if should_update { [INFO] [stdout] 5797 | | if let Err(e) = update_config_with_lucia_info(&config_path) { [INFO] [stdout] 5798 | | eprintln!("{}", format!("Warning: Could not update config with lucia info: {}", e).yellow()); [INFO] [stdout] 5799 | | exit(1); [INFO] [stdout] 5800 | | } [INFO] [stdout] 5801 | | } [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] 5796 ~ if should_update [INFO] [stdout] 5797 ~ && let Err(e) = update_config_with_lucia_info(&config_path) { [INFO] [stdout] 5798 | eprintln!("{}", format!("Warning: Could not update config with lucia info: {}", e).yellow()); [INFO] [stdout] 5799 | exit(1); [INFO] [stdout] 5800 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:5804:8 [INFO] [stdout] | [INFO] [stdout] 5804 | if args.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/main.rs:1393:25 [INFO] [stdout] | [INFO] [stdout] 1393 | let all_platforms = vec!["windows".to_string(), "linux".to_string(), "macos".to_string(), "freebsd".to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["windows".to_string(), "linux".to_string(), "macos".to_string(), "freebsd".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 47.31s [INFO] running `Command { std: "docker" "inspect" "bf97441e892704e871dfc716bb3cfd74b80fdb1f42ee51373cf430541d021cfc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bf97441e892704e871dfc716bb3cfd74b80fdb1f42ee51373cf430541d021cfc", kill_on_drop: false }` [INFO] [stdout] bf97441e892704e871dfc716bb3cfd74b80fdb1f42ee51373cf430541d021cfc