[INFO] cloning repository https://github.com/Hanysovec/pvr-project [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Hanysovec/pvr-project" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHanysovec%2Fpvr-project", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHanysovec%2Fpvr-project'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 056e376167a90088eb0a5102245f2556546af3c2 [INFO] linting Hanysovec/pvr-project against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHanysovec%2Fpvr-project" "/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/Hanysovec/pvr-project [INFO] finished tweaking git repo https://github.com/Hanysovec/pvr-project [INFO] tweaked toml for git repo https://github.com/Hanysovec/pvr-project written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Hanysovec/pvr-project on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Hanysovec/pvr-project already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tower-sessions-sqlx-store v0.15.0 [INFO] [stderr] Downloaded tower-sessions-memory-store v0.14.0 [INFO] [stderr] Downloaded html-escape v0.2.13 [INFO] [stderr] Downloaded cookie v0.18.1 [INFO] [stderr] Downloaded tower-sessions v0.14.0 [INFO] [stderr] Downloaded rsa v0.9.9 [INFO] [stderr] Downloaded tower-sessions-core v0.14.0 [INFO] [stderr] Downloaded tower-cookies v0.11.0 [INFO] [stderr] Downloaded axum-core v0.5.5 [INFO] [stderr] Downloaded base64ct v1.8.1 [INFO] [stderr] Downloaded aws-lc-rs v1.15.2 [INFO] [stderr] Downloaded axum v0.8.6 [INFO] [stderr] Downloaded aws-lc-sys v0.35.0 [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] b639a06c3f705ae2f26e980e5769d51e55b0eb34283a573c83aacf753354110a [INFO] running `Command { std: "docker" "start" "-a" "b639a06c3f705ae2f26e980e5769d51e55b0eb34283a573c83aacf753354110a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b639a06c3f705ae2f26e980e5769d51e55b0eb34283a573c83aacf753354110a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b639a06c3f705ae2f26e980e5769d51e55b0eb34283a573c83aacf753354110a", kill_on_drop: false }` [INFO] [stdout] b639a06c3f705ae2f26e980e5769d51e55b0eb34283a573c83aacf753354110a [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] 3aa6fa433eaf7f8b58faa1f4c636cd2d793c980a8c65b5589f822a14d24e99f8 [INFO] running `Command { std: "docker" "start" "-a" "3aa6fa433eaf7f8b58faa1f4c636cd2d793c980a8c65b5589f822a14d24e99f8", kill_on_drop: false }` [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling libc v0.2.176 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling find-msvc-tools v0.1.6 [INFO] [stderr] Compiling shlex v1.3.0 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Compiling icu_properties_data v2.1.2 [INFO] [stderr] Compiling stable_deref_trait v1.2.1 [INFO] [stderr] Checking slab v0.4.11 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Compiling fs_extra v1.3.0 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Compiling dunce v1.0.5 [INFO] [stderr] Compiling time-macros v0.2.24 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Compiling cfg-if v1.0.3 [INFO] [stderr] Checking rustls-pki-types v1.13.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling writeable v0.6.2 [INFO] [stderr] Compiling aws-lc-rs v1.15.2 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking socket2 v0.6.0 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Compiling cc v1.2.51 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling litemap v0.8.1 [INFO] [stderr] Checking hashbrown v0.16.0 [INFO] [stderr] Checking indexmap v2.11.4 [INFO] [stderr] Checking untrusted v0.9.0 [INFO] [stderr] Checking deranged v0.5.5 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking sync_wrapper v1.0.2 [INFO] [stderr] Compiling pkg-config v0.3.32 [INFO] [stderr] Compiling rustls v0.23.35 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling aws-lc-sys v0.35.0 [INFO] [stderr] Compiling libsqlite3-sys v0.30.1 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling form_urlencoded v1.2.2 [INFO] [stderr] Compiling crypto-common v0.1.7 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling powerfmt v0.2.0 [INFO] [stderr] Compiling tokio v1.47.1 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Compiling parking_lot v0.12.4 [INFO] [stderr] Compiling serde_derive v1.0.228 [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 tracing-attributes v0.1.31 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling zerovec v0.11.5 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling tinystr v0.8.2 [INFO] [stderr] Compiling potential_utf v0.1.4 [INFO] [stderr] Compiling icu_locale_core v2.1.1 [INFO] [stderr] Compiling zerotrie v0.2.3 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Compiling icu_provider v2.1.1 [INFO] [stderr] Compiling icu_collections v2.1.1 [INFO] [stderr] Compiling icu_properties v2.1.2 [INFO] [stderr] Compiling icu_normalizer v2.1.1 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Compiling rustls-webpki v0.103.8 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Compiling concurrent-queue v2.5.0 [INFO] [stderr] Compiling webpki-roots v1.0.3 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling event-listener v5.4.1 [INFO] [stderr] Compiling url v2.5.7 [INFO] [stderr] Compiling crc v3.4.0 [INFO] [stderr] Compiling webpki-roots v0.26.11 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking axum-core v0.5.5 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Compiling futures-intrusive v0.5.0 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Compiling crossbeam-queue v0.3.12 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling flume v0.11.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking h2 v0.4.12 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Compiling unicase v2.8.1 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Checking hdrhistogram v7.5.4 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Compiling sqlx-core v0.8.6 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling cookie v0.18.1 [INFO] [stderr] Checking bitflags v2.9.4 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking ipnet v2.11.0 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tower-sessions-core v0.14.0 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Checking openssl-probe v0.2.0 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Checking rustls-native-certs v0.8.3 [INFO] [stderr] Checking sharded-slab v0.1.7 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking rmp v0.8.15 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking iri-string v0.7.10 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking base64ct v1.8.1 [INFO] [stderr] Compiling sqlx-sqlite v0.8.6 [INFO] [stderr] Checking linux-raw-sys v0.11.0 [INFO] [stderr] Checking hyper v1.7.0 [INFO] [stderr] Checking http-range-header v0.4.2 [INFO] [stderr] Checking password-hash v0.5.0 [INFO] [stderr] Checking rmp-serde v1.3.1 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Checking tower-cookies v0.11.0 [INFO] [stderr] Checking tower-sessions-memory-store v0.14.0 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking blake2 v0.10.6 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking serde_path_to_error v0.1.20 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking hyper-util v0.1.17 [INFO] [stderr] Checking fastrand v2.3.0 [INFO] [stderr] Checking utf8-width v0.1.8 [INFO] [stderr] Checking html-escape v0.2.13 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking tracing-appender v0.2.4 [INFO] [stderr] Checking argon2 v0.5.3 [INFO] [stderr] Checking tower-sessions v0.14.0 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking uuid v1.18.1 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling sqlx-macros-core v0.8.6 [INFO] [stderr] Checking axum v0.8.6 [INFO] [stderr] Compiling sqlx-macros v0.8.6 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking rustls-platform-verifier v0.6.2 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.13.1 [INFO] [stderr] Checking sqlx v0.8.6 [INFO] [stderr] Checking tower-sessions-sqlx-store v0.15.0 [INFO] [stderr] Checking pvr_project_simulationcraft_sol0123 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | / if let Some(token) = &auth.access_token { [INFO] [stdout] 98 | | if Instant::now() < auth.expires_at { [INFO] [stdout] 99 | | return Ok(token.clone()); [INFO] [stdout] 100 | | } [INFO] [stdout] 101 | | } [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] 97 ~ if let Some(token) = &auth.access_token [INFO] [stdout] 98 ~ && Instant::now() < auth.expires_at { [INFO] [stdout] 99 | return Ok(token.clone()); [INFO] [stdout] 100 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | / if let Ok(res) = media_res { [INFO] [stdout] 161 | | if let Ok(media) = res.json::().await { [INFO] [stdout] 162 | | if let Some(assets) = media.assets { [INFO] [stdout] 163 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] ... | [INFO] [stdout] 168 | | } [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] 160 ~ if let Ok(res) = media_res [INFO] [stdout] 161 ~ && let Ok(media) = res.json::().await { [INFO] [stdout] 162 | if let Some(assets) = media.assets { [INFO] [stdout] ... [INFO] [stdout] 166 | } [INFO] [stdout] 167 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | / if let Ok(media) = res.json::().await { [INFO] [stdout] 162 | | if let Some(assets) = media.assets { [INFO] [stdout] 163 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | | icon_url = icon.value.clone(); [INFO] [stdout] ... | [INFO] [stdout] 167 | | } [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] 161 ~ if let Ok(media) = res.json::().await [INFO] [stdout] 162 ~ && let Some(assets) = media.assets { [INFO] [stdout] 163 | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | icon_url = icon.value.clone(); [INFO] [stdout] 165 | } [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:162:13 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Some(assets) = media.assets { [INFO] [stdout] 163 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | | icon_url = icon.value.clone(); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [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] 162 ~ if let Some(assets) = media.assets [INFO] [stdout] 163 ~ && let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | icon_url = icon.value.clone(); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:245:5 [INFO] [stdout] | [INFO] [stdout] 245 | / if let Some((json_str,)) = row { [INFO] [stdout] 246 | | if let Ok(val) = serde_json::from_str::(&json_str) { [INFO] [stdout] 247 | | return Json(val); [INFO] [stdout] 248 | | } [INFO] [stdout] 249 | | } [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] 245 ~ if let Some((json_str,)) = row [INFO] [stdout] 246 ~ && let Ok(val) = serde_json::from_str::(&json_str) { [INFO] [stdout] 247 | return Json(val); [INFO] [stdout] 248 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | / if let Ok(res) = state [INFO] [stdout] 281 | | .http_client [INFO] [stdout] 282 | | .get(&media_url) [INFO] [stdout] 283 | | .bearer_auth(&token) [INFO] [stdout] ... | [INFO] [stdout] 294 | | } [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] 285 ~ .await [INFO] [stdout] 286 ~ && let Ok(media) = res.json::().await { [INFO] [stdout] 287 | if let Some(assets) = media.assets { [INFO] [stdout] ... [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / if let Ok(media) = res.json::().await { [INFO] [stdout] 288 | | if let Some(assets) = media.assets { [INFO] [stdout] 289 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | | icon_url = icon.value.clone(); [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [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] 287 ~ if let Ok(media) = res.json::().await [INFO] [stdout] 288 ~ && let Some(assets) = media.assets { [INFO] [stdout] 289 | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | icon_url = icon.value.clone(); [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:288:13 [INFO] [stdout] | [INFO] [stdout] 288 | / if let Some(assets) = media.assets { [INFO] [stdout] 289 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | | icon_url = icon.value.clone(); [INFO] [stdout] 291 | | } [INFO] [stdout] 292 | | } [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] 288 ~ if let Some(assets) = media.assets [INFO] [stdout] 289 ~ && let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | icon_url = icon.value.clone(); [INFO] [stdout] 291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 322 | / if let Some(bonus_str) = ¶ms.bonus { [INFO] [stdout] 323 | | if !bonus_str.is_empty() { [INFO] [stdout] 324 | | let api_bonus = bonus_str.replace("/", ","); [INFO] [stdout] 325 | | item_url.push_str(&format!("&bonusList={}", api_bonus)); [INFO] [stdout] 326 | | } [INFO] [stdout] 327 | | } [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] 322 ~ if let Some(bonus_str) = ¶ms.bonus [INFO] [stdout] 323 ~ && !bonus_str.is_empty() { [INFO] [stdout] 324 | let api_bonus = bonus_str.replace("/", ","); [INFO] [stdout] 325 | item_url.push_str(&format!("&bonusList={}", api_bonus)); [INFO] [stdout] 326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | / if let Some(gems_str) = ¶ms.gems { [INFO] [stdout] 333 | | if !gems_str.is_empty() { [INFO] [stdout] 334 | | let futures = gems_str [INFO] [stdout] 335 | | .split(',') [INFO] [stdout] ... | [INFO] [stdout] 340 | | } [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] 332 ~ if let Some(gems_str) = ¶ms.gems [INFO] [stdout] 333 ~ && !gems_str.is_empty() { [INFO] [stdout] 334 | let futures = gems_str [INFO] [stdout] ... [INFO] [stdout] 338 | return join_all(futures).await; [INFO] [stdout] 339 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:349:5 [INFO] [stdout] | [INFO] [stdout] 349 | / if let Ok(res) = item_res { [INFO] [stdout] 350 | | if let Ok(data) = res.json::().await { [INFO] [stdout] 351 | | let type_name = data.inventory_type.name.as_str(); [INFO] [stdout] 352 | | weapon_type = match type_name { [INFO] [stdout] ... | [INFO] [stdout] 371 | | } [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 let Ok(res) = item_res [INFO] [stdout] 350 ~ && let Ok(data) = res.json::().await { [INFO] [stdout] 351 | let type_name = data.inventory_type.name.as_str(); [INFO] [stdout] ... [INFO] [stdout] 369 | } [INFO] [stdout] 370 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/api.rs:373:53 [INFO] [stdout] | [INFO] [stdout] 373 | let gems: Vec = gems_res.into_iter().filter_map(|g| g).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/topgear.rs:291:16 [INFO] [stdout] | [INFO] [stdout] 291 | if let Ok(_) = simulate::run_simc(&temp_simc_path, &temp_json_path) { [INFO] [stdout] | -------^^^^^------------------------------------------------------- help: try: `if simulate::run_simc(&temp_simc_path, &temp_json_path).is_ok()` [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/topgear.rs:292:13 [INFO] [stdout] | [INFO] [stdout] 292 | / if let Ok(json_str) = fs::read_to_string(&temp_json_path) { [INFO] [stdout] 293 | | if let Ok(v) = serde_json::from_str::(&json_str) { [INFO] [stdout] 294 | | if let Some(dps) = [INFO] [stdout] 295 | | v["sim"]["players"][0]["collected_data"]["dps"]["mean"].as_f64() [INFO] [stdout] ... | [INFO] [stdout] 303 | | } [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] 292 ~ if let Ok(json_str) = fs::read_to_string(&temp_json_path) [INFO] [stdout] 293 ~ && let Ok(v) = serde_json::from_str::(&json_str) { [INFO] [stdout] 294 | if let Some(dps) = [INFO] [stdout] ... [INFO] [stdout] 301 | } [INFO] [stdout] 302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/topgear.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | / if let Ok(v) = serde_json::from_str::(&json_str) { [INFO] [stdout] 294 | | if let Some(dps) = [INFO] [stdout] 295 | | v["sim"]["players"][0]["collected_data"]["dps"]["mean"].as_f64() [INFO] [stdout] ... | [INFO] [stdout] 302 | | } [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] 293 ~ if let Ok(v) = serde_json::from_str::(&json_str) [INFO] [stdout] 294 ~ && let Some(dps) = [INFO] [stdout] 295 | v["sim"]["players"][0]["collected_data"]["dps"]["mean"].as_f64() [INFO] [stdout] ... [INFO] [stdout] 300 | }); [INFO] [stdout] 301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/users.rs:316:17 [INFO] [stdout] | [INFO] [stdout] 316 | assert!(!(role_user >= UserRole::Premium)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(role_user < UserRole::Premium)` [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 `if` statement can be collapsed [INFO] [stdout] --> src/utils.rs:167:16 [INFO] [stdout] | [INFO] [stdout] 167 | } else if let Some(caps) = re_bag.captures(current_line) { [INFO] [stdout] | ________________^ [INFO] [stdout] 168 | | if let Some(name_caps) = re_name_ilvl.captures(prev_line) { [INFO] [stdout] 169 | | let (bonus, gems) = parse_params(&caps[3]); [INFO] [stdout] 170 | | let clean_line = format!("{}=,id={}{}", &caps[1], &caps[2], &caps[3]); [INFO] [stdout] ... | [INFO] [stdout] 182 | | } [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] 167 ~ } else if let Some(caps) = re_bag.captures(current_line) [INFO] [stdout] 168 ~ && let Some(name_caps) = re_name_ilvl.captures(prev_line) { [INFO] [stdout] 169 | let (bonus, gems) = parse_params(&caps[3]); [INFO] [stdout] ... [INFO] [stdout] 180 | }); [INFO] [stdout] 181 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/utils.rs:200:18 [INFO] [stdout] | [INFO] [stdout] 200 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | return v.get("results")?.get(0)?.get("dps")?.as_f64(); [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] 210 - return v.get("results")?.get(0)?.get("dps")?.as_f64(); [INFO] [stdout] 210 + v.get("results")?.get(0)?.get("dps")?.as_f64() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / return v [INFO] [stdout] 216 | | .get("sim")? [INFO] [stdout] 217 | | .get("players")? [INFO] [stdout] 218 | | .get(0)? [INFO] [stdout] ... | [INFO] [stdout] 221 | | .get("mean")? [INFO] [stdout] 222 | | .as_f64(); [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] 215 ~ v [INFO] [stdout] 216 + .get("sim")? [INFO] [stdout] 217 + .get("players")? [INFO] [stdout] 218 + .get(0)? [INFO] [stdout] 219 + .get("collected_data")? [INFO] [stdout] 220 + .get("dps")? [INFO] [stdout] 221 + .get("mean")? [INFO] [stdout] 222 ~ .as_f64() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | / if let Some(token) = &auth.access_token { [INFO] [stdout] 98 | | if Instant::now() < auth.expires_at { [INFO] [stdout] 99 | | return Ok(token.clone()); [INFO] [stdout] 100 | | } [INFO] [stdout] 101 | | } [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] 97 ~ if let Some(token) = &auth.access_token [INFO] [stdout] 98 ~ && Instant::now() < auth.expires_at { [INFO] [stdout] 99 | return Ok(token.clone()); [INFO] [stdout] 100 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | / if let Ok(res) = media_res { [INFO] [stdout] 161 | | if let Ok(media) = res.json::().await { [INFO] [stdout] 162 | | if let Some(assets) = media.assets { [INFO] [stdout] 163 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] ... | [INFO] [stdout] 168 | | } [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] 160 ~ if let Ok(res) = media_res [INFO] [stdout] 161 ~ && let Ok(media) = res.json::().await { [INFO] [stdout] 162 | if let Some(assets) = media.assets { [INFO] [stdout] ... [INFO] [stdout] 166 | } [INFO] [stdout] 167 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | / if let Ok(media) = res.json::().await { [INFO] [stdout] 162 | | if let Some(assets) = media.assets { [INFO] [stdout] 163 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | | icon_url = icon.value.clone(); [INFO] [stdout] ... | [INFO] [stdout] 167 | | } [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] 161 ~ if let Ok(media) = res.json::().await [INFO] [stdout] 162 ~ && let Some(assets) = media.assets { [INFO] [stdout] 163 | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | icon_url = icon.value.clone(); [INFO] [stdout] 165 | } [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:162:13 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Some(assets) = media.assets { [INFO] [stdout] 163 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | | icon_url = icon.value.clone(); [INFO] [stdout] 165 | | } [INFO] [stdout] 166 | | } [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] 162 ~ if let Some(assets) = media.assets [INFO] [stdout] 163 ~ && let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 164 | icon_url = icon.value.clone(); [INFO] [stdout] 165 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:245:5 [INFO] [stdout] | [INFO] [stdout] 245 | / if let Some((json_str,)) = row { [INFO] [stdout] 246 | | if let Ok(val) = serde_json::from_str::(&json_str) { [INFO] [stdout] 247 | | return Json(val); [INFO] [stdout] 248 | | } [INFO] [stdout] 249 | | } [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] 245 ~ if let Some((json_str,)) = row [INFO] [stdout] 246 ~ && let Ok(val) = serde_json::from_str::(&json_str) { [INFO] [stdout] 247 | return Json(val); [INFO] [stdout] 248 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | / if let Ok(res) = state [INFO] [stdout] 281 | | .http_client [INFO] [stdout] 282 | | .get(&media_url) [INFO] [stdout] 283 | | .bearer_auth(&token) [INFO] [stdout] ... | [INFO] [stdout] 294 | | } [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] 285 ~ .await [INFO] [stdout] 286 ~ && let Ok(media) = res.json::().await { [INFO] [stdout] 287 | if let Some(assets) = media.assets { [INFO] [stdout] ... [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / if let Ok(media) = res.json::().await { [INFO] [stdout] 288 | | if let Some(assets) = media.assets { [INFO] [stdout] 289 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | | icon_url = icon.value.clone(); [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [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] 287 ~ if let Ok(media) = res.json::().await [INFO] [stdout] 288 ~ && let Some(assets) = media.assets { [INFO] [stdout] 289 | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | icon_url = icon.value.clone(); [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:288:13 [INFO] [stdout] | [INFO] [stdout] 288 | / if let Some(assets) = media.assets { [INFO] [stdout] 289 | | if let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | | icon_url = icon.value.clone(); [INFO] [stdout] 291 | | } [INFO] [stdout] 292 | | } [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] 288 ~ if let Some(assets) = media.assets [INFO] [stdout] 289 ~ && let Some(icon) = assets.iter().find(|a| a.key == "icon") { [INFO] [stdout] 290 | icon_url = icon.value.clone(); [INFO] [stdout] 291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 322 | / if let Some(bonus_str) = ¶ms.bonus { [INFO] [stdout] 323 | | if !bonus_str.is_empty() { [INFO] [stdout] 324 | | let api_bonus = bonus_str.replace("/", ","); [INFO] [stdout] 325 | | item_url.push_str(&format!("&bonusList={}", api_bonus)); [INFO] [stdout] 326 | | } [INFO] [stdout] 327 | | } [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] 322 ~ if let Some(bonus_str) = ¶ms.bonus [INFO] [stdout] 323 ~ && !bonus_str.is_empty() { [INFO] [stdout] 324 | let api_bonus = bonus_str.replace("/", ","); [INFO] [stdout] 325 | item_url.push_str(&format!("&bonusList={}", api_bonus)); [INFO] [stdout] 326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:332:9 [INFO] [stdout] | [INFO] [stdout] 332 | / if let Some(gems_str) = ¶ms.gems { [INFO] [stdout] 333 | | if !gems_str.is_empty() { [INFO] [stdout] 334 | | let futures = gems_str [INFO] [stdout] 335 | | .split(',') [INFO] [stdout] ... | [INFO] [stdout] 340 | | } [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] 332 ~ if let Some(gems_str) = ¶ms.gems [INFO] [stdout] 333 ~ && !gems_str.is_empty() { [INFO] [stdout] 334 | let futures = gems_str [INFO] [stdout] ... [INFO] [stdout] 338 | return join_all(futures).await; [INFO] [stdout] 339 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/api.rs:349:5 [INFO] [stdout] | [INFO] [stdout] 349 | / if let Ok(res) = item_res { [INFO] [stdout] 350 | | if let Ok(data) = res.json::().await { [INFO] [stdout] 351 | | let type_name = data.inventory_type.name.as_str(); [INFO] [stdout] 352 | | weapon_type = match type_name { [INFO] [stdout] ... | [INFO] [stdout] 371 | | } [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 let Ok(res) = item_res [INFO] [stdout] 350 ~ && let Ok(data) = res.json::().await { [INFO] [stdout] 351 | let type_name = data.inventory_type.name.as_str(); [INFO] [stdout] ... [INFO] [stdout] 369 | } [INFO] [stdout] 370 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/api.rs:373:53 [INFO] [stdout] | [INFO] [stdout] 373 | let gems: Vec = gems_res.into_iter().filter_map(|g| g).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/topgear.rs:291:16 [INFO] [stdout] | [INFO] [stdout] 291 | if let Ok(_) = simulate::run_simc(&temp_simc_path, &temp_json_path) { [INFO] [stdout] | -------^^^^^------------------------------------------------------- help: try: `if simulate::run_simc(&temp_simc_path, &temp_json_path).is_ok()` [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/topgear.rs:292:13 [INFO] [stdout] | [INFO] [stdout] 292 | / if let Ok(json_str) = fs::read_to_string(&temp_json_path) { [INFO] [stdout] 293 | | if let Ok(v) = serde_json::from_str::(&json_str) { [INFO] [stdout] 294 | | if let Some(dps) = [INFO] [stdout] 295 | | v["sim"]["players"][0]["collected_data"]["dps"]["mean"].as_f64() [INFO] [stdout] ... | [INFO] [stdout] 303 | | } [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] 292 ~ if let Ok(json_str) = fs::read_to_string(&temp_json_path) [INFO] [stdout] 293 ~ && let Ok(v) = serde_json::from_str::(&json_str) { [INFO] [stdout] 294 | if let Some(dps) = [INFO] [stdout] ... [INFO] [stdout] 301 | } [INFO] [stdout] 302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/topgear.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | / if let Ok(v) = serde_json::from_str::(&json_str) { [INFO] [stdout] 294 | | if let Some(dps) = [INFO] [stdout] 295 | | v["sim"]["players"][0]["collected_data"]["dps"]["mean"].as_f64() [INFO] [stdout] ... | [INFO] [stdout] 302 | | } [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] 293 ~ if let Ok(v) = serde_json::from_str::(&json_str) [INFO] [stdout] 294 ~ && let Some(dps) = [INFO] [stdout] 295 | v["sim"]["players"][0]["collected_data"]["dps"]["mean"].as_f64() [INFO] [stdout] ... [INFO] [stdout] 300 | }); [INFO] [stdout] 301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/utils.rs:167:16 [INFO] [stdout] | [INFO] [stdout] 167 | } else if let Some(caps) = re_bag.captures(current_line) { [INFO] [stdout] | ________________^ [INFO] [stdout] 168 | | if let Some(name_caps) = re_name_ilvl.captures(prev_line) { [INFO] [stdout] 169 | | let (bonus, gems) = parse_params(&caps[3]); [INFO] [stdout] 170 | | let clean_line = format!("{}=,id={}{}", &caps[1], &caps[2], &caps[3]); [INFO] [stdout] ... | [INFO] [stdout] 182 | | } [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] 167 ~ } else if let Some(caps) = re_bag.captures(current_line) [INFO] [stdout] 168 ~ && let Some(name_caps) = re_name_ilvl.captures(prev_line) { [INFO] [stdout] 169 | let (bonus, gems) = parse_params(&caps[3]); [INFO] [stdout] ... [INFO] [stdout] 180 | }); [INFO] [stdout] 181 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/utils.rs:200:18 [INFO] [stdout] | [INFO] [stdout] 200 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | return v.get("results")?.get(0)?.get("dps")?.as_f64(); [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] 210 - return v.get("results")?.get(0)?.get("dps")?.as_f64(); [INFO] [stdout] 210 + v.get("results")?.get(0)?.get("dps")?.as_f64() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / return v [INFO] [stdout] 216 | | .get("sim")? [INFO] [stdout] 217 | | .get("players")? [INFO] [stdout] 218 | | .get(0)? [INFO] [stdout] ... | [INFO] [stdout] 221 | | .get("mean")? [INFO] [stdout] 222 | | .as_f64(); [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] 215 ~ v [INFO] [stdout] 216 + .get("sim")? [INFO] [stdout] 217 + .get("players")? [INFO] [stdout] 218 + .get(0)? [INFO] [stdout] 219 + .get("collected_data")? [INFO] [stdout] 220 + .get("dps")? [INFO] [stdout] 221 + .get("mean")? [INFO] [stdout] 222 ~ .as_f64() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 41s [INFO] running `Command { std: "docker" "inspect" "3aa6fa433eaf7f8b58faa1f4c636cd2d793c980a8c65b5589f822a14d24e99f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3aa6fa433eaf7f8b58faa1f4c636cd2d793c980a8c65b5589f822a14d24e99f8", kill_on_drop: false }` [INFO] [stdout] 3aa6fa433eaf7f8b58faa1f4c636cd2d793c980a8c65b5589f822a14d24e99f8