[INFO] cloning repository https://github.com/tienedev/ygege [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tienedev/ygege" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftienedev%2Fygege", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftienedev%2Fygege'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f064086eb774504266fbcfe5633e0710e82fe4a3 [INFO] linting tienedev/ygege/f064086eb774504266fbcfe5633e0710e82fe4a3 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftienedev%2Fygege" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/tienedev/ygege [INFO] finished tweaking git repo https://github.com/tienedev/ygege [INFO] tweaked toml for git repo https://github.com/tienedev/ygege written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tienedev/ygege 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/tienedev/ygege 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 webpki-root-certs v0.26.11 [INFO] [stderr] Downloaded typed-builder-macro v0.21.2 [INFO] [stderr] Downloaded wreq-util v2.2.6 [INFO] [stderr] Downloaded linked_hash_set v0.1.5 [INFO] [stderr] Downloaded compression-core v0.4.29 [INFO] [stderr] Downloaded unicode-ident v1.0.20 [INFO] [stderr] Downloaded generic-array v0.14.9 [INFO] [stderr] Downloaded web_atoms v0.2.0 [INFO] [stderr] Downloaded compression-codecs v0.4.31 [INFO] [stderr] Downloaded zmij v1.0.12 [INFO] [stderr] Downloaded tokio-boring2 v4.15.15 [INFO] [stderr] Downloaded resolv-conf v0.7.5 [INFO] [stderr] Downloaded trust-dns-resolver v0.23.2 [INFO] [stderr] Downloaded async-compression v0.4.32 [INFO] [stderr] Downloaded cc v1.2.43 [INFO] [stderr] Downloaded hyper2 v1.5.5 [INFO] [stderr] Downloaded http2 v0.4.21 [INFO] [stderr] Downloaded boring2 v4.15.15 [INFO] [stderr] Downloaded webpki-root-certs v1.0.3 [INFO] [stderr] Downloaded sysinfo v0.38.2 [INFO] [stderr] Downloaded wreq v5.3.0 [INFO] [stderr] Downloaded lru v0.13.0 [INFO] [stderr] Downloaded fslock v0.2.1 [INFO] [stderr] Downloaded typed-builder v0.21.2 [INFO] [stderr] Downloaded trust-dns-proto v0.23.2 [INFO] [stderr] Downloaded boring-sys2 v4.15.15 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 503a8728fa26371c8d0fa495a8fba9f57876f363cab4886cff2cb2a1c6f1c440 [INFO] running `Command { std: "docker" "start" "-a" "503a8728fa26371c8d0fa495a8fba9f57876f363cab4886cff2cb2a1c6f1c440", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "503a8728fa26371c8d0fa495a8fba9f57876f363cab4886cff2cb2a1c6f1c440", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "503a8728fa26371c8d0fa495a8fba9f57876f363cab4886cff2cb2a1c6f1c440", kill_on_drop: false }` [INFO] [stdout] 503a8728fa26371c8d0fa495a8fba9f57876f363cab4886cff2cb2a1c6f1c440 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2a6f9783af931679f63b5477ba70911fb38e5d037390fe2af923ba7b603d3b1a [INFO] running `Command { std: "docker" "start" "-a" "2a6f9783af931679f63b5477ba70911fb38e5d037390fe2af923ba7b603d3b1a", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.20 [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling phf_shared v0.13.1 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking mio v1.1.0 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Compiling regex-syntax v0.8.8 [INFO] [stderr] Compiling minimal-lexical v0.2.1 [INFO] [stderr] Compiling memchr v2.7.6 [INFO] [stderr] Compiling libloading v0.8.9 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Compiling proc-macro2 v1.0.103 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Compiling bindgen v0.72.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling phf_generator v0.13.1 [INFO] [stderr] Compiling phf_codegen v0.13.1 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling generic-array v0.14.9 [INFO] [stderr] Compiling itertools v0.13.0 [INFO] [stderr] Checking new_debug_unreachable v1.0.6 [INFO] [stderr] Compiling num-conv v0.1.0 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling rustc-hash v2.1.1 [INFO] [stderr] Checking deranged v0.5.4 [INFO] [stderr] Compiling fs_extra v1.3.0 [INFO] [stderr] Compiling zmij v1.0.12 [INFO] [stderr] Checking http v1.3.1 [INFO] [stderr] Compiling syn v2.0.108 [INFO] [stderr] Compiling time-macros v0.2.24 [INFO] [stderr] Compiling string_cache_codegen v0.6.1 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling cookie v0.18.1 [INFO] [stderr] Checking foreign-types-shared v0.3.1 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Checking mac v0.1.1 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking futf v0.1.5 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling web_atoms v0.2.0 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling fslock v0.2.1 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling cc v1.2.43 [INFO] [stderr] Checking compression-core v0.4.29 [INFO] [stderr] Checking dtoa v1.0.10 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking psl-types v2.0.11 [INFO] [stderr] Compiling bytes v1.10.1 [INFO] [stderr] Checking rustls-pki-types v1.12.0 [INFO] [stderr] Compiling tracing-core v0.1.34 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking webpki-root-certs v1.0.3 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling tracing v0.1.41 [INFO] [stderr] Checking dtoa-short v0.3.5 [INFO] [stderr] Checking tendril v0.4.3 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Compiling selectors v0.33.0 [INFO] [stderr] Checking actix-service v2.0.3 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Compiling bytestring v1.5.0 [INFO] [stderr] Checking idna v0.4.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking webpki-root-certs v0.26.11 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking linked_hash_set v0.1.5 [INFO] [stderr] Checking local-channel v0.1.5 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking servo_arc v0.4.3 [INFO] [stderr] Checking data-encoding v2.9.0 [INFO] [stderr] Checking humantime v2.3.0 [INFO] [stderr] Checking lru v0.13.0 [INFO] [stderr] Checking antidote v1.0.0 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking lru-cache v0.1.2 [INFO] [stderr] Checking ego-tree v0.10.0 [INFO] [stderr] Checking resolv-conf v0.7.5 [INFO] [stderr] Checking chrono v0.4.44 [INFO] [stderr] Checking sysinfo v0.38.2 [INFO] [stderr] Checking qstring v0.7.2 [INFO] [stderr] Checking urlencoding v2.1.3 [INFO] [stderr] Compiling regex v1.12.2 [INFO] [stderr] Checking cookie v0.16.2 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stderr] Checking pretty_env_logger v0.5.0 [INFO] [stderr] Compiling actix-router v0.5.4 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling phf_macros v0.13.1 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling foreign-types-macros v0.2.3 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Compiling typed-builder-macro v0.21.2 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking foreign-types v0.5.0 [INFO] [stderr] Compiling enum-as-inner v0.6.1 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling actix-web-codegen v4.3.0 [INFO] [stderr] Compiling actix-macros v0.2.4 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Checking phf v0.13.1 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking cssparser v0.36.0 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking compression-codecs v0.4.31 [INFO] [stderr] Checking async-stream v0.3.6 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking typed-builder v0.21.2 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.3 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking string_cache v0.9.0 [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 tokio-util v0.7.16 [INFO] [stderr] Checking actix-rt v2.11.0 [INFO] [stderr] Checking async-compression v0.4.32 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking markup5ever v0.36.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking actix-server v2.6.0 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking html5ever v0.36.1 [INFO] [stderr] Compiling boring-sys2 v4.15.15 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking publicsuffix v2.3.0 [INFO] [stderr] Checking http2 v0.4.21 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking actix-codec v0.5.2 [INFO] [stderr] Checking scraper v0.25.0 [INFO] [stderr] Checking cookie_store v0.21.1 [INFO] [stderr] Checking trust-dns-proto v0.23.2 [INFO] [stderr] Checking hyper2 v1.5.5 [INFO] [stderr] Checking trust-dns-resolver v0.23.2 [INFO] [stderr] Checking actix-http v3.12.0 [INFO] [stderr] Checking actix-web v4.13.0 [INFO] [stderr] Checking boring2 v4.15.15 [INFO] [stderr] Checking tokio-boring2 v4.15.15 [INFO] [stderr] Checking wreq v5.3.0 [INFO] [stderr] Checking wreq-util v2.2.6 [INFO] [stderr] Checking ygege v0.8.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: value assigned to `new_client_holder` is never read [INFO] [stdout] --> src/rest/torrent.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | new_client_holder = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `new_client_holder` is never read [INFO] [stdout] --> src/rest/torrent.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | new_client_holder = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `strip_html_wrapper` is never used [INFO] [stdout] --> src/ygg_client.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 23 | impl YggClient { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 35 | fn strip_html_wrapper(html: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/auth.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let domain_lock = DOMAIN.lock()?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/auth.rs:31:75 [INFO] [stdout] | [INFO] [stdout] 31 | return login_via_flaresolverr(fs_url, domain, username, password).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | login_direct(domain, username, password, use_sessions).await [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/categories.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/categories.rs:24:47 [INFO] [stdout] | [INFO] [stdout] 24 | let _guard = get_rate_limiter().acquire().await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | let response = client.get(&url).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `strip_html_wrapper` is never used [INFO] [stdout] --> src/ygg_client.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 23 | impl YggClient { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 35 | fn strip_html_wrapper(html: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/auth.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let domain_lock = DOMAIN.lock()?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/auth.rs:31:75 [INFO] [stdout] | [INFO] [stdout] 31 | return login_via_flaresolverr(fs_url, domain, username, password).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | login_direct(domain, username, password, use_sessions).await [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TMDB` contains a capitalized acronym [INFO] [stdout] --> src/dbs.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | TMDB, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Tmdb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IMDB` contains a capitalized acronym [INFO] [stdout] --> src/dbs.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | IMDB, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Imdb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/categories.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/categories.rs:24:47 [INFO] [stdout] | [INFO] [stdout] 24 | let _guard = get_rate_limiter().acquire().await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | let response = client.get(&url).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dbs.rs:193:13 [INFO] [stdout] | [INFO] [stdout] 193 | / if let Some(iso_3166_1) = title_entry.get("iso_3166_1").and_then(|c| c.as_str()) { [INFO] [stdout] 194 | | if iso_3166_1 == "FR" [INFO] [stdout] 195 | | || iso_3166_1 == "US" [INFO] [stdout] 196 | | || iso_3166_1 == "GB" [INFO] [stdout] ... | [INFO] [stdout] 216 | | } [INFO] [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] 193 ~ if let Some(iso_3166_1) = title_entry.get("iso_3166_1").and_then(|c| c.as_str()) [INFO] [stdout] 194 ~ && (iso_3166_1 == "FR" [INFO] [stdout] 195 | || iso_3166_1 == "US" [INFO] [stdout] 196 | || iso_3166_1 == "GB" [INFO] [stdout] 197 ~ || iso_3166_1 == "EN") [INFO] [stdout] 198 | { [INFO] [stdout] ... [INFO] [stdout] 214 | } [INFO] [stdout] 215 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dbs.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 194 | / if iso_3166_1 == "FR" [INFO] [stdout] 195 | | || iso_3166_1 == "US" [INFO] [stdout] 196 | | || iso_3166_1 == "GB" [INFO] [stdout] 197 | | || iso_3166_1 == "EN" [INFO] [stdout] ... | [INFO] [stdout] 215 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 194 ~ if (iso_3166_1 == "FR" [INFO] [stdout] 195 | || iso_3166_1 == "US" [INFO] [stdout] 196 | || iso_3166_1 == "GB" [INFO] [stdout] 197 ~ || iso_3166_1 == "EN" [INFO] [stdout] 198 ~ || iso_3166_1 == "EN") [INFO] [stdout] 199 | { [INFO] [stdout] 200 ~ && let Some(title) = title_entry.get("title").and_then(|t| t.as_str()) { [INFO] [stdout] 201 | if !titles.contains(&title.to_string()) { [INFO] [stdout] ... [INFO] [stdout] 214 | } [INFO] [stdout] 215 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dbs.rs:199:21 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(title) = title_entry.get("title").and_then(|t| t.as_str()) { [INFO] [stdout] 200 | | if !titles.contains(&title.to_string()) { [INFO] [stdout] 201 | | let title = match title.ends_with("1") { [INFO] [stdout] 202 | | true => title.trim_end_matches("1").trim(), [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 199 ~ if let Some(title) = title_entry.get("title").and_then(|t| t.as_str()) [INFO] [stdout] 200 ~ && !titles.contains(&title.to_string()) { [INFO] [stdout] 201 | let title = match title.ends_with("1") { [INFO] [stdout] ... [INFO] [stdout] 212 | } [INFO] [stdout] 213 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TMDB` contains a capitalized acronym [INFO] [stdout] --> src/dbs.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | TMDB, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Tmdb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IMDB` contains a capitalized acronym [INFO] [stdout] --> src/dbs.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | IMDB, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Imdb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dbs.rs:193:13 [INFO] [stdout] | [INFO] [stdout] 193 | / if let Some(iso_3166_1) = title_entry.get("iso_3166_1").and_then(|c| c.as_str()) { [INFO] [stdout] 194 | | if iso_3166_1 == "FR" [INFO] [stdout] 195 | | || iso_3166_1 == "US" [INFO] [stdout] 196 | | || iso_3166_1 == "GB" [INFO] [stdout] ... | [INFO] [stdout] 216 | | } [INFO] [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] 193 ~ if let Some(iso_3166_1) = title_entry.get("iso_3166_1").and_then(|c| c.as_str()) [INFO] [stdout] 194 ~ && (iso_3166_1 == "FR" [INFO] [stdout] 195 | || iso_3166_1 == "US" [INFO] [stdout] 196 | || iso_3166_1 == "GB" [INFO] [stdout] 197 ~ || iso_3166_1 == "EN") [INFO] [stdout] 198 | { [INFO] [stdout] ... [INFO] [stdout] 214 | } [INFO] [stdout] 215 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dbs.rs:194:17 [INFO] [stdout] | [INFO] [stdout] 194 | / if iso_3166_1 == "FR" [INFO] [stdout] 195 | | || iso_3166_1 == "US" [INFO] [stdout] 196 | | || iso_3166_1 == "GB" [INFO] [stdout] 197 | | || iso_3166_1 == "EN" [INFO] [stdout] ... | [INFO] [stdout] 215 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 194 ~ if (iso_3166_1 == "FR" [INFO] [stdout] 195 | || iso_3166_1 == "US" [INFO] [stdout] 196 | || iso_3166_1 == "GB" [INFO] [stdout] 197 ~ || iso_3166_1 == "EN" [INFO] [stdout] 198 ~ || iso_3166_1 == "EN") [INFO] [stdout] 199 | { [INFO] [stdout] 200 ~ && let Some(title) = title_entry.get("title").and_then(|t| t.as_str()) { [INFO] [stdout] 201 | if !titles.contains(&title.to_string()) { [INFO] [stdout] ... [INFO] [stdout] 214 | } [INFO] [stdout] 215 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/dbs.rs:199:21 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(title) = title_entry.get("title").and_then(|t| t.as_str()) { [INFO] [stdout] 200 | | if !titles.contains(&title.to_string()) { [INFO] [stdout] 201 | | let title = match title.ends_with("1") { [INFO] [stdout] 202 | | true => title.trim_end_matches("1").trim(), [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 199 ~ if let Some(title) = title_entry.get("title").and_then(|t| t.as_str()) [INFO] [stdout] 200 ~ && !titles.contains(&title.to_string()) { [INFO] [stdout] 201 | let title = match title.ends_with("1") { [INFO] [stdout] ... [INFO] [stdout] 212 | } [INFO] [stdout] 213 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:55:27 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn sort(torrents: &mut Vec, sort: Option, order: Option) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - pub fn sort(torrents: &mut Vec, sort: Option, order: Option) { [INFO] [stdout] 55 + pub fn sort(torrents: &mut [Torrent], sort: Option, order: Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | torrents.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); [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] 62 - torrents.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); [INFO] [stdout] 62 + torrents.sort_by_key(|a| a.name.to_lowercase()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | torrents.sort_by(|a, b| b.name.to_lowercase().cmp(&a.name.to_lowercase())); [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] help: try [INFO] [stdout] | [INFO] [stdout] 64 - torrents.sort_by(|a, b| b.name.to_lowercase().cmp(&a.name.to_lowercase())); [INFO] [stdout] 64 + torrents.sort_by_key(|b| std::cmp::Reverse(b.name.to_lowercase())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | torrents.sort_by(|a, b| a.seed.cmp(&b.seed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 69 - torrents.sort_by(|a, b| a.seed.cmp(&b.seed)); [INFO] [stdout] 69 + torrents.sort_by_key(|a| a.seed); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:71:21 [INFO] [stdout] | [INFO] [stdout] 71 | torrents.sort_by(|a, b| b.seed.cmp(&a.seed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 71 - torrents.sort_by(|a, b| b.seed.cmp(&a.seed)); [INFO] [stdout] 71 + torrents.sort_by_key(|b| std::cmp::Reverse(b.seed)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | torrents.sort_by(|a, b| a.comments_count.cmp(&b.comments_count)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 76 - torrents.sort_by(|a, b| a.comments_count.cmp(&b.comments_count)); [INFO] [stdout] 76 + torrents.sort_by_key(|a| a.comments_count); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | torrents.sort_by(|a, b| b.comments_count.cmp(&a.comments_count)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 78 - torrents.sort_by(|a, b| b.comments_count.cmp(&a.comments_count)); [INFO] [stdout] 78 + torrents.sort_by_key(|b| std::cmp::Reverse(b.comments_count)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | torrents.sort_by(|a, b| a.age_stamp.cmp(&b.age_stamp)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 83 - torrents.sort_by(|a, b| a.age_stamp.cmp(&b.age_stamp)); [INFO] [stdout] 83 + torrents.sort_by_key(|a| a.age_stamp); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | torrents.sort_by(|a, b| b.age_stamp.cmp(&a.age_stamp)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 85 - torrents.sort_by(|a, b| b.age_stamp.cmp(&a.age_stamp)); [INFO] [stdout] 85 + torrents.sort_by_key(|b| std::cmp::Reverse(b.age_stamp)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:90:21 [INFO] [stdout] | [INFO] [stdout] 90 | torrents.sort_by(|a, b| a.completed.cmp(&b.completed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 90 - torrents.sort_by(|a, b| a.completed.cmp(&b.completed)); [INFO] [stdout] 90 + torrents.sort_by_key(|a| a.completed); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | torrents.sort_by(|a, b| b.completed.cmp(&a.completed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 92 - torrents.sort_by(|a, b| b.completed.cmp(&a.completed)); [INFO] [stdout] 92 + torrents.sort_by_key(|b| std::cmp::Reverse(b.completed)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:97:21 [INFO] [stdout] | [INFO] [stdout] 97 | torrents.sort_by(|a, b| a.leech.cmp(&b.leech)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 97 - torrents.sort_by(|a, b| a.leech.cmp(&b.leech)); [INFO] [stdout] 97 + torrents.sort_by_key(|a| a.leech); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | torrents.sort_by(|a, b| b.leech.cmp(&a.leech)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 99 - torrents.sort_by(|a, b| b.leech.cmp(&a.leech)); [INFO] [stdout] 99 + torrents.sort_by_key(|b| std::cmp::Reverse(b.leech)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parser.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/parser.rs:55:27 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn sort(torrents: &mut Vec, sort: Option, order: Option) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - pub fn sort(torrents: &mut Vec, sort: Option, order: Option) { [INFO] [stdout] 55 + pub fn sort(torrents: &mut [Torrent], sort: Option, order: Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | torrents.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); [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] 62 - torrents.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); [INFO] [stdout] 62 + torrents.sort_by_key(|a| a.name.to_lowercase()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | torrents.sort_by(|a, b| b.name.to_lowercase().cmp(&a.name.to_lowercase())); [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] help: try [INFO] [stdout] | [INFO] [stdout] 64 - torrents.sort_by(|a, b| b.name.to_lowercase().cmp(&a.name.to_lowercase())); [INFO] [stdout] 64 + torrents.sort_by_key(|b| std::cmp::Reverse(b.name.to_lowercase())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | torrents.sort_by(|a, b| a.seed.cmp(&b.seed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 69 - torrents.sort_by(|a, b| a.seed.cmp(&b.seed)); [INFO] [stdout] 69 + torrents.sort_by_key(|a| a.seed); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:71:21 [INFO] [stdout] | [INFO] [stdout] 71 | torrents.sort_by(|a, b| b.seed.cmp(&a.seed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 71 - torrents.sort_by(|a, b| b.seed.cmp(&a.seed)); [INFO] [stdout] 71 + torrents.sort_by_key(|b| std::cmp::Reverse(b.seed)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | torrents.sort_by(|a, b| a.comments_count.cmp(&b.comments_count)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 76 - torrents.sort_by(|a, b| a.comments_count.cmp(&b.comments_count)); [INFO] [stdout] 76 + torrents.sort_by_key(|a| a.comments_count); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | torrents.sort_by(|a, b| b.comments_count.cmp(&a.comments_count)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 78 - torrents.sort_by(|a, b| b.comments_count.cmp(&a.comments_count)); [INFO] [stdout] 78 + torrents.sort_by_key(|b| std::cmp::Reverse(b.comments_count)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | torrents.sort_by(|a, b| a.age_stamp.cmp(&b.age_stamp)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 83 - torrents.sort_by(|a, b| a.age_stamp.cmp(&b.age_stamp)); [INFO] [stdout] 83 + torrents.sort_by_key(|a| a.age_stamp); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | torrents.sort_by(|a, b| b.age_stamp.cmp(&a.age_stamp)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 85 - torrents.sort_by(|a, b| b.age_stamp.cmp(&a.age_stamp)); [INFO] [stdout] 85 + torrents.sort_by_key(|b| std::cmp::Reverse(b.age_stamp)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:90:21 [INFO] [stdout] | [INFO] [stdout] 90 | torrents.sort_by(|a, b| a.completed.cmp(&b.completed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 90 - torrents.sort_by(|a, b| a.completed.cmp(&b.completed)); [INFO] [stdout] 90 + torrents.sort_by_key(|a| a.completed); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | torrents.sort_by(|a, b| b.completed.cmp(&a.completed)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 92 - torrents.sort_by(|a, b| b.completed.cmp(&a.completed)); [INFO] [stdout] 92 + torrents.sort_by_key(|b| std::cmp::Reverse(b.completed)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:97:21 [INFO] [stdout] | [INFO] [stdout] 97 | torrents.sort_by(|a, b| a.leech.cmp(&b.leech)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 97 - torrents.sort_by(|a, b| a.leech.cmp(&b.leech)); [INFO] [stdout] 97 + torrents.sort_by_key(|a| a.leech); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/parser.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | torrents.sort_by(|a, b| b.leech.cmp(&a.leech)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 99 - torrents.sort_by(|a, b| b.leech.cmp(&a.leech)); [INFO] [stdout] 99 + torrents.sort_by_key(|b| std::cmp::Reverse(b.leech)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/homepage.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / if let Some(accept_language) = req.headers().get("Accept-Language") { [INFO] [stdout] 17 | | if let Ok(lang_str) = accept_language.to_str() { [INFO] [stdout] 18 | | let mut french_q = 0.0; [INFO] [stdout] 19 | | let mut english_q = 0.0; [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if let Some(accept_language) = req.headers().get("Accept-Language") [INFO] [stdout] 17 ~ && let Ok(lang_str) = accept_language.to_str() { [INFO] [stdout] 18 | let mut french_q = 0.0; [INFO] [stdout] ... [INFO] [stdout] 42 | return french_q > english_q; [INFO] [stdout] 43 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/rest/infos.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/rest/infos.rs:37:6 [INFO] [stdout] | [INFO] [stdout] 37 | .await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | let user = crate::user::get_account(&data.client).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | .await [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | match timeout(Duration::from_secs(5), TcpStream::connect(socket_addr)).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | let remain = match get_remaining_downloads(&data.client).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ip` after checking its variant with `is_some` [INFO] [stdout] --> src/rest/infos.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 85 | if ip.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = ip` [INFO] [stdout] 86 | let ip_addr = ip.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/rest/infos.rs:80:22 [INFO] [stdout] | [INFO] [stdout] 80 | let ip = ip [INFO] [stdout] | ______________________^ [INFO] [stdout] 81 | | .into_iter() [INFO] [stdout] 82 | | .next() [INFO] [stdout] 83 | | .and_then(|socket_addr| Some(socket_addr.ip())); [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ let ip = ip [INFO] [stdout] 81 + .into_iter() [INFO] [stdout] 82 ~ .next().map(|socket_addr| socket_addr.ip()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parser.rs:253:5 [INFO] [stdout] | [INFO] [stdout] 253 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars` [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 function has too many arguments (10/7) [INFO] [stdout] --> src/rest/search.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / async fn batch_best_search( [INFO] [stdout] 14 | | client: &YggClient, [INFO] [stdout] 15 | | queries: Vec, [INFO] [stdout] 16 | | offset: Option, [INFO] [stdout] ... | [INFO] [stdout] 23 | | config: &Config, [INFO] [stdout] 24 | | ) -> Result, Box> { [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: this function has too many arguments (10/7) [INFO] [stdout] --> src/rest/search.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / async fn batch_category_search( [INFO] [stdout] 144 | | client: &YggClient, [INFO] [stdout] 145 | | name: &str, [INFO] [stdout] 146 | | offset: Option, [INFO] [stdout] ... | [INFO] [stdout] 153 | | config: &Config, [INFO] [stdout] 154 | | ) -> Result, Box> { [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: called `unwrap` on `categories_list` after checking its variant with `is_some` [INFO] [stdout] --> src/rest/search.rs:381:20 [INFO] [stdout] | [INFO] [stdout] 380 | if category.is_none() && categories_list.is_some() { [INFO] [stdout] | ------------------------- the check is happening here [INFO] [stdout] 381 | let cats = categories_list.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/search.rs:279:5 [INFO] [stdout] | [INFO] [stdout] 279 | / if categories_list.is_some() && connarr.is_some() { [INFO] [stdout] 280 | | if categories_list.as_ref().unwrap().len() > 2 { [INFO] [stdout] 281 | | categories_list = None; [INFO] [stdout] 282 | | } [INFO] [stdout] 283 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 279 ~ if categories_list.is_some() && connarr.is_some() [INFO] [stdout] 280 ~ && categories_list.as_ref().unwrap().len() > 2 { [INFO] [stdout] 281 | categories_list = None; [INFO] [stdout] 282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/rest/search.rs:288:16 [INFO] [stdout] | [INFO] [stdout] 288 | } else if let Some(id) = qs.get("imdbid") { [INFO] [stdout] | ________________^ [INFO] [stdout] 289 | | Some((id, IMDB, "IMDB")) [INFO] [stdout] 290 | | } else { [INFO] [stdout] 291 | | None [INFO] [stdout] 292 | | }; [INFO] [stdout] | |_________^ help: try: `{ qs.get("imdbid").map(|id| (id, IMDB, "IMDB")) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/search.rs:372:5 [INFO] [stdout] | [INFO] [stdout] 372 | / if name.is_empty() { [INFO] [stdout] 373 | | if connarr.is_some() { [INFO] [stdout] 374 | | order = Some(Order::Descending); [INFO] [stdout] 375 | | sort = Some(Sort::PublishDate); [INFO] [stdout] 376 | | } [INFO] [stdout] 377 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 372 ~ if name.is_empty() [INFO] [stdout] 373 ~ && connarr.is_some() { [INFO] [stdout] 374 | order = Some(Order::Descending); [INFO] [stdout] 375 | sort = Some(Sort::PublishDate); [INFO] [stdout] 376 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/rest/torrent.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let domain_lock = DOMAIN.lock()?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/rest/torrent.rs:29:59 [INFO] [stdout] | [INFO] [stdout] 29 | let mut response = data.client.post_form(&url, &body).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | let _ = flaresolverr.destroy_session(session_id).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | response = fresh_client.post_form(&url, &body).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 87 | sleep(Duration::from_secs(30)).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | let (status, bytes) = active_client.get_bytes(&url).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | return match crate::utils::get_remaining_downloads(active_client).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/torrent.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / if let YggClient::Proxied { flaresolverr, session_id, .. } = &data.client { [INFO] [stdout] 42 | | if !session_id.is_empty() { [INFO] [stdout] 43 | | let _ = flaresolverr.destroy_session(session_id).await; [INFO] [stdout] 44 | | debug!("Destroyed old FlareSolverr session: {}", session_id); [INFO] [stdout] 45 | | } [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 41 ~ if let YggClient::Proxied { flaresolverr, session_id, .. } = &data.client [INFO] [stdout] 42 ~ && !session_id.is_empty() { [INFO] [stdout] 43 | let _ = flaresolverr.destroy_session(session_id).await; [INFO] [stdout] 44 | debug!("Destroyed old FlareSolverr session: {}", session_id); [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/homepage.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | / if let Some(accept_language) = req.headers().get("Accept-Language") { [INFO] [stdout] 17 | | if let Ok(lang_str) = accept_language.to_str() { [INFO] [stdout] 18 | | let mut french_q = 0.0; [INFO] [stdout] 19 | | let mut english_q = 0.0; [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if let Some(accept_language) = req.headers().get("Accept-Language") [INFO] [stdout] 17 ~ && let Ok(lang_str) = accept_language.to_str() { [INFO] [stdout] 18 | let mut french_q = 0.0; [INFO] [stdout] ... [INFO] [stdout] 42 | return french_q > english_q; [INFO] [stdout] 43 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/rest/infos.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/rest/infos.rs:37:6 [INFO] [stdout] | [INFO] [stdout] 37 | .await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | let user = crate::user::get_account(&data.client).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | .await [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | match timeout(Duration::from_secs(5), TcpStream::connect(socket_addr)).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | let remain = match get_remaining_downloads(&data.client).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ip` after checking its variant with `is_some` [INFO] [stdout] --> src/rest/infos.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 85 | if ip.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = ip` [INFO] [stdout] 86 | let ip_addr = ip.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/rest/infos.rs:80:22 [INFO] [stdout] | [INFO] [stdout] 80 | let ip = ip [INFO] [stdout] | ______________________^ [INFO] [stdout] 81 | | .into_iter() [INFO] [stdout] 82 | | .next() [INFO] [stdout] 83 | | .and_then(|socket_addr| Some(socket_addr.ip())); [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 ~ let ip = ip [INFO] [stdout] 81 + .into_iter() [INFO] [stdout] 82 ~ .next().map(|socket_addr| socket_addr.ip()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/user.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / if let Err(e) = &user { [INFO] [stdout] 13 | | if e.to_string().contains("Session expired") && !data.is_custom { [INFO] [stdout] 14 | | info!("Trying to renew session..."); [INFO] [stdout] 15 | | let new_client = crate::auth::login( [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 12 ~ if let Err(e) = &user [INFO] [stdout] 13 ~ && e.to_string().contains("Session expired") && !data.is_custom { [INFO] [stdout] 14 | info!("Trying to renew session..."); [INFO] [stdout] ... [INFO] [stdout] 61 | return Ok(response.json(json)); [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/rest/search.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / async fn batch_best_search( [INFO] [stdout] 14 | | client: &YggClient, [INFO] [stdout] 15 | | queries: Vec, [INFO] [stdout] 16 | | offset: Option, [INFO] [stdout] ... | [INFO] [stdout] 23 | | config: &Config, [INFO] [stdout] 24 | | ) -> Result, Box> { [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: redundant closure [INFO] [stdout] --> src/search.rs:14:30 [INFO] [stdout] | [INFO] [stdout] 14 | RATE_LIMITER.get_or_init(|| RateLimiter::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RateLimiter::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/search.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / pub async fn search( [INFO] [stdout] 18 | | client: &YggClient, [INFO] [stdout] 19 | | name: &str, [INFO] [stdout] 20 | | offset: Option, [INFO] [stdout] ... | [INFO] [stdout] 26 | | quote_search: bool, [INFO] [stdout] 27 | | ) -> Result, Box> { [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 manual char comparison can be written more succinctly [INFO] [stdout] --> src/search.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | .split(|c| c == '+' || c == ' ') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['+', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` 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/search.rs:156:76 [INFO] [stdout] | [INFO] [stdout] 156 | let mut url = format!("https://{domain}/engine/search?name={}", encode(&name)); [INFO] [stdout] | ^^^^^ help: change this to: `name` [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/search.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | / if let Some(category) = category { [INFO] [stdout] 161 | | if let Some((cat, sub_cat)) = get_category_pair(category) { [INFO] [stdout] 162 | | url.push_str(&format!("&category={}", cat)); [INFO] [stdout] 163 | | url.push_str(&format!("&sub_category={}", sub_cat)); [INFO] [stdout] 164 | | } [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 Some(category) = category [INFO] [stdout] 161 ~ && let Some((cat, sub_cat)) = get_category_pair(category) { [INFO] [stdout] 162 | url.push_str(&format!("&category={}", cat)); [INFO] [stdout] 163 | url.push_str(&format!("&sub_category={}", sub_cat)); [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/rest/search.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | / async fn batch_category_search( [INFO] [stdout] 144 | | client: &YggClient, [INFO] [stdout] 145 | | name: &str, [INFO] [stdout] 146 | | offset: Option, [INFO] [stdout] ... | [INFO] [stdout] 153 | | config: &Config, [INFO] [stdout] 154 | | ) -> Result, Box> { [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: called `unwrap` on `categories_list` after checking its variant with `is_some` [INFO] [stdout] --> src/rest/search.rs:381:20 [INFO] [stdout] | [INFO] [stdout] 380 | if category.is_none() && categories_list.is_some() { [INFO] [stdout] | ------------------------- the check is happening here [INFO] [stdout] 381 | let cats = categories_list.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/search.rs:279:5 [INFO] [stdout] | [INFO] [stdout] 279 | / if categories_list.is_some() && connarr.is_some() { [INFO] [stdout] 280 | | if categories_list.as_ref().unwrap().len() > 2 { [INFO] [stdout] 281 | | categories_list = None; [INFO] [stdout] 282 | | } [INFO] [stdout] 283 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 279 ~ if categories_list.is_some() && connarr.is_some() [INFO] [stdout] 280 ~ && categories_list.as_ref().unwrap().len() > 2 { [INFO] [stdout] 281 | categories_list = None; [INFO] [stdout] 282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/rest/search.rs:288:16 [INFO] [stdout] | [INFO] [stdout] 288 | } else if let Some(id) = qs.get("imdbid") { [INFO] [stdout] | ________________^ [INFO] [stdout] 289 | | Some((id, IMDB, "IMDB")) [INFO] [stdout] 290 | | } else { [INFO] [stdout] 291 | | None [INFO] [stdout] 292 | | }; [INFO] [stdout] | |_________^ help: try: `{ qs.get("imdbid").map(|id| (id, IMDB, "IMDB")) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` 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/user.rs:128:74 [INFO] [stdout] | [INFO] [stdout] 128 | ... account.uploaded = convert_size_to_bytes(&value.trim())?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `value.trim()` [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/user.rs:130:76 [INFO] [stdout] | [INFO] [stdout] 130 | ... account.downloaded = convert_size_to_bytes(&value.trim())?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `value.trim()` [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/rest/search.rs:372:5 [INFO] [stdout] | [INFO] [stdout] 372 | / if name.is_empty() { [INFO] [stdout] 373 | | if connarr.is_some() { [INFO] [stdout] 374 | | order = Some(Order::Descending); [INFO] [stdout] 375 | | sort = Some(Sort::PublishDate); [INFO] [stdout] 376 | | } [INFO] [stdout] 377 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 372 ~ if name.is_empty() [INFO] [stdout] 373 ~ && connarr.is_some() { [INFO] [stdout] 374 | order = Some(Order::Descending); [INFO] [stdout] 375 | sort = Some(Sort::PublishDate); [INFO] [stdout] 376 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / if let Some(img) = document.select(&img_selector).next() { [INFO] [stdout] 154 | | if let Some(src) = img.value().attr("src") { [INFO] [stdout] 155 | | account.avatar_url = src.to_string(); [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 153 ~ if let Some(img) = document.select(&img_selector).next() [INFO] [stdout] 154 ~ && let Some(src) = img.value().attr("src") { [INFO] [stdout] 155 | account.avatar_url = src.to_string(); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | / if let Some(input) = document.select(&input_selector).next() { [INFO] [stdout] 161 | | if let Some(value) = input.value().attr("value") { [INFO] [stdout] 162 | | account.email = value.to_string(); [INFO] [stdout] 163 | | } [INFO] [stdout] 164 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 Some(input) = document.select(&input_selector).next() [INFO] [stdout] 161 ~ && let Some(value) = input.value().attr("value") { [INFO] [stdout] 162 | account.email = value.to_string(); [INFO] [stdout] 163 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | / if let Some(input) = document.select(&age_input_selector).next() { [INFO] [stdout] 168 | | if let Some(value) = input.value().attr("value") { [INFO] [stdout] 169 | | let age: u16 = value.parse().unwrap_or(0); [INFO] [stdout] 170 | | if age > 0 { [INFO] [stdout] ... | [INFO] [stdout] 174 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 ~ if let Some(input) = document.select(&age_input_selector).next() [INFO] [stdout] 168 ~ && let Some(value) = input.value().attr("value") { [INFO] [stdout] 169 | let age: u16 = value.parse().unwrap_or(0); [INFO] [stdout] ... [INFO] [stdout] 172 | } [INFO] [stdout] 173 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / if let Some(input) = document.select(&gender_input_selector).next() { [INFO] [stdout] 178 | | if let Some(value) = input.value().attr("value") { [INFO] [stdout] 179 | | account.gender = Some(value.to_string()); [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 177 ~ if let Some(input) = document.select(&gender_input_selector).next() [INFO] [stdout] 178 ~ && let Some(value) = input.value().attr("value") { [INFO] [stdout] 179 | account.gender = Some(value.to_string()); [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/user.rs:203:31 [INFO] [stdout] | [INFO] [stdout] 203 | let number_part = &size_str[..size_str.len() - unit.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/user.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | if size_str.ends_with(unit) { [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_suffix` method [INFO] [stdout] | [INFO] [stdout] 202 ~ if let Some(number_part) = size_str.strip_suffix(unit) { [INFO] [stdout] 203 ~ let number: f64 = number_part.replace(",", ".").trim().parse()?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/rest/torrent.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let domain_lock = DOMAIN.lock()?; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/rest/torrent.rs:29:59 [INFO] [stdout] | [INFO] [stdout] 29 | let mut response = data.client.post_form(&url, &body).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | let _ = flaresolverr.destroy_session(session_id).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | response = fresh_client.post_form(&url, &body).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 87 | sleep(Duration::from_secs(30)).await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 98 | let (status, bytes) = active_client.get_bytes(&url).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | return match crate::utils::get_remaining_downloads(active_client).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ygg_client.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / if html.trim_start().starts_with('<') { [INFO] [stdout] 37 | | if let Some(pre_start) = html.find("') { [INFO] [stdout] 39 | | let content_start = pre_start + gt_pos + 1; [INFO] [stdout] ... | [INFO] [stdout] 45 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 36 ~ if html.trim_start().starts_with('<') [INFO] [stdout] 37 ~ && let Some(pre_start) = html.find("') { [INFO] [stdout] ... [INFO] [stdout] 43 | } [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ygg_client.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | / if let Some(pre_start) = html.find("') { [INFO] [stdout] 39 | | let content_start = pre_start + gt_pos + 1; [INFO] [stdout] 40 | | if let Some(pre_end) = html[content_start..].find("") { [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 37 ~ if let Some(pre_start) = html.find("') { [INFO] [stdout] 39 | let content_start = pre_start + gt_pos + 1; [INFO] [stdout] ... [INFO] [stdout] 42 | } [INFO] [stdout] 43 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/torrent.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / if let YggClient::Proxied { flaresolverr, session_id, .. } = &data.client { [INFO] [stdout] 42 | | if !session_id.is_empty() { [INFO] [stdout] 43 | | let _ = flaresolverr.destroy_session(session_id).await; [INFO] [stdout] 44 | | debug!("Destroyed old FlareSolverr session: {}", session_id); [INFO] [stdout] 45 | | } [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 41 ~ if let YggClient::Proxied { flaresolverr, session_id, .. } = &data.client [INFO] [stdout] 42 ~ && !session_id.is_empty() { [INFO] [stdout] 43 | let _ = flaresolverr.destroy_session(session_id).await; [INFO] [stdout] 44 | debug!("Destroyed old FlareSolverr session: {}", session_id); [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/main.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let mut domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/main.rs:132:6 [INFO] [stdout] | [INFO] [stdout] 132 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 135 | let account = user::get_account(&client).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | if let Err(e) = init_categories(&client).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 164 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/rest/user.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / if let Err(e) = &user { [INFO] [stdout] 13 | | if e.to_string().contains("Session expired") && !data.is_custom { [INFO] [stdout] 14 | | info!("Trying to renew session..."); [INFO] [stdout] 15 | | let new_client = crate::auth::login( [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 12 ~ if let Err(e) = &user [INFO] [stdout] 13 ~ && e.to_string().contains("Session expired") && !data.is_custom { [INFO] [stdout] 14 | info!("Trying to renew session..."); [INFO] [stdout] ... [INFO] [stdout] 61 | return Ok(response.json(json)); [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/search.rs:14:30 [INFO] [stdout] | [INFO] [stdout] 14 | RATE_LIMITER.get_or_init(|| RateLimiter::default()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RateLimiter::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/search.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / pub async fn search( [INFO] [stdout] 18 | | client: &YggClient, [INFO] [stdout] 19 | | name: &str, [INFO] [stdout] 20 | | offset: Option, [INFO] [stdout] ... | [INFO] [stdout] 26 | | quote_search: bool, [INFO] [stdout] 27 | | ) -> Result, Box> { [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 manual char comparison can be written more succinctly [INFO] [stdout] --> src/search.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | .split(|c| c == '+' || c == ' ') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['+', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` 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/search.rs:156:76 [INFO] [stdout] | [INFO] [stdout] 156 | let mut url = format!("https://{domain}/engine/search?name={}", encode(&name)); [INFO] [stdout] | ^^^^^ help: change this to: `name` [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/search.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | / if let Some(category) = category { [INFO] [stdout] 161 | | if let Some((cat, sub_cat)) = get_category_pair(category) { [INFO] [stdout] 162 | | url.push_str(&format!("&category={}", cat)); [INFO] [stdout] 163 | | url.push_str(&format!("&sub_category={}", sub_cat)); [INFO] [stdout] 164 | | } [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 Some(category) = category [INFO] [stdout] 161 ~ && let Some((cat, sub_cat)) = get_category_pair(category) { [INFO] [stdout] 162 | url.push_str(&format!("&category={}", cat)); [INFO] [stdout] 163 | url.push_str(&format!("&sub_category={}", sub_cat)); [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/user.rs:128:74 [INFO] [stdout] | [INFO] [stdout] 128 | ... account.uploaded = convert_size_to_bytes(&value.trim())?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `value.trim()` [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/user.rs:130:76 [INFO] [stdout] | [INFO] [stdout] 130 | ... account.downloaded = convert_size_to_bytes(&value.trim())?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `value.trim()` [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/user.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / if let Some(img) = document.select(&img_selector).next() { [INFO] [stdout] 154 | | if let Some(src) = img.value().attr("src") { [INFO] [stdout] 155 | | account.avatar_url = src.to_string(); [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 153 ~ if let Some(img) = document.select(&img_selector).next() [INFO] [stdout] 154 ~ && let Some(src) = img.value().attr("src") { [INFO] [stdout] 155 | account.avatar_url = src.to_string(); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:160:5 [INFO] [stdout] | [INFO] [stdout] 160 | / if let Some(input) = document.select(&input_selector).next() { [INFO] [stdout] 161 | | if let Some(value) = input.value().attr("value") { [INFO] [stdout] 162 | | account.email = value.to_string(); [INFO] [stdout] 163 | | } [INFO] [stdout] 164 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 Some(input) = document.select(&input_selector).next() [INFO] [stdout] 161 ~ && let Some(value) = input.value().attr("value") { [INFO] [stdout] 162 | account.email = value.to_string(); [INFO] [stdout] 163 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | / if let Some(input) = document.select(&age_input_selector).next() { [INFO] [stdout] 168 | | if let Some(value) = input.value().attr("value") { [INFO] [stdout] 169 | | let age: u16 = value.parse().unwrap_or(0); [INFO] [stdout] 170 | | if age > 0 { [INFO] [stdout] ... | [INFO] [stdout] 174 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 ~ if let Some(input) = document.select(&age_input_selector).next() [INFO] [stdout] 168 ~ && let Some(value) = input.value().attr("value") { [INFO] [stdout] 169 | let age: u16 = value.parse().unwrap_or(0); [INFO] [stdout] ... [INFO] [stdout] 172 | } [INFO] [stdout] 173 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/user.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / if let Some(input) = document.select(&gender_input_selector).next() { [INFO] [stdout] 178 | | if let Some(value) = input.value().attr("value") { [INFO] [stdout] 179 | | account.gender = Some(value.to_string()); [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 177 ~ if let Some(input) = document.select(&gender_input_selector).next() [INFO] [stdout] 178 ~ && let Some(value) = input.value().attr("value") { [INFO] [stdout] 179 | account.gender = Some(value.to_string()); [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/user.rs:203:31 [INFO] [stdout] | [INFO] [stdout] 203 | let number_part = &size_str[..size_str.len() - unit.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/user.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | if size_str.ends_with(unit) { [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_suffix` method [INFO] [stdout] | [INFO] [stdout] 202 ~ if let Some(number_part) = size_str.strip_suffix(unit) { [INFO] [stdout] 203 ~ let number: f64 = number_part.replace(",", ".").trim().parse()?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/user.rs:226:13 [INFO] [stdout] | [INFO] [stdout] 226 | let mut domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/user.rs:239:10 [INFO] [stdout] | [INFO] [stdout] 239 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] 240 | [INFO] [stdout] 241 | let account = get_account(&client).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ygg_client.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / if html.trim_start().starts_with('<') { [INFO] [stdout] 37 | | if let Some(pre_start) = html.find("') { [INFO] [stdout] 39 | | let content_start = pre_start + gt_pos + 1; [INFO] [stdout] ... | [INFO] [stdout] 45 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 36 ~ if html.trim_start().starts_with('<') [INFO] [stdout] 37 ~ && let Some(pre_start) = html.find("') { [INFO] [stdout] ... [INFO] [stdout] 43 | } [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ygg_client.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | / if let Some(pre_start) = html.find("') { [INFO] [stdout] 39 | | let content_start = pre_start + gt_pos + 1; [INFO] [stdout] 40 | | if let Some(pre_end) = html[content_start..].find("") { [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 37 ~ if let Some(pre_start) = html.find("') { [INFO] [stdout] 39 | let content_start = pre_start + gt_pos + 1; [INFO] [stdout] ... [INFO] [stdout] 42 | } [INFO] [stdout] 43 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/main.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | let mut domain_lock = DOMAIN.lock().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/main.rs:132:6 [INFO] [stdout] | [INFO] [stdout] 132 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 135 | let account = user::get_account(&client).await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | if let Err(e) = init_categories(&client).await { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 164 | .await?; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 01s [INFO] running `Command { std: "docker" "inspect" "2a6f9783af931679f63b5477ba70911fb38e5d037390fe2af923ba7b603d3b1a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a6f9783af931679f63b5477ba70911fb38e5d037390fe2af923ba7b603d3b1a", kill_on_drop: false }` [INFO] [stdout] 2a6f9783af931679f63b5477ba70911fb38e5d037390fe2af923ba7b603d3b1a