[INFO] cloning repository https://github.com/0xlearner/data-pipeline [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/0xlearner/data-pipeline" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0xlearner%2Fdata-pipeline", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0xlearner%2Fdata-pipeline'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] faf76e02d96d0b1891b201fa163b3d9c802cfdb8 [INFO] linting 0xlearner/data-pipeline against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0xlearner%2Fdata-pipeline" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/0xlearner/data-pipeline [INFO] finished tweaking git repo https://github.com/0xlearner/data-pipeline [INFO] tweaked toml for git repo https://github.com/0xlearner/data-pipeline written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/0xlearner/data-pipeline 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/0xlearner/data-pipeline already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded typed-builder v0.21.2 [INFO] [stderr] Downloaded webpki-root-certs v0.26.11 [INFO] [stderr] Downloaded serde_stacker v0.1.14 [INFO] [stderr] Downloaded wasm-bindgen-futures v0.4.51 [INFO] [stderr] Downloaded debug_unsafe v0.1.3 [INFO] [stderr] Downloaded serde v1.0.225 [INFO] [stderr] Downloaded phf_shared v0.12.1 [INFO] [stderr] Downloaded aws-creds v0.37.0 [INFO] [stderr] Downloaded polars-dtype v0.51.0 [INFO] [stderr] Downloaded polars-error v0.51.0 [INFO] [stderr] Downloaded polars-schema v0.51.0 [INFO] [stderr] Downloaded pest_meta v2.8.2 [INFO] [stderr] Downloaded serde-untagged v0.1.9 [INFO] [stderr] Downloaded erased-serde v0.4.8 [INFO] [stderr] Downloaded clap_derive v4.5.47 [INFO] [stderr] Downloaded anyhow v1.0.99 [INFO] [stderr] Downloaded clap v4.5.48 [INFO] [stderr] Downloaded clap_builder v4.5.48 [INFO] [stderr] Downloaded pest v2.8.2 [INFO] [stderr] Downloaded skiplist v0.6.0 [INFO] [stderr] Downloaded polars-ops v0.51.0 [INFO] [stderr] Downloaded polars-io v0.51.0 [INFO] [stderr] Downloaded polars-parquet v0.51.0 [INFO] [stderr] Downloaded quick-xml v0.38.3 [INFO] [stderr] Downloaded polars-stream v0.51.0 [INFO] [stderr] Downloaded polars-arrow v0.51.0 [INFO] [stderr] Downloaded object_store v0.12.3 [INFO] [stderr] Downloaded webpki-roots v1.0.2 [INFO] [stderr] Downloaded wreq v5.3.0 [INFO] [stderr] Downloaded smartcore v0.3.2 [INFO] [stderr] Downloaded quick-xml v0.32.0 [INFO] [stderr] Downloaded http2 v0.4.21 [INFO] [stderr] Downloaded polars-plan v0.51.0 [INFO] [stderr] Downloaded polars-core v0.51.0 [INFO] [stderr] Downloaded zlib-rs v0.5.2 [INFO] [stderr] Downloaded boring2 v4.15.15 [INFO] [stderr] Downloaded simd-json v0.15.1 [INFO] [stderr] Downloaded reqwest v0.12.23 [INFO] [stderr] Downloaded winnow v0.7.13 [INFO] [stderr] Downloaded time v0.3.43 [INFO] [stderr] Downloaded polars v0.51.0 [INFO] [stderr] Downloaded raw-cpuid v11.6.0 [INFO] [stderr] Downloaded rxml v0.9.1 [INFO] [stderr] Downloaded async-compression v0.4.30 [INFO] [stderr] Downloaded polars-compute v0.51.0 [INFO] [stderr] Downloaded polars-expr v0.51.0 [INFO] [stderr] Downloaded polars-lazy v0.51.0 [INFO] [stderr] Downloaded polars-sql v0.51.0 [INFO] [stderr] Downloaded argminmax v0.6.3 [INFO] [stderr] Downloaded bincode v2.0.1 [INFO] [stderr] Downloaded polars-arrow-format v0.2.1 [INFO] [stderr] Downloaded polars-utils v0.51.0 [INFO] [stderr] Downloaded rust-s3 v0.35.1 [INFO] [stderr] Downloaded chrono-tz v0.10.4 [INFO] [stderr] Downloaded html5ever v0.27.0 [INFO] [stderr] Downloaded toml v0.9.6 [INFO] [stderr] Downloaded uuid v1.18.1 [INFO] [stderr] Downloaded pest_generator v2.8.2 [INFO] [stderr] Downloaded pest_derive v2.8.2 [INFO] [stderr] Downloaded yaml-rust2 v0.10.4 [INFO] [stderr] Downloaded polars-mem-engine v0.51.0 [INFO] [stderr] Downloaded rand_distr v0.5.1 [INFO] [stderr] Downloaded ethnum v1.5.2 [INFO] [stderr] Downloaded polars-time v0.51.0 [INFO] [stderr] Downloaded bytemuck v1.23.2 [INFO] [stderr] Downloaded attohttpc v0.28.5 [INFO] [stderr] Downloaded toml_parser v1.0.2 [INFO] [stderr] Downloaded toml_writer v1.0.2 [INFO] [stderr] Downloaded compression-codecs v0.4.30 [INFO] [stderr] Downloaded config v0.15.16 [INFO] [stderr] Downloaded litrs v0.4.2 [INFO] [stderr] Downloaded halfbrown v0.3.0 [INFO] [stderr] Downloaded value-trait v0.11.0 [INFO] [stderr] Downloaded virtue v0.0.18 [INFO] [stderr] Downloaded bytemuck_derive v1.10.1 [INFO] [stderr] Downloaded memmap2 v0.9.8 [INFO] [stderr] Downloaded windows-result v0.4.0 [INFO] [stderr] Downloaded windows-core v0.62.0 [INFO] [stderr] Downloaded thiserror-impl v2.0.16 [INFO] [stderr] Downloaded scraper v0.20.0 [INFO] [stderr] Downloaded toml_datetime v0.7.1 [INFO] [stderr] Downloaded libz-rs-sys v0.5.2 [INFO] [stderr] Downloaded tokio-boring2 v4.15.15 [INFO] [stderr] Downloaded redox_syscall v0.5.17 [INFO] [stderr] Downloaded fs4 v0.13.1 [INFO] [stderr] Downloaded boxcar v0.2.14 [INFO] [stderr] Downloaded polars-row v0.51.0 [INFO] [stderr] Downloaded atoi_simd v0.16.1 [INFO] [stderr] Downloaded phf v0.12.1 [INFO] [stderr] Downloaded polars-json v0.51.0 [INFO] [stderr] Downloaded thiserror v2.0.16 [INFO] [stderr] Downloaded planus v1.1.1 [INFO] [stderr] Downloaded deranged v0.5.3 [INFO] [stderr] Downloaded markup5ever v0.12.1 [INFO] [stderr] Downloaded serde_spanned v1.0.1 [INFO] [stderr] Downloaded bincode_derive v2.0.1 [INFO] [stderr] Downloaded unty v0.0.4 [INFO] [stderr] Downloaded windows-strings v0.5.0 [INFO] [stderr] Downloaded serde_core v1.0.225 [INFO] [stderr] Downloaded serde_derive v1.0.225 [INFO] [stderr] Downloaded wreq-util v2.2.6 [INFO] [stderr] Downloaded rust-ini v0.21.3 [INFO] [stderr] Downloaded maybe-async v0.2.10 [INFO] [stderr] Downloaded minidom v0.15.2 [INFO] [stderr] Downloaded compression-core v0.4.29 [INFO] [stderr] Downloaded rxml_validation v0.9.1 [INFO] [stderr] Downloaded array-init-cursor v0.2.1 [INFO] [stderr] Downloaded aws-region v0.25.5 [INFO] [stderr] Downloaded typed-builder-macro v0.21.2 [INFO] [stderr] Downloaded webpki-root-certs v1.0.2 [INFO] [stderr] Downloaded boring-sys2 v4.15.15 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] dc0722ab099ab538f7cb74511157022a2bd43bd35e5f1fbc6765534d02360cf0 [INFO] running `Command { std: "docker" "start" "-a" "dc0722ab099ab538f7cb74511157022a2bd43bd35e5f1fbc6765534d02360cf0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dc0722ab099ab538f7cb74511157022a2bd43bd35e5f1fbc6765534d02360cf0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dc0722ab099ab538f7cb74511157022a2bd43bd35e5f1fbc6765534d02360cf0", kill_on_drop: false }` [INFO] [stdout] dc0722ab099ab538f7cb74511157022a2bd43bd35e5f1fbc6765534d02360cf0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] f965037acf1b4f247585690fbc54d84007b08f95bf05334469e5e9869e6bdb0a [INFO] running `Command { std: "docker" "start" "-a" "f965037acf1b4f247585690fbc54d84007b08f95bf05334469e5e9869e6bdb0a", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.19 [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Compiling serde_core v1.0.225 [INFO] [stderr] Compiling serde v1.0.225 [INFO] [stderr] Checking cfg-if v1.0.3 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling find-msvc-tools v0.1.1 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Compiling zerocopy v0.8.27 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking futures-io v0.3.31 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking allocator-api2 v0.2.21 [INFO] [stderr] Checking futures-task v0.3.31 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Checking tracing-core v0.1.34 [INFO] [stderr] Compiling thiserror v2.0.16 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Compiling rustls v0.23.31 [INFO] [stderr] Checking siphasher v1.0.1 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Checking zlib-rs v0.5.2 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling typenum v1.18.0 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking iana-time-zone v0.1.64 [INFO] [stderr] Checking rustls-native-certs v0.8.1 [INFO] [stderr] Compiling paste v1.0.15 [INFO] [stderr] Compiling rustversion v1.0.22 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Checking array-init-cursor v0.2.1 [INFO] [stderr] Checking regex-syntax v0.8.6 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Compiling slotmap v1.0.7 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking socket2 v0.6.0 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking humantime v2.3.0 [INFO] [stderr] Checking simdutf8 v0.1.5 [INFO] [stderr] Compiling virtue v0.0.18 [INFO] [stderr] Compiling cc v1.2.37 [INFO] [stderr] Checking libz-rs-sys v0.5.2 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Compiling polars-utils v0.51.0 [INFO] [stderr] Checking unty v0.0.4 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Checking memmap2 v0.9.8 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking phf_shared v0.12.1 [INFO] [stderr] Compiling polars-schema v0.51.0 [INFO] [stderr] Compiling chrono-tz v0.10.4 [INFO] [stderr] Compiling polars-arrow v0.51.0 [INFO] [stderr] Checking alloc-no-stdlib v2.0.4 [INFO] [stderr] Checking ethnum v1.5.2 [INFO] [stderr] Checking phf v0.12.1 [INFO] [stderr] Checking alloc-stdlib v0.2.2 [INFO] [stderr] Compiling bincode_derive v2.0.1 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Checking streaming-iterator v0.1.9 [INFO] [stderr] Checking brotli-decompressor v5.0.0 [INFO] [stderr] Compiling polars-compute v0.51.0 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking debug_unsafe v0.1.3 [INFO] [stderr] Checking rmp v0.8.14 [INFO] [stderr] Checking atoi_simd v0.16.1 [INFO] [stderr] Checking strength_reduce v0.2.4 [INFO] [stderr] Checking fast-float2 v0.2.3 [INFO] [stderr] Compiling litrs v0.4.2 [INFO] [stderr] Checking unicode-width v0.2.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking regex-automata v0.4.10 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking boxcar v0.2.14 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling phf_shared v0.11.3 [INFO] [stderr] Compiling polars-core v0.51.0 [INFO] [stderr] Compiling crunchy v0.2.4 [INFO] [stderr] Compiling ref-cast v1.0.24 [INFO] [stderr] Checking brotli v8.0.2 [INFO] [stderr] Compiling document-features v0.2.11 [INFO] [stderr] Checking float-cmp v0.10.0 [INFO] [stderr] Compiling polars-ops v0.51.0 [INFO] [stderr] Compiling minimal-lexical v0.2.1 [INFO] [stderr] Checking xxhash-rust v0.8.15 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Checking fallible-streaming-iterator v0.1.9 [INFO] [stderr] Compiling snap v1.1.1 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Checking argminmax v0.6.3 [INFO] [stderr] Compiling libloading v0.8.8 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Checking rand_distr v0.5.1 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling psm v0.1.26 [INFO] [stderr] Compiling stacker v0.1.21 [INFO] [stderr] Compiling lz4-sys v1.11.1+lz4-1.10.0 [INFO] [stderr] Compiling blake3 v1.8.2 [INFO] [stderr] Compiling cpufeatures v0.2.17 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling crypto-common v0.1.6 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Checking home v0.5.11 [INFO] [stderr] Compiling bindgen v0.72.1 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling itertools v0.13.0 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Checking serde_stacker v0.1.14 [INFO] [stderr] Checking streaming-decompression v0.1.2 [INFO] [stderr] Compiling rustc-hash v2.1.1 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Compiling bitflags v2.9.4 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Compiling polars-plan v0.51.0 [INFO] [stderr] Checking regex v1.11.2 [INFO] [stderr] Compiling cmake v0.1.54 [INFO] [stderr] Compiling fslock v0.2.1 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Compiling fs_extra v1.3.0 [INFO] [stderr] Checking const-random v0.1.18 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling phf_shared v0.10.0 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Checking parking v2.2.1 [INFO] [stderr] Compiling ucd-trie v0.1.7 [INFO] [stderr] Compiling phf_generator v0.10.0 [INFO] [stderr] Checking dlv-list v0.5.2 [INFO] [stderr] Compiling string_cache_codegen v0.5.4 [INFO] [stderr] Compiling phf_codegen v0.11.3 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling smartstring v1.0.1 [INFO] [stderr] Checking event-listener v5.4.1 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking foreign-types-shared v0.3.1 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling typeid v1.0.3 [INFO] [stderr] Checking mac v0.1.1 [INFO] [stderr] Checking precomputed-hash v0.1.1 [INFO] [stderr] Compiling phf_codegen v0.10.0 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Checking webpki-roots v1.0.2 [INFO] [stderr] Checking futf v0.1.5 [INFO] [stderr] Compiling markup5ever v0.12.1 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling polars-stream v0.51.0 [INFO] [stderr] Compiling num-conv v0.1.0 [INFO] [stderr] Compiling erased-serde v0.4.8 [INFO] [stderr] Checking compression-core v0.4.29 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Checking dtoa v1.0.10 [INFO] [stderr] Checking utf-8 v0.7.6 [INFO] [stderr] Checking powerfmt v0.2.0 [INFO] [stderr] Checking dtoa-short v0.3.5 [INFO] [stderr] Checking tendril v0.4.3 [INFO] [stderr] Checking ordered-multimap v0.7.3 [INFO] [stderr] Compiling time-macros v0.2.24 [INFO] [stderr] Compiling selectors v0.25.0 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Checking webpki-roots v0.26.11 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking rust-ini v0.21.3 [INFO] [stderr] Compiling matrixmultiply v0.3.10 [INFO] [stderr] Checking webpki-root-certs v1.0.2 [INFO] [stderr] Checking crossbeam-queue v0.3.12 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Compiling polars-lazy v0.51.0 [INFO] [stderr] Checking winnow v0.7.13 [INFO] [stderr] Checking rxml_validation v0.9.1 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking anstyle-query v1.1.4 [INFO] [stderr] Checking httpdate v1.0.3 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Compiling serde_derive v1.0.225 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling thiserror-impl v2.0.16 [INFO] [stderr] Compiling tracing-attributes v0.1.30 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Compiling bytemuck_derive v1.10.1 [INFO] [stderr] Compiling strum_macros v0.27.2 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling ref-cast-impl v1.0.24 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Compiling recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Checking recursive v0.1.1 [INFO] [stderr] Compiling foreign-types-macros v0.2.3 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking skiplist v0.6.0 [INFO] [stderr] Compiling pest v2.8.2 [INFO] [stderr] Checking async-stream v0.3.6 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking rustls-webpki v0.103.6 [INFO] [stderr] Checking foreign-types v0.5.0 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Compiling typed-builder-macro v0.21.2 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling html5ever v0.27.0 [INFO] [stderr] Checking anstream v0.6.20 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking bytemuck v1.23.2 [INFO] [stderr] Checking cssparser v0.31.2 [INFO] [stderr] Compiling pest_meta v2.8.2 [INFO] [stderr] Checking toml_parser v1.0.2 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking linked_hash_set v0.1.5 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Checking webpki-root-certs v0.26.11 [INFO] [stderr] Compiling pest_generator v2.8.2 [INFO] [stderr] Checking phf v0.10.1 [INFO] [stderr] Checking rustls-pemfile v1.0.4 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking serde_spanned v1.0.1 [INFO] [stderr] Checking toml_datetime v0.7.1 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.3 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking servo_arc v0.3.0 [INFO] [stderr] Compiling polars v0.51.0 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking lru v0.13.0 [INFO] [stderr] Checking arraydeque v0.5.1 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Compiling anyhow v1.0.99 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking antidote v1.0.0 [INFO] [stderr] Checking arc-swap v1.7.1 [INFO] [stderr] Checking toml_writer v1.0.2 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking clap_builder v4.5.48 [INFO] [stderr] Checking toml v0.9.6 [INFO] [stderr] Checking serde-untagged v0.1.9 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking typed-builder v0.21.2 [INFO] [stderr] Checking polars-parquet-format v0.1.0 [INFO] [stderr] Checking rustls-native-certs v0.6.3 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking aws-region v0.25.5 [INFO] [stderr] Compiling clap_derive v4.5.47 [INFO] [stderr] Compiling maybe-async v0.2.10 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking bytes v1.10.1 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking quick-xml v0.38.3 [INFO] [stderr] Checking raw-cpuid v11.6.0 [INFO] [stderr] Checking compact_str v0.9.0 [INFO] [stderr] Checking indexmap v2.11.3 [INFO] [stderr] Checking tokio v1.47.1 [INFO] [stderr] Checking http v1.3.1 [INFO] [stderr] Checking planus v1.1.1 [INFO] [stderr] Checking bincode v2.0.1 [INFO] [stderr] Checking uuid v1.18.1 [INFO] [stderr] Checking rmp-serde v1.3.0 [INFO] [stderr] Checking polars-arrow-format v0.2.1 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking halfbrown v0.3.0 [INFO] [stderr] Checking now v0.1.3 [INFO] [stderr] Compiling boring-sys2 v4.15.15 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking deranged v0.5.3 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Checking value-trait v0.11.0 [INFO] [stderr] Checking rxml v0.9.1 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking hashlink v0.10.0 [INFO] [stderr] Checking simd-json v0.15.1 [INFO] [stderr] Checking attohttpc v0.28.5 [INFO] [stderr] Compiling pest_derive v2.8.2 [INFO] [stderr] Checking quick-xml v0.32.0 [INFO] [stderr] Checking minidom v0.15.2 [INFO] [stderr] Checking yaml-rust2 v0.10.4 [INFO] [stderr] Checking json5 v0.4.1 [INFO] [stderr] Checking ron v0.8.1 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking convert_case v0.6.0 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking nu-ansi-term v0.50.1 [INFO] [stderr] Checking md5 v0.7.0 [INFO] [stderr] Checking pathdiff v0.2.3 [INFO] [stderr] Checking ego-tree v0.6.3 [INFO] [stderr] Checking tracing-subscriber v0.3.20 [INFO] [stderr] Checking smartcore v0.3.2 [INFO] [stderr] Checking time v0.3.43 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking fs4 v0.13.1 [INFO] [stderr] Checking config v0.15.16 [INFO] [stderr] Checking clap v4.5.48 [INFO] [stderr] Checking ndarray v0.16.1 [INFO] [stderr] Checking scraper v0.20.0 [INFO] [stderr] Checking dotenv v0.15.0 [INFO] [stderr] Checking comfy-table v7.2.1 [INFO] [stderr] Checking aws-creds v0.37.0 [INFO] [stderr] Checking tokio-util v0.7.16 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-rustls v0.26.2 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking tokio-stream v0.1.17 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking h2 v0.4.12 [INFO] [stderr] Checking http2 v0.4.21 [INFO] [stderr] Checking compression-codecs v0.4.30 [INFO] [stderr] Checking async-compression v0.4.30 [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking hyper2 v1.5.5 [INFO] [stderr] Checking rust-s3 v0.35.1 [INFO] [stderr] Checking hyper v1.7.0 [INFO] [stderr] Checking lz4 v1.28.1 [INFO] [stderr] Checking hyper-util v0.1.17 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.12.23 [INFO] [stderr] Checking object_store v0.12.3 [INFO] [stderr] Checking polars-error v0.51.0 [INFO] [stderr] Checking polars-dtype v0.51.0 [INFO] [stderr] Checking boring2 v4.15.15 [INFO] [stderr] Checking polars-row v0.51.0 [INFO] [stderr] Checking polars-json v0.51.0 [INFO] [stderr] Checking polars-parquet v0.51.0 [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 polars-time v0.51.0 [INFO] [stderr] Checking polars-io v0.51.0 [INFO] [stderr] Checking polars-expr v0.51.0 [INFO] [stderr] Checking polars-mem-engine v0.51.0 [INFO] [stderr] Checking data-pipeline v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/processor/json_flattener.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | / /// This is more memory efficient for large datasets [INFO] [stdout] 90 | | [INFO] [stdout] | |_^ [INFO] [stdout] 91 | pub fn flatten_to_dataframe_batched( [INFO] [stdout] | ----------------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/processor/json_flattener.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | / /// This is more memory efficient for large datasets [INFO] [stdout] 90 | | [INFO] [stdout] | |_^ [INFO] [stdout] 91 | pub fn flatten_to_dataframe_batched( [INFO] [stdout] | ----------------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/cli/config_cli.rs:862:9 [INFO] [stdout] | [INFO] [stdout] 862 | / match new_config.to_retry_config().max_attempts { [INFO] [stdout] 863 | | 0 => { [INFO] [stdout] 864 | | return Err(anyhow!( [INFO] [stdout] 865 | | "Invalid retry configuration: max_attempts must be > 0" [INFO] [stdout] ... | [INFO] [stdout] 868 | | _ => {} [INFO] [stdout] 869 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 862 ~ if new_config.to_retry_config().max_attempts == 0 { [INFO] [stdout] 863 + return Err(anyhow!( [INFO] [stdout] 864 + "Invalid retry configuration: max_attempts must be > 0" [INFO] [stdout] 865 + )); [INFO] [stdout] 866 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/api_config.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | / if let Some(page_size) = self.request.page_size { [INFO] [stdout] 156 | | if let Some(ref limit_param) = self.pagination.limit_param { [INFO] [stdout] 157 | | body[limit_param] = serde_json::Value::Number(page_size.into()); [INFO] [stdout] 158 | | } [INFO] [stdout] 159 | | } [INFO] [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] 155 ~ if let Some(page_size) = self.request.page_size [INFO] [stdout] 156 ~ && let Some(ref limit_param) = self.pagination.limit_param { [INFO] [stdout] 157 | body[limit_param] = serde_json::Value::Number(page_size.into()); [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/concurrency_config.rs:272:1 [INFO] [stdout] | [INFO] [stdout] 272 | / impl Default for ConcurrencyConfig { [INFO] [stdout] 273 | | fn default() -> Self { [INFO] [stdout] 274 | | Self { [INFO] [stdout] 275 | | http: HttpConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 283 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub struct ConcurrencyConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/concurrency_config.rs:327:1 [INFO] [stdout] | [INFO] [stdout] 327 | / impl Default for RateLimitStrategy { [INFO] [stdout] 328 | | fn default() -> Self { [INFO] [stdout] 329 | | Self::TokenBucket [INFO] [stdout] 330 | | } [INFO] [stdout] 331 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 106 + #[derive(Default)] [INFO] [stdout] 107 | pub enum RateLimitStrategy { [INFO] [stdout] 108 | /// Token bucket algorithm (default) [INFO] [stdout] 109 ~ #[default] [INFO] [stdout] 110 ~ TokenBucket, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/concurrency_config.rs:344:1 [INFO] [stdout] | [INFO] [stdout] 344 | / impl Default for EmulationStrategyConfig { [INFO] [stdout] 345 | | fn default() -> Self { [INFO] [stdout] 346 | | Self::ModernBrowsers [INFO] [stdout] 347 | | } [INFO] [stdout] 348 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 147 + #[derive(Default)] [INFO] [stdout] 148 | pub enum EmulationStrategyConfig { [INFO] [stdout] 149 | /// Use a fixed browser emulation [INFO] [stdout] ... [INFO] [stdout] 155 | /// Use modern browsers only [INFO] [stdout] 156 ~ #[default] [INFO] [stdout] 157 ~ ModernBrowsers, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | / if let Some(category_name) = [INFO] [stdout] 40 | | category_product.get("name").and_then(|n| n.as_str()) [INFO] [stdout] 41 | | { [INFO] [stdout] 42 | | if let Some(items) = [INFO] [stdout] ... | [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 40 ~ category_product.get("name").and_then(|n| n.as_str()) [INFO] [stdout] 41 ~ && let Some(items) = [INFO] [stdout] 42 | category_product.get("items").and_then(|i| i.as_array()) [INFO] [stdout] ... [INFO] [stdout] 52 | } [INFO] [stdout] 53 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / if self.config.api.name == "bazaarapp" && data.is_array() { [INFO] [stdout] 89 | | if let Value::Array(products) = data { [INFO] [stdout] 90 | | return Ok(products.clone()); [INFO] [stdout] 91 | | } [INFO] [stdout] 92 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 88 ~ if self.config.api.name == "bazaarapp" && data.is_array() [INFO] [stdout] 89 ~ && let Value::Array(products) = data { [INFO] [stdout] 90 | return Ok(products.clone()); [INFO] [stdout] 91 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Ok(products) = self.extract_by_path(data, pattern) { [INFO] [stdout] 170 | | if !products.is_empty() { [INFO] [stdout] 171 | | info!( [INFO] [stdout] 172 | | "Found {} products using pattern '{}'", [INFO] [stdout] ... | [INFO] [stdout] 178 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 169 ~ if let Ok(products) = self.extract_by_path(data, pattern) [INFO] [stdout] 170 ~ && !products.is_empty() { [INFO] [stdout] 171 | info!( [INFO] [stdout] ... [INFO] [stdout] 176 | return Ok(products); [INFO] [stdout] 177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:225:9 [INFO] [stdout] | [INFO] [stdout] 225 | / if let Some(ref total_pages_path) = self.config.response.total_pages_path { [INFO] [stdout] 226 | | if let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) { [INFO] [stdout] 227 | | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | | return current_page < total_pages as i32; [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 225 ~ if let Some(ref total_pages_path) = self.config.response.total_pages_path [INFO] [stdout] 226 ~ && let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) { [INFO] [stdout] 227 | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | return current_page < total_pages as i32; [INFO] [stdout] 229 | } [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:226:13 [INFO] [stdout] | [INFO] [stdout] 226 | / if let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) { [INFO] [stdout] 227 | | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | | return current_page < total_pages as i32; [INFO] [stdout] 229 | | } [INFO] [stdout] 230 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 226 ~ if let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) [INFO] [stdout] 227 ~ && let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | return current_page < total_pages as i32; [INFO] [stdout] 229 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `total_pages_values.get(0)` [INFO] [stdout] --> src/extractor/api_extractor.rs:227:44 [INFO] [stdout] | [INFO] [stdout] 227 | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `total_pages_values.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | / if let Some(total_pages) = pagination.get("totalPages") { [INFO] [stdout] 239 | | if let Some(total) = total_pages.as_i64() { [INFO] [stdout] 240 | | return current_page < total as i32; [INFO] [stdout] 241 | | } [INFO] [stdout] 242 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 238 ~ if let Some(total_pages) = pagination.get("totalPages") [INFO] [stdout] 239 ~ && let Some(total) = total_pages.as_i64() { [INFO] [stdout] 240 | return current_page < total as i32; [INFO] [stdout] 241 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/cli/config_cli.rs:862:9 [INFO] [stdout] | [INFO] [stdout] 862 | / match new_config.to_retry_config().max_attempts { [INFO] [stdout] 863 | | 0 => { [INFO] [stdout] 864 | | return Err(anyhow!( [INFO] [stdout] 865 | | "Invalid retry configuration: max_attempts must be > 0" [INFO] [stdout] ... | [INFO] [stdout] 868 | | _ => {} [INFO] [stdout] 869 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 862 ~ if new_config.to_retry_config().max_attempts == 0 { [INFO] [stdout] 863 + return Err(anyhow!( [INFO] [stdout] 864 + "Invalid retry configuration: max_attempts must be > 0" [INFO] [stdout] 865 + )); [INFO] [stdout] 866 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:385:13 [INFO] [stdout] | [INFO] [stdout] 385 | / if self.classify_product_candidate(&candidate, ml_model) { [INFO] [stdout] 386 | | if let Some(product) = [INFO] [stdout] 387 | | self.extract_product_from_candidate(&candidate, category_name, &source_url, storage_metadata) [INFO] [stdout] ... | [INFO] [stdout] 391 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if self.classify_product_candidate(&candidate, ml_model) [INFO] [stdout] 386 ~ && let Some(product) = [INFO] [stdout] 387 | self.extract_product_from_candidate(&candidate, category_name, &source_url, storage_metadata) [INFO] [stdout] 388 | { [INFO] [stdout] 389 | products.push(product); [INFO] [stdout] 390 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/extractor/html_extractor.rs:471:42 [INFO] [stdout] | [INFO] [stdout] 471 | product_id: format!("ml_{}", Uuid::new_v4().to_string()[..8].to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&Uuid::new_v4().to_string()[..8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:484:13 [INFO] [stdout] | [INFO] [stdout] 484 | / if let Ok(selector) = Selector::parse(selector_str) { [INFO] [stdout] 485 | | if let Some(element) = fragment.select(&selector).next() { [INFO] [stdout] 486 | | let text = element.text().collect::().trim().to_string(); [INFO] [stdout] 487 | | if !text.is_empty() { [INFO] [stdout] ... | [INFO] [stdout] 491 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 484 ~ if let Ok(selector) = Selector::parse(selector_str) [INFO] [stdout] 485 ~ && let Some(element) = fragment.select(&selector).next() { [INFO] [stdout] 486 | let text = element.text().collect::().trim().to_string(); [INFO] [stdout] ... [INFO] [stdout] 489 | } [INFO] [stdout] 490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ElementRef<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/extractor/html_extractor.rs:526:32 [INFO] [stdout] | [INFO] [stdout] 526 | let mut current = Some(element.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*element` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:574:9 [INFO] [stdout] | [INFO] [stdout] 574 | / if let Some(class_attr) = element.value().attr("class") { [INFO] [stdout] 575 | | if self [INFO] [stdout] 576 | | .exclusion_detector [INFO] [stdout] 577 | | .contains_excluded_keywords(class_attr) [INFO] [stdout] ... | [INFO] [stdout] 581 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 574 ~ if let Some(class_attr) = element.value().attr("class") [INFO] [stdout] 575 ~ && self [INFO] [stdout] 576 | .exclusion_detector [INFO] [stdout] ... [INFO] [stdout] 579 | return true; [INFO] [stdout] 580 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:583:9 [INFO] [stdout] | [INFO] [stdout] 583 | / if let Some(id_attr) = element.value().attr("id") { [INFO] [stdout] 584 | | if self.exclusion_detector.contains_excluded_keywords(id_attr) { [INFO] [stdout] 585 | | return true; [INFO] [stdout] 586 | | } [INFO] [stdout] 587 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 583 ~ if let Some(id_attr) = element.value().attr("id") [INFO] [stdout] 584 ~ && self.exclusion_detector.contains_excluded_keywords(id_attr) { [INFO] [stdout] 585 | return true; [INFO] [stdout] 586 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FeatureExtractor` [INFO] [stdout] --> src/extractor/html_extractor.rs:594:5 [INFO] [stdout] | [INFO] [stdout] 594 | / pub fn new() -> Self { [INFO] [stdout] 595 | | let price_patterns = vec![ [INFO] [stdout] 596 | | Regex::new(r"\$\d+\.?\d*").unwrap(), [INFO] [stdout] 597 | | Regex::new(r"Rs\.?\s*\d+").unwrap(), [INFO] [stdout] ... | [INFO] [stdout] 610 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 593 + impl Default for FeatureExtractor { [INFO] [stdout] 594 + fn default() -> Self { [INFO] [stdout] 595 + Self::new() [INFO] [stdout] 596 + } [INFO] [stdout] 597 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/config/api_config.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | / if let Some(page_size) = self.request.page_size { [INFO] [stdout] 156 | | if let Some(ref limit_param) = self.pagination.limit_param { [INFO] [stdout] 157 | | body[limit_param] = serde_json::Value::Number(page_size.into()); [INFO] [stdout] 158 | | } [INFO] [stdout] 159 | | } [INFO] [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] 155 ~ if let Some(page_size) = self.request.page_size [INFO] [stdout] 156 ~ && let Some(ref limit_param) = self.pagination.limit_param { [INFO] [stdout] 157 | body[limit_param] = serde_json::Value::Number(page_size.into()); [INFO] [stdout] 158 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fetcher/api_fetcher.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | / return Err(anyhow!( [INFO] [stdout] 110 | | "Storage mode should not extract products in fetcher. Use fetch_and_store_only() instead." [INFO] [stdout] 111 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 109 ~ Err(anyhow!( [INFO] [stdout] 110 + "Storage mode should not extract products in fetcher. Use fetch_and_store_only() instead." [INFO] [stdout] 111 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/concurrency_config.rs:272:1 [INFO] [stdout] | [INFO] [stdout] 272 | / impl Default for ConcurrencyConfig { [INFO] [stdout] 273 | | fn default() -> Self { [INFO] [stdout] 274 | | Self { [INFO] [stdout] 275 | | http: HttpConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 283 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub struct ConcurrencyConfig { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/concurrency_config.rs:327:1 [INFO] [stdout] | [INFO] [stdout] 327 | / impl Default for RateLimitStrategy { [INFO] [stdout] 328 | | fn default() -> Self { [INFO] [stdout] 329 | | Self::TokenBucket [INFO] [stdout] 330 | | } [INFO] [stdout] 331 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 106 + #[derive(Default)] [INFO] [stdout] 107 | pub enum RateLimitStrategy { [INFO] [stdout] 108 | /// Token bucket algorithm (default) [INFO] [stdout] 109 ~ #[default] [INFO] [stdout] 110 ~ TokenBucket, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config/concurrency_config.rs:344:1 [INFO] [stdout] | [INFO] [stdout] 344 | / impl Default for EmulationStrategyConfig { [INFO] [stdout] 345 | | fn default() -> Self { [INFO] [stdout] 346 | | Self::ModernBrowsers [INFO] [stdout] 347 | | } [INFO] [stdout] 348 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 147 + #[derive(Default)] [INFO] [stdout] 148 | pub enum EmulationStrategyConfig { [INFO] [stdout] 149 | /// Use a fixed browser emulation [INFO] [stdout] ... [INFO] [stdout] 155 | /// Use modern browsers only [INFO] [stdout] 156 ~ #[default] [INFO] [stdout] 157 ~ ModernBrowsers, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/fetcher/http_fetcher.rs:153:18 [INFO] [stdout] | [INFO] [stdout] 153 | .zip(results.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 153 - .zip(results.into_iter()) [INFO] [stdout] 153 + .zip(results) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Emulation` which implements the `Copy` trait [INFO] [stdout] --> src/http/client.rs:33:52 [INFO] [stdout] | [INFO] [stdout] 33 | EmulationStrategy::Fixed(emulation) => emulation.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*emulation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Emulation` which implements the `Copy` trait [INFO] [stdout] --> src/http/client.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | emulations[index].clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `emulations[index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Emulation` which implements the `Copy` trait [INFO] [stdout] --> src/http/client.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | emulations[index].clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `emulations[index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config/minio_config.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | config.endpoint = "https://minio.example.com".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `config::minio_config::MinioConfig { endpoint: "https://minio.example.com".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/config/minio_config.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | let mut config = MinioConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config/minio_config.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | config.env_access_key = Some("TEST_MINIO_ACCESS_KEY".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `config::minio_config::MinioConfig { env_access_key: Some("TEST_MINIO_ACCESS_KEY".to_string()), env_secret_key: Some("TEST_MINIO_SECRET_KEY".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/config/minio_config.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | let mut config = MinioConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/config/minio_config.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | config.endpoint = "http://localhost:9000".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `config::minio_config::MinioConfig { endpoint: "http://localhost:9000".to_string(), bucket_name: "test-integration".to_string(), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/config/minio_config.rs:237:9 [INFO] [stdout] | [INFO] [stdout] 237 | let mut config = MinioConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | / if let Some(category_name) = [INFO] [stdout] 40 | | category_product.get("name").and_then(|n| n.as_str()) [INFO] [stdout] 41 | | { [INFO] [stdout] 42 | | if let Some(items) = [INFO] [stdout] ... | [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 40 ~ category_product.get("name").and_then(|n| n.as_str()) [INFO] [stdout] 41 ~ && let Some(items) = [INFO] [stdout] 42 | category_product.get("items").and_then(|i| i.as_array()) [INFO] [stdout] ... [INFO] [stdout] 52 | } [INFO] [stdout] 53 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / if self.config.api.name == "bazaarapp" && data.is_array() { [INFO] [stdout] 89 | | if let Value::Array(products) = data { [INFO] [stdout] 90 | | return Ok(products.clone()); [INFO] [stdout] 91 | | } [INFO] [stdout] 92 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 88 ~ if self.config.api.name == "bazaarapp" && data.is_array() [INFO] [stdout] 89 ~ && let Value::Array(products) = data { [INFO] [stdout] 90 | return Ok(products.clone()); [INFO] [stdout] 91 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:169:13 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Ok(products) = self.extract_by_path(data, pattern) { [INFO] [stdout] 170 | | if !products.is_empty() { [INFO] [stdout] 171 | | info!( [INFO] [stdout] 172 | | "Found {} products using pattern '{}'", [INFO] [stdout] ... | [INFO] [stdout] 178 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 169 ~ if let Ok(products) = self.extract_by_path(data, pattern) [INFO] [stdout] 170 ~ && !products.is_empty() { [INFO] [stdout] 171 | info!( [INFO] [stdout] ... [INFO] [stdout] 176 | return Ok(products); [INFO] [stdout] 177 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:225:9 [INFO] [stdout] | [INFO] [stdout] 225 | / if let Some(ref total_pages_path) = self.config.response.total_pages_path { [INFO] [stdout] 226 | | if let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) { [INFO] [stdout] 227 | | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | | return current_page < total_pages as i32; [INFO] [stdout] ... | [INFO] [stdout] 231 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 225 ~ if let Some(ref total_pages_path) = self.config.response.total_pages_path [INFO] [stdout] 226 ~ && let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) { [INFO] [stdout] 227 | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | return current_page < total_pages as i32; [INFO] [stdout] 229 | } [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:226:13 [INFO] [stdout] | [INFO] [stdout] 226 | / if let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) { [INFO] [stdout] 227 | | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | | return current_page < total_pages as i32; [INFO] [stdout] 229 | | } [INFO] [stdout] 230 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 226 ~ if let Ok(total_pages_values) = self.extract_by_path(data, total_pages_path) [INFO] [stdout] 227 ~ && let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] 228 | return current_page < total_pages as i32; [INFO] [stdout] 229 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `total_pages_values.get(0)` [INFO] [stdout] --> src/extractor/api_extractor.rs:227:44 [INFO] [stdout] | [INFO] [stdout] 227 | if let Some(total_pages) = total_pages_values.get(0).and_then(|v| v.as_i64()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `total_pages_values.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/api_extractor.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | / if let Some(total_pages) = pagination.get("totalPages") { [INFO] [stdout] 239 | | if let Some(total) = total_pages.as_i64() { [INFO] [stdout] 240 | | return current_page < total as i32; [INFO] [stdout] 241 | | } [INFO] [stdout] 242 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 238 ~ if let Some(total_pages) = pagination.get("totalPages") [INFO] [stdout] 239 ~ && let Some(total) = total_pages.as_i64() { [INFO] [stdout] 240 | return current_page < total as i32; [INFO] [stdout] 241 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/infrastructure/logging.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn default() -> Self { [INFO] [stdout] 75 | | Self::new(LoggingConfig::default()) [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:385:13 [INFO] [stdout] | [INFO] [stdout] 385 | / if self.classify_product_candidate(&candidate, ml_model) { [INFO] [stdout] 386 | | if let Some(product) = [INFO] [stdout] 387 | | self.extract_product_from_candidate(&candidate, category_name, &source_url, storage_metadata) [INFO] [stdout] ... | [INFO] [stdout] 391 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if self.classify_product_candidate(&candidate, ml_model) [INFO] [stdout] 386 ~ && let Some(product) = [INFO] [stdout] 387 | self.extract_product_from_candidate(&candidate, category_name, &source_url, storage_metadata) [INFO] [stdout] 388 | { [INFO] [stdout] 389 | products.push(product); [INFO] [stdout] 390 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/extractor/html_extractor.rs:471:42 [INFO] [stdout] | [INFO] [stdout] 471 | product_id: format!("ml_{}", Uuid::new_v4().to_string()[..8].to_string()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&Uuid::new_v4().to_string()[..8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:484:13 [INFO] [stdout] | [INFO] [stdout] 484 | / if let Ok(selector) = Selector::parse(selector_str) { [INFO] [stdout] 485 | | if let Some(element) = fragment.select(&selector).next() { [INFO] [stdout] 486 | | let text = element.text().collect::().trim().to_string(); [INFO] [stdout] 487 | | if !text.is_empty() { [INFO] [stdout] ... | [INFO] [stdout] 491 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 484 ~ if let Ok(selector) = Selector::parse(selector_str) [INFO] [stdout] 485 ~ && let Some(element) = fragment.select(&selector).next() { [INFO] [stdout] 486 | let text = element.text().collect::().trim().to_string(); [INFO] [stdout] ... [INFO] [stdout] 489 | } [INFO] [stdout] 490 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ElementRef<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/extractor/html_extractor.rs:526:32 [INFO] [stdout] | [INFO] [stdout] 526 | let mut current = Some(element.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*element` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:574:9 [INFO] [stdout] | [INFO] [stdout] 574 | / if let Some(class_attr) = element.value().attr("class") { [INFO] [stdout] 575 | | if self [INFO] [stdout] 576 | | .exclusion_detector [INFO] [stdout] 577 | | .contains_excluded_keywords(class_attr) [INFO] [stdout] ... | [INFO] [stdout] 581 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 574 ~ if let Some(class_attr) = element.value().attr("class") [INFO] [stdout] 575 ~ && self [INFO] [stdout] 576 | .exclusion_detector [INFO] [stdout] ... [INFO] [stdout] 579 | return true; [INFO] [stdout] 580 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/extractor/html_extractor.rs:583:9 [INFO] [stdout] | [INFO] [stdout] 583 | / if let Some(id_attr) = element.value().attr("id") { [INFO] [stdout] 584 | | if self.exclusion_detector.contains_excluded_keywords(id_attr) { [INFO] [stdout] 585 | | return true; [INFO] [stdout] 586 | | } [INFO] [stdout] 587 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 583 ~ if let Some(id_attr) = element.value().attr("id") [INFO] [stdout] 584 ~ && self.exclusion_detector.contains_excluded_keywords(id_attr) { [INFO] [stdout] 585 | return true; [INFO] [stdout] 586 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FeatureExtractor` [INFO] [stdout] --> src/extractor/html_extractor.rs:594:5 [INFO] [stdout] | [INFO] [stdout] 594 | / pub fn new() -> Self { [INFO] [stdout] 595 | | let price_patterns = vec![ [INFO] [stdout] 596 | | Regex::new(r"\$\d+\.?\d*").unwrap(), [INFO] [stdout] 597 | | Regex::new(r"Rs\.?\s*\d+").unwrap(), [INFO] [stdout] ... | [INFO] [stdout] 610 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 593 + impl Default for FeatureExtractor { [INFO] [stdout] 594 + fn default() -> Self { [INFO] [stdout] 595 + Self::new() [INFO] [stdout] 596 + } [INFO] [stdout] 597 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fetcher/api_fetcher.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | / return Err(anyhow!( [INFO] [stdout] 110 | | "Storage mode should not extract products in fetcher. Use fetch_and_store_only() instead." [INFO] [stdout] 111 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 109 ~ Err(anyhow!( [INFO] [stdout] 110 + "Storage mode should not extract products in fetcher. Use fetch_and_store_only() instead." [INFO] [stdout] 111 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/monitoring/metrics.rs:142:59 [INFO] [stdout] | [INFO] [stdout] 142 | let metric_list = metrics.entry(name.to_string()).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/monitoring/metrics.rs:207:33 [INFO] [stdout] | [INFO] [stdout] 207 | for (_, metric_list) in &metrics { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 207 - for (_, metric_list) in &metrics { [INFO] [stdout] 207 + for metric_list in metrics.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/monitoring/metrics.rs:222:25 [INFO] [stdout] | [INFO] [stdout] 222 | / if metric.name.contains("response_time") { [INFO] [stdout] 223 | | response_times.push(duration.as_millis() as f64); [INFO] [stdout] 224 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 221 ~ MetricValue::Timer(duration) [INFO] [stdout] 222 ~ if metric.name.contains("response_time") => { [INFO] [stdout] 223 | response_times.push(duration.as_millis() as f64); [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/monitoring/metrics.rs:307:62 [INFO] [stdout] | [INFO] [stdout] 307 | let metric_list = metrics.entry(metric.name.clone()).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/fetcher/http_fetcher.rs:153:18 [INFO] [stdout] | [INFO] [stdout] 153 | .zip(results.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 153 - .zip(results.into_iter()) [INFO] [stdout] 153 + .zip(results) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/pipeline/unified_pipeline.rs:240:40 [INFO] [stdout] | [INFO] [stdout] 240 | html_groups.entry(key).or_insert_with(Vec::new).push(product); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Emulation` which implements the `Copy` trait [INFO] [stdout] --> src/http/client.rs:33:52 [INFO] [stdout] | [INFO] [stdout] 33 | EmulationStrategy::Fixed(emulation) => emulation.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*emulation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Emulation` which implements the `Copy` trait [INFO] [stdout] --> src/http/client.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | emulations[index].clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `emulations[index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Emulation` which implements the `Copy` trait [INFO] [stdout] --> src/http/client.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | emulations[index].clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `emulations[index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/pipeline/modular_pipeline.rs:191:48 [INFO] [stdout] | [INFO] [stdout] 191 | html_groups.entry(key).or_insert_with(Vec::new).push(product); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/processor/field_classifier.rs:167:65 [INFO] [stdout] | [INFO] [stdout] 167 | || (value.contains(".") && value.chars().filter(|c| c.is_digit(10)).count() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/field_classifier.rs:225:17 [INFO] [stdout] | [INFO] [stdout] 225 | / if let Ok(canonical_name) = self.classify_field(&col_name, &sample_values) { [INFO] [stdout] 226 | | if canonical_name != col_name { [INFO] [stdout] 227 | | let _ = df.rename(&col_name, canonical_name.into()); [INFO] [stdout] 228 | | } [INFO] [stdout] 229 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 225 ~ if let Ok(canonical_name) = self.classify_field(&col_name, &sample_values) [INFO] [stdout] 226 ~ && canonical_name != col_name { [INFO] [stdout] 227 | let _ = df.rename(&col_name, canonical_name.into()); [INFO] [stdout] 228 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `JsonFlattener` [INFO] [stdout] --> src/processor/json_flattener.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | // Set up preprocessor registry with all available preprocessors [INFO] [stdout] 26 | | let preprocessor_registry = PreprocessorRegistry::new() [INFO] [stdout] 27 | | .register(KraveMartPreprocessor::new()) [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#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for JsonFlattener { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/infrastructure/logging.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | / pub fn default() -> Self { [INFO] [stdout] 75 | | Self::new(LoggingConfig::default()) [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if let Some(is_primary) = category_item.get("isPrimaryCategory").and_then(|v| v.as_bool()) { [INFO] [stdout] 22 | | if is_primary { [INFO] [stdout] 23 | | if let Some(category_name) = category_item [INFO] [stdout] 24 | | .get("category") [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if let Some(is_primary) = category_item.get("isPrimaryCategory").and_then(|v| v.as_bool()) [INFO] [stdout] 22 ~ && is_primary { [INFO] [stdout] 23 | if let Some(category_name) = category_item [INFO] [stdout] ... [INFO] [stdout] 29 | } [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | / if is_primary { [INFO] [stdout] 23 | | if let Some(category_name) = category_item [INFO] [stdout] 24 | | .get("category") [INFO] [stdout] 25 | | .and_then(|cat| cat.get("name")) [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 22 ~ if is_primary [INFO] [stdout] 23 ~ && let Some(category_name) = category_item [INFO] [stdout] 24 | .get("category") [INFO] [stdout] ... [INFO] [stdout] 28 | return category_name.to_string(); [INFO] [stdout] 29 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | / if let Some(is_preferred) = category_item.get("isPreferred").and_then(|v| v.as_bool()) { [INFO] [stdout] 37 | | if is_preferred { [INFO] [stdout] 38 | | if let Some(category_name) = category_item [INFO] [stdout] 39 | | .get("category") [INFO] [stdout] ... | [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] 36 ~ if let Some(is_preferred) = category_item.get("isPreferred").and_then(|v| v.as_bool()) [INFO] [stdout] 37 ~ && is_preferred { [INFO] [stdout] 38 | if let Some(category_name) = category_item [INFO] [stdout] ... [INFO] [stdout] 44 | } [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:37:21 [INFO] [stdout] | [INFO] [stdout] 37 | / if is_preferred { [INFO] [stdout] 38 | | if let Some(category_name) = category_item [INFO] [stdout] 39 | | .get("category") [INFO] [stdout] 40 | | .and_then(|cat| cat.get("name")) [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] 37 ~ if is_preferred [INFO] [stdout] 38 ~ && let Some(category_name) = category_item [INFO] [stdout] 39 | .get("category") [INFO] [stdout] ... [INFO] [stdout] 43 | return category_name.to_string(); [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(first_category) = categories.first() { [INFO] [stdout] 51 | | if let Some(category_name) = first_category [INFO] [stdout] 52 | | .get("category") [INFO] [stdout] 53 | | .and_then(|cat| cat.get("name")) [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(first_category) = categories.first() [INFO] [stdout] 51 ~ && let Some(category_name) = first_category [INFO] [stdout] 52 | .get("category") [INFO] [stdout] ... [INFO] [stdout] 56 | return category_name.to_string(); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | / if !map.contains_key("sku") { [INFO] [stdout] 140 | | if let Some(id) = item.get("id").and_then(|v| v.as_u64()) { [INFO] [stdout] 141 | | map.insert("sku".to_string(), Value::String(format!("DC-{}", id))); [INFO] [stdout] 142 | | } [INFO] [stdout] 143 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 139 ~ if !map.contains_key("sku") [INFO] [stdout] 140 ~ && let Some(id) = item.get("id").and_then(|v| v.as_u64()) { [INFO] [stdout] 141 | map.insert("sku".to_string(), Value::String(format!("DC-{}", id))); [INFO] [stdout] 142 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/kravemart.rs:23:17 [INFO] [stdout] | [INFO] [stdout] 23 | / if let (Some(category_name), Some(cat_search_elastic)) = ( [INFO] [stdout] 24 | | category.get("category_name").and_then(|n| n.as_str()), [INFO] [stdout] 25 | | category.get("cat_search_elastic").and_then(|e| e.as_str()), [INFO] [stdout] 26 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 26 ~ ) [INFO] [stdout] 27 ~ && !cat_search_elastic.is_empty() && cat_search_elastic.contains(";") { [INFO] [stdout] 28 | // Found a category with ";" in cat_search_elastic - highest priority [INFO] [stdout] 29 | return category_name.to_string(); [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/kravemart.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 38 | / if let (Some(category_name), Some(cat_search_elastic)) = ( [INFO] [stdout] 39 | | category.get("category_name").and_then(|n| n.as_str()), [INFO] [stdout] 40 | | category.get("cat_search_elastic").and_then(|e| e.as_str()), [INFO] [stdout] 41 | | ) { [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] 41 ~ ) [INFO] [stdout] 42 ~ && !cat_search_elastic.is_empty() && !cat_search_elastic.contains(";") { [INFO] [stdout] 43 | non_semicolon_categories.push((category_name, cat_search_elastic)); [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/kravemart.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(first_category) = categories.first() { [INFO] [stdout] 88 | | if let Some(category_name) = first_category.get("category_name").and_then(|n| n.as_str()) { [INFO] [stdout] 89 | | return category_name.to_string(); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(first_category) = categories.first() [INFO] [stdout] 88 ~ && let Some(category_name) = first_category.get("category_name").and_then(|n| n.as_str()) { [INFO] [stdout] 89 | return category_name.to_string(); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(category) = product.get("category").and_then(|v| v.as_str()) { [INFO] [stdout] 54 | | if !category.trim().is_empty() && category.trim() != "N/A" { [INFO] [stdout] 55 | | return category.trim().to_string(); [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(category) = product.get("category").and_then(|v| v.as_str()) [INFO] [stdout] 54 ~ && !category.trim().is_empty() && category.trim() != "N/A" { [INFO] [stdout] 55 | return category.trim().to_string(); [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / if let Some(category_path) = product.get("category_path").and_then(|v| v.as_str()) { [INFO] [stdout] 60 | | if !category_path.trim().is_empty() { [INFO] [stdout] 61 | | // Extract the last part of the category path [INFO] [stdout] 62 | | let parts: Vec<&str> = category_path.split('/').collect(); [INFO] [stdout] ... | [INFO] [stdout] 69 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 59 ~ if let Some(category_path) = product.get("category_path").and_then(|v| v.as_str()) [INFO] [stdout] 60 ~ && !category_path.trim().is_empty() { [INFO] [stdout] 61 | // Extract the last part of the category path [INFO] [stdout] ... [INFO] [stdout] 67 | } [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | / if let Some(last_part) = parts.last() { [INFO] [stdout] 64 | | if !last_part.trim().is_empty() { [INFO] [stdout] 65 | | return last_part.trim().to_string(); [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 63 ~ if let Some(last_part) = parts.last() [INFO] [stdout] 64 ~ && !last_part.trim().is_empty() { [INFO] [stdout] 65 | return last_part.trim().to_string(); [INFO] [stdout] 66 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / if let Some(page_name) = product.get("page_name").and_then(|v| v.as_str()) { [INFO] [stdout] 72 | | if !page_name.trim().is_empty() { [INFO] [stdout] 73 | | return page_name.trim().to_string(); [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 71 ~ if let Some(page_name) = product.get("page_name").and_then(|v| v.as_str()) [INFO] [stdout] 72 ~ && !page_name.trim().is_empty() { [INFO] [stdout] 73 | return page_name.trim().to_string(); [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / if let Some(product_id) = product.get("product_id").and_then(|v| v.as_str()) { [INFO] [stdout] 120 | | if !product_id.trim().is_empty() { [INFO] [stdout] 121 | | return format!("NH-{}", product_id.trim()); [INFO] [stdout] 122 | | } [INFO] [stdout] 123 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 119 ~ if let Some(product_id) = product.get("product_id").and_then(|v| v.as_str()) [INFO] [stdout] 120 ~ && !product_id.trim().is_empty() { [INFO] [stdout] 121 | return format!("NH-{}", product_id.trim()); [INFO] [stdout] 122 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | / if let Some(name) = product.get("name").and_then(|v| v.as_str()) { [INFO] [stdout] 127 | | if !name.trim().is_empty() { [INFO] [stdout] 128 | | // Simple hash-like generation (in production, use proper hash) [INFO] [stdout] 129 | | let hash = name.len() % 10000; [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 126 ~ if let Some(name) = product.get("name").and_then(|v| v.as_str()) [INFO] [stdout] 127 ~ && !name.trim().is_empty() { [INFO] [stdout] 128 | // Simple hash-like generation (in production, use proper hash) [INFO] [stdout] 129 | let hash = name.len() % 10000; [INFO] [stdout] 130 | return format!("NH-{}", hash); [INFO] [stdout] 131 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:169:9 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Some(source_type) = item.get("source_type").and_then(|v| v.as_str()) { [INFO] [stdout] 170 | | if source_type == "html" { [INFO] [stdout] 171 | | // Check if it's from Naheed by looking at URL or other identifiers [INFO] [stdout] 172 | | if let Some(url) = item.get("url").and_then(|v| v.as_str()) { [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 169 ~ if let Some(source_type) = item.get("source_type").and_then(|v| v.as_str()) [INFO] [stdout] 170 ~ && source_type == "html" { [INFO] [stdout] 171 | // Check if it's from Naheed by looking at URL or other identifiers [INFO] [stdout] ... [INFO] [stdout] 178 | return true; // For now, process all HTML data [INFO] [stdout] 179 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/pandamart.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | / if let (Some(key), Some(value)) = ( [INFO] [stdout] 20 | | attr.get("key").and_then(|k| k.as_str()), [INFO] [stdout] 21 | | attr.get("value").and_then(|v| v.as_str()) [INFO] [stdout] 22 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 22 ~ ) [INFO] [stdout] 23 ~ && key == "sku" { [INFO] [stdout] 24 | return value.to_string(); [INFO] [stdout] 25 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/pandamart.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | / if let (Some(key), Some(value)) = ( [INFO] [stdout] 42 | | attr.get("key").and_then(|k| k.as_str()), [INFO] [stdout] 43 | | attr.get("value").and_then(|v| v.as_str()) [INFO] [stdout] 44 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ ) [INFO] [stdout] 45 ~ && (key == "baseUnit" || key == "baseContentValue") { [INFO] [stdout] 46 | return value.to_string(); [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/rule_normalizer.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Some(captures) = pattern.captures(&cleaned_name) { [INFO] [stdout] 70 | | if let Some(unit_match) = captures.get(1) { [INFO] [stdout] 71 | | unit_found = unit_match.as_str().trim().to_string(); [INFO] [stdout] 72 | | cleaned_name = pattern.replace(&cleaned_name, "").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Some(captures) = pattern.captures(&cleaned_name) [INFO] [stdout] 70 ~ && let Some(unit_match) = captures.get(1) { [INFO] [stdout] 71 | unit_found = unit_match.as_str().trim().to_string(); [INFO] [stdout] 72 | cleaned_name = pattern.replace(&cleaned_name, "").to_string(); [INFO] [stdout] 73 | break; [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/processor/rule_normalizer.rs:83:47 [INFO] [stdout] | [INFO] [stdout] 83 | ... let non_unit_desc_regex = Regex::new(r"\s*\(\s*(aalu|pyaaz|kheera|sabzi|dal|atta|masala|spice|powder|paste|sauce|pickle|jam|ho... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/processor/rule_normalizer.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | for name_opt in name_series.into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/processor/rule_normalizer.rs:89:22 [INFO] [stdout] | [INFO] [stdout] 89 | .trim() [INFO] [stdout] | ______________________^ [INFO] [stdout] 90 | | .split_whitespace() [INFO] [stdout] | |_____________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/rule_normalizer.rs:168:21 [INFO] [stdout] | [INFO] [stdout] 168 | / if let Some(captures) = re.captures(&cleaned) { [INFO] [stdout] 169 | | if let Some(number_match) = captures.get(1) { [INFO] [stdout] 170 | | return f64::from_str(number_match.as_str()).ok(); [INFO] [stdout] 171 | | } [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 168 ~ if let Some(captures) = re.captures(&cleaned) [INFO] [stdout] 169 ~ && let Some(number_match) = captures.get(1) { [INFO] [stdout] 170 | return f64::from_str(number_match.as_str()).ok(); [INFO] [stdout] 171 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/processor/rule_normalizer.rs:197:22 [INFO] [stdout] | [INFO] [stdout] 197 | .zip(cost_prices.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 197 - .zip(cost_prices.into_iter()) [INFO] [stdout] 197 + .zip(&*cost_prices) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/processor/rule_normalizer.rs:198:22 [INFO] [stdout] | [INFO] [stdout] 198 | .zip(mrps.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 198 - .zip(mrps.into_iter()) [INFO] [stdout] 198 + .zip(&*mrps) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/rule_normalizer.rs:201:21 [INFO] [stdout] | [INFO] [stdout] 201 | / if let Some(discount_val) = existing_discount { [INFO] [stdout] 202 | | if !discount_val.is_nan() { [INFO] [stdout] 203 | | return Some(discount_val); [INFO] [stdout] 204 | | } [INFO] [stdout] 205 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 201 ~ if let Some(discount_val) = existing_discount [INFO] [stdout] 202 ~ && !discount_val.is_nan() { [INFO] [stdout] 203 | return Some(discount_val); [INFO] [stdout] 204 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/processor/stages/source_transformer.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 130 | / pub fn from_str(s: &str) -> Self { [INFO] [stdout] 131 | | match s.to_lowercase().as_str() { [INFO] [stdout] 132 | | "json_api" => SourceType::JsonApi, [INFO] [stdout] 133 | | "pandamart" => SourceType::Pandamart, [INFO] [stdout] ... | [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/processor/stages/pipeline_builder.rs:197:50 [INFO] [stdout] | [INFO] [stdout] 197 | for (_index, stage) in self.stages.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 197 - for (_index, stage) in self.stages.iter().enumerate() { [INFO] [stdout] 197 + for stage in self.stages.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/html_transformer.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | / if let Some(captures) = re.captures(&cleaned) { [INFO] [stdout] 87 | | if let Some(number_match) = captures.get(1) { [INFO] [stdout] 88 | | let price: f64 = number_match.as_str().parse()?; [INFO] [stdout] 89 | | return Ok(format!("{:.2}", price)); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if let Some(captures) = re.captures(&cleaned) [INFO] [stdout] 87 ~ && let Some(number_match) = captures.get(1) { [INFO] [stdout] 88 | let price: f64 = number_match.as_str().parse()?; [INFO] [stdout] 89 | return Ok(format!("{:.2}", price)); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | / if let Some(value) = self.get_nested_value(item, path) { [INFO] [stdout] 86 | | if let Some(s) = value.as_str() { [INFO] [stdout] 87 | | if !s.trim().is_empty() { [INFO] [stdout] 88 | | return Ok(s.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 85 ~ if let Some(value) = self.get_nested_value(item, path) [INFO] [stdout] 86 ~ && let Some(s) = value.as_str() { [INFO] [stdout] 87 | if !s.trim().is_empty() { [INFO] [stdout] 88 | return Ok(s.to_string()); [INFO] [stdout] 89 | } [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | / if let Some(s) = value.as_str() { [INFO] [stdout] 87 | | if !s.trim().is_empty() { [INFO] [stdout] 88 | | return Ok(s.to_string()); [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if let Some(s) = value.as_str() [INFO] [stdout] 87 ~ && !s.trim().is_empty() { [INFO] [stdout] 88 | return Ok(s.to_string()); [INFO] [stdout] 89 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | / if let Some(price_str) = value.as_str() { [INFO] [stdout] 104 | | if let Ok(price) = price_str.parse::() { [INFO] [stdout] 105 | | return Ok(price); [INFO] [stdout] 106 | | } [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ if let Some(price_str) = value.as_str() [INFO] [stdout] 104 ~ && let Ok(price) = price_str.parse::() { [INFO] [stdout] 105 | return Ok(price); [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | / if let Some(first_attr) = attributes.get(0) { [INFO] [stdout] 130 | | if let Some(value) = first_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 131 | | return Some(value.to_string()); [INFO] [stdout] 132 | | } [INFO] [stdout] 133 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 129 ~ if let Some(first_attr) = attributes.get(0) [INFO] [stdout] 130 ~ && let Some(value) = first_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 131 | return Some(value.to_string()); [INFO] [stdout] 132 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attributes.get(0)` [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:129:39 [INFO] [stdout] | [INFO] [stdout] 129 | if let Some(first_attr) = attributes.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `attributes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | / if let Some(units_attr) = attributes.get(2) { [INFO] [stdout] 143 | | if let Some(value) = units_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 144 | | return Some(value.to_string()); [INFO] [stdout] 145 | | } [INFO] [stdout] 146 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 142 ~ if let Some(units_attr) = attributes.get(2) [INFO] [stdout] 143 ~ && let Some(value) = units_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 144 | return Some(value.to_string()); [INFO] [stdout] 145 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:76:28 [INFO] [stdout] | [INFO] [stdout] 76 | if !item.get(field_name).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item.get(field_name).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / if let Some(required_fields) = self.config.source_config.get("required_fields") { [INFO] [stdout] 73 | | if let Some(fields_array) = required_fields.as_array() { [INFO] [stdout] 74 | | for field in fields_array { [INFO] [stdout] 75 | | if let Some(field_name) = field.as_str() { [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if let Some(required_fields) = self.config.source_config.get("required_fields") [INFO] [stdout] 73 ~ && let Some(fields_array) = required_fields.as_array() { [INFO] [stdout] 74 | for field in fields_array { [INFO] [stdout] ... [INFO] [stdout] 80 | } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:75:21 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(field_name) = field.as_str() { [INFO] [stdout] 76 | | if !item.get(field_name).is_some() { [INFO] [stdout] 77 | | return false; [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ if let Some(field_name) = field.as_str() [INFO] [stdout] 76 ~ && !item.get(field_name).is_some() { [INFO] [stdout] 77 | return false; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/monitoring/metrics.rs:142:59 [INFO] [stdout] | [INFO] [stdout] 142 | let metric_list = metrics.entry(name.to_string()).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/monitoring/metrics.rs:207:33 [INFO] [stdout] | [INFO] [stdout] 207 | for (_, metric_list) in &metrics { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 207 - for (_, metric_list) in &metrics { [INFO] [stdout] 207 + for metric_list in metrics.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/monitoring/metrics.rs:222:25 [INFO] [stdout] | [INFO] [stdout] 222 | / if metric.name.contains("response_time") { [INFO] [stdout] 223 | | response_times.push(duration.as_millis() as f64); [INFO] [stdout] 224 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 221 ~ MetricValue::Timer(duration) [INFO] [stdout] 222 ~ if metric.name.contains("response_time") => { [INFO] [stdout] 223 | response_times.push(duration.as_millis() as f64); [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/monitoring/metrics.rs:307:62 [INFO] [stdout] | [INFO] [stdout] 307 | let metric_list = metrics.entry(metric.name.clone()).or_insert_with(Vec::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/pipeline/unified_pipeline.rs:240:40 [INFO] [stdout] | [INFO] [stdout] 240 | html_groups.entry(key).or_insert_with(Vec::new).push(product); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/cli/app.rs:106:33 [INFO] [stdout] | [INFO] [stdout] 106 | let valid_sources = vec!["kravemart", "bazaarapp", "dealcart", "pandamart", "naheed"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["kravemart", "bazaarapp", "dealcart", "pandamart", "naheed"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/processor/stages/examples.rs:226:32 [INFO] [stdout] | [INFO] [stdout] 226 | let _naheed_products = vec![ [INFO] [stdout] | ________________________________^ [INFO] [stdout] 227 | | // Fruits page 1 [INFO] [stdout] 228 | | ScrapedProduct::new( [INFO] [stdout] 229 | | "Fresh Apples".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 255 | | ).with_storage_metadata("groceries-pets/fresh-products", "vegetables", None), [INFO] [stdout] 256 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 226 ~ let _naheed_products = [ScrapedProduct::new( [INFO] [stdout] 227 + "Fresh Apples".to_string(), [INFO] [stdout] 228 + "Rs. 250".to_string(), [INFO] [stdout] 229 + "NAHEED_001".to_string(), [INFO] [stdout] 230 + "Fruits".to_string(), [INFO] [stdout] 231 + Some("https://naheed.pk/fruits/apples".to_string()), [INFO] [stdout] 232 + "
Fresh Apples HTML
".to_string(), [INFO] [stdout] 233 + ).with_storage_metadata("groceries-pets/fresh-products", "fruits", None), [INFO] [stdout] 234 + [INFO] [stdout] 235 + // Fruits page 2 [INFO] [stdout] 236 + ScrapedProduct::new( [INFO] [stdout] 237 + "Organic Bananas".to_string(), [INFO] [stdout] 238 + "Rs. 180".to_string(), [INFO] [stdout] 239 + "NAHEED_002".to_string(), [INFO] [stdout] 240 + "Fruits".to_string(), [INFO] [stdout] 241 + Some("https://naheed.pk/fruits/bananas".to_string()), [INFO] [stdout] 242 + "
Organic Bananas HTML
".to_string(), [INFO] [stdout] 243 + ).with_storage_metadata("groceries-pets/fresh-products", "fruits", Some(2)), [INFO] [stdout] 244 + [INFO] [stdout] 245 + // Vegetables page 1 [INFO] [stdout] 246 + ScrapedProduct::new( [INFO] [stdout] 247 + "Fresh Tomatoes".to_string(), [INFO] [stdout] 248 + "Rs. 120".to_string(), [INFO] [stdout] 249 + "NAHEED_003".to_string(), [INFO] [stdout] 250 + "Vegetables".to_string(), [INFO] [stdout] 251 + Some("https://naheed.pk/vegetables/tomatoes".to_string()), [INFO] [stdout] 252 + "
Fresh Tomatoes HTML
".to_string(), [INFO] [stdout] 253 ~ ).with_storage_metadata("groceries-pets/fresh-products", "vegetables", None)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/pipeline/modular_pipeline.rs:191:48 [INFO] [stdout] | [INFO] [stdout] 191 | html_groups.entry(key).or_insert_with(Vec::new).push(product); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/processor/field_classifier.rs:167:65 [INFO] [stdout] | [INFO] [stdout] 167 | || (value.contains(".") && value.chars().filter(|c| c.is_digit(10)).count() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/field_classifier.rs:225:17 [INFO] [stdout] | [INFO] [stdout] 225 | / if let Ok(canonical_name) = self.classify_field(&col_name, &sample_values) { [INFO] [stdout] 226 | | if canonical_name != col_name { [INFO] [stdout] 227 | | let _ = df.rename(&col_name, canonical_name.into()); [INFO] [stdout] 228 | | } [INFO] [stdout] 229 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 225 ~ if let Ok(canonical_name) = self.classify_field(&col_name, &sample_values) [INFO] [stdout] 226 ~ && canonical_name != col_name { [INFO] [stdout] 227 | let _ = df.rename(&col_name, canonical_name.into()); [INFO] [stdout] 228 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `JsonFlattener` [INFO] [stdout] --> src/processor/json_flattener.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | // Set up preprocessor registry with all available preprocessors [INFO] [stdout] 26 | | let preprocessor_registry = PreprocessorRegistry::new() [INFO] [stdout] 27 | | .register(KraveMartPreprocessor::new()) [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#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for JsonFlattener { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | / if let Some(is_primary) = category_item.get("isPrimaryCategory").and_then(|v| v.as_bool()) { [INFO] [stdout] 22 | | if is_primary { [INFO] [stdout] 23 | | if let Some(category_name) = category_item [INFO] [stdout] 24 | | .get("category") [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if let Some(is_primary) = category_item.get("isPrimaryCategory").and_then(|v| v.as_bool()) [INFO] [stdout] 22 ~ && is_primary { [INFO] [stdout] 23 | if let Some(category_name) = category_item [INFO] [stdout] ... [INFO] [stdout] 29 | } [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | / if is_primary { [INFO] [stdout] 23 | | if let Some(category_name) = category_item [INFO] [stdout] 24 | | .get("category") [INFO] [stdout] 25 | | .and_then(|cat| cat.get("name")) [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 22 ~ if is_primary [INFO] [stdout] 23 ~ && let Some(category_name) = category_item [INFO] [stdout] 24 | .get("category") [INFO] [stdout] ... [INFO] [stdout] 28 | return category_name.to_string(); [INFO] [stdout] 29 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | / if let Some(is_preferred) = category_item.get("isPreferred").and_then(|v| v.as_bool()) { [INFO] [stdout] 37 | | if is_preferred { [INFO] [stdout] 38 | | if let Some(category_name) = category_item [INFO] [stdout] 39 | | .get("category") [INFO] [stdout] ... | [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] 36 ~ if let Some(is_preferred) = category_item.get("isPreferred").and_then(|v| v.as_bool()) [INFO] [stdout] 37 ~ && is_preferred { [INFO] [stdout] 38 | if let Some(category_name) = category_item [INFO] [stdout] ... [INFO] [stdout] 44 | } [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:37:21 [INFO] [stdout] | [INFO] [stdout] 37 | / if is_preferred { [INFO] [stdout] 38 | | if let Some(category_name) = category_item [INFO] [stdout] 39 | | .get("category") [INFO] [stdout] 40 | | .and_then(|cat| cat.get("name")) [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] 37 ~ if is_preferred [INFO] [stdout] 38 ~ && let Some(category_name) = category_item [INFO] [stdout] 39 | .get("category") [INFO] [stdout] ... [INFO] [stdout] 43 | return category_name.to_string(); [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(first_category) = categories.first() { [INFO] [stdout] 51 | | if let Some(category_name) = first_category [INFO] [stdout] 52 | | .get("category") [INFO] [stdout] 53 | | .and_then(|cat| cat.get("name")) [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(first_category) = categories.first() [INFO] [stdout] 51 ~ && let Some(category_name) = first_category [INFO] [stdout] 52 | .get("category") [INFO] [stdout] ... [INFO] [stdout] 56 | return category_name.to_string(); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/dealcart.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | / if !map.contains_key("sku") { [INFO] [stdout] 140 | | if let Some(id) = item.get("id").and_then(|v| v.as_u64()) { [INFO] [stdout] 141 | | map.insert("sku".to_string(), Value::String(format!("DC-{}", id))); [INFO] [stdout] 142 | | } [INFO] [stdout] 143 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 139 ~ if !map.contains_key("sku") [INFO] [stdout] 140 ~ && let Some(id) = item.get("id").and_then(|v| v.as_u64()) { [INFO] [stdout] 141 | map.insert("sku".to_string(), Value::String(format!("DC-{}", id))); [INFO] [stdout] 142 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/kravemart.rs:23:17 [INFO] [stdout] | [INFO] [stdout] 23 | / if let (Some(category_name), Some(cat_search_elastic)) = ( [INFO] [stdout] 24 | | category.get("category_name").and_then(|n| n.as_str()), [INFO] [stdout] 25 | | category.get("cat_search_elastic").and_then(|e| e.as_str()), [INFO] [stdout] 26 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 26 ~ ) [INFO] [stdout] 27 ~ && !cat_search_elastic.is_empty() && cat_search_elastic.contains(";") { [INFO] [stdout] 28 | // Found a category with ";" in cat_search_elastic - highest priority [INFO] [stdout] 29 | return category_name.to_string(); [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/kravemart.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 38 | / if let (Some(category_name), Some(cat_search_elastic)) = ( [INFO] [stdout] 39 | | category.get("category_name").and_then(|n| n.as_str()), [INFO] [stdout] 40 | | category.get("cat_search_elastic").and_then(|e| e.as_str()), [INFO] [stdout] 41 | | ) { [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] 41 ~ ) [INFO] [stdout] 42 ~ && !cat_search_elastic.is_empty() && !cat_search_elastic.contains(";") { [INFO] [stdout] 43 | non_semicolon_categories.push((category_name, cat_search_elastic)); [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/kravemart.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(first_category) = categories.first() { [INFO] [stdout] 88 | | if let Some(category_name) = first_category.get("category_name").and_then(|n| n.as_str()) { [INFO] [stdout] 89 | | return category_name.to_string(); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 87 ~ if let Some(first_category) = categories.first() [INFO] [stdout] 88 ~ && let Some(category_name) = first_category.get("category_name").and_then(|n| n.as_str()) { [INFO] [stdout] 89 | return category_name.to_string(); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(category) = product.get("category").and_then(|v| v.as_str()) { [INFO] [stdout] 54 | | if !category.trim().is_empty() && category.trim() != "N/A" { [INFO] [stdout] 55 | | return category.trim().to_string(); [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(category) = product.get("category").and_then(|v| v.as_str()) [INFO] [stdout] 54 ~ && !category.trim().is_empty() && category.trim() != "N/A" { [INFO] [stdout] 55 | return category.trim().to_string(); [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / if let Some(category_path) = product.get("category_path").and_then(|v| v.as_str()) { [INFO] [stdout] 60 | | if !category_path.trim().is_empty() { [INFO] [stdout] 61 | | // Extract the last part of the category path [INFO] [stdout] 62 | | let parts: Vec<&str> = category_path.split('/').collect(); [INFO] [stdout] ... | [INFO] [stdout] 69 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 59 ~ if let Some(category_path) = product.get("category_path").and_then(|v| v.as_str()) [INFO] [stdout] 60 ~ && !category_path.trim().is_empty() { [INFO] [stdout] 61 | // Extract the last part of the category path [INFO] [stdout] ... [INFO] [stdout] 67 | } [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | / if let Some(last_part) = parts.last() { [INFO] [stdout] 64 | | if !last_part.trim().is_empty() { [INFO] [stdout] 65 | | return last_part.trim().to_string(); [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 63 ~ if let Some(last_part) = parts.last() [INFO] [stdout] 64 ~ && !last_part.trim().is_empty() { [INFO] [stdout] 65 | return last_part.trim().to_string(); [INFO] [stdout] 66 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / if let Some(page_name) = product.get("page_name").and_then(|v| v.as_str()) { [INFO] [stdout] 72 | | if !page_name.trim().is_empty() { [INFO] [stdout] 73 | | return page_name.trim().to_string(); [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 71 ~ if let Some(page_name) = product.get("page_name").and_then(|v| v.as_str()) [INFO] [stdout] 72 ~ && !page_name.trim().is_empty() { [INFO] [stdout] 73 | return page_name.trim().to_string(); [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / if let Some(product_id) = product.get("product_id").and_then(|v| v.as_str()) { [INFO] [stdout] 120 | | if !product_id.trim().is_empty() { [INFO] [stdout] 121 | | return format!("NH-{}", product_id.trim()); [INFO] [stdout] 122 | | } [INFO] [stdout] 123 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 119 ~ if let Some(product_id) = product.get("product_id").and_then(|v| v.as_str()) [INFO] [stdout] 120 ~ && !product_id.trim().is_empty() { [INFO] [stdout] 121 | return format!("NH-{}", product_id.trim()); [INFO] [stdout] 122 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | / if let Some(name) = product.get("name").and_then(|v| v.as_str()) { [INFO] [stdout] 127 | | if !name.trim().is_empty() { [INFO] [stdout] 128 | | // Simple hash-like generation (in production, use proper hash) [INFO] [stdout] 129 | | let hash = name.len() % 10000; [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 126 ~ if let Some(name) = product.get("name").and_then(|v| v.as_str()) [INFO] [stdout] 127 ~ && !name.trim().is_empty() { [INFO] [stdout] 128 | // Simple hash-like generation (in production, use proper hash) [INFO] [stdout] 129 | let hash = name.len() % 10000; [INFO] [stdout] 130 | return format!("NH-{}", hash); [INFO] [stdout] 131 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/naheed.rs:169:9 [INFO] [stdout] | [INFO] [stdout] 169 | / if let Some(source_type) = item.get("source_type").and_then(|v| v.as_str()) { [INFO] [stdout] 170 | | if source_type == "html" { [INFO] [stdout] 171 | | // Check if it's from Naheed by looking at URL or other identifiers [INFO] [stdout] 172 | | if let Some(url) = item.get("url").and_then(|v| v.as_str()) { [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 169 ~ if let Some(source_type) = item.get("source_type").and_then(|v| v.as_str()) [INFO] [stdout] 170 ~ && source_type == "html" { [INFO] [stdout] 171 | // Check if it's from Naheed by looking at URL or other identifiers [INFO] [stdout] ... [INFO] [stdout] 178 | return true; // For now, process all HTML data [INFO] [stdout] 179 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/pandamart.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | / if let (Some(key), Some(value)) = ( [INFO] [stdout] 20 | | attr.get("key").and_then(|k| k.as_str()), [INFO] [stdout] 21 | | attr.get("value").and_then(|v| v.as_str()) [INFO] [stdout] 22 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 22 ~ ) [INFO] [stdout] 23 ~ && key == "sku" { [INFO] [stdout] 24 | return value.to_string(); [INFO] [stdout] 25 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/preprocessors/pandamart.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | / if let (Some(key), Some(value)) = ( [INFO] [stdout] 42 | | attr.get("key").and_then(|k| k.as_str()), [INFO] [stdout] 43 | | attr.get("value").and_then(|v| v.as_str()) [INFO] [stdout] 44 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ ) [INFO] [stdout] 45 ~ && (key == "baseUnit" || key == "baseContentValue") { [INFO] [stdout] 46 | return value.to_string(); [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/rule_normalizer.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | / if let Some(captures) = pattern.captures(&cleaned_name) { [INFO] [stdout] 70 | | if let Some(unit_match) = captures.get(1) { [INFO] [stdout] 71 | | unit_found = unit_match.as_str().trim().to_string(); [INFO] [stdout] 72 | | cleaned_name = pattern.replace(&cleaned_name, "").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 69 ~ if let Some(captures) = pattern.captures(&cleaned_name) [INFO] [stdout] 70 ~ && let Some(unit_match) = captures.get(1) { [INFO] [stdout] 71 | unit_found = unit_match.as_str().trim().to_string(); [INFO] [stdout] 72 | cleaned_name = pattern.replace(&cleaned_name, "").to_string(); [INFO] [stdout] 73 | break; [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/processor/rule_normalizer.rs:83:47 [INFO] [stdout] | [INFO] [stdout] 83 | ... let non_unit_desc_regex = Regex::new(r"\s*\(\s*(aalu|pyaaz|kheera|sabzi|dal|atta|masala|spice|powder|paste|sauce|pickle|jam|ho... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/processor/rule_normalizer.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | for name_opt in name_series.into_iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/processor/rule_normalizer.rs:89:22 [INFO] [stdout] | [INFO] [stdout] 89 | .trim() [INFO] [stdout] | ______________________^ [INFO] [stdout] 90 | | .split_whitespace() [INFO] [stdout] | |_____________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/rule_normalizer.rs:168:21 [INFO] [stdout] | [INFO] [stdout] 168 | / if let Some(captures) = re.captures(&cleaned) { [INFO] [stdout] 169 | | if let Some(number_match) = captures.get(1) { [INFO] [stdout] 170 | | return f64::from_str(number_match.as_str()).ok(); [INFO] [stdout] 171 | | } [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 168 ~ if let Some(captures) = re.captures(&cleaned) [INFO] [stdout] 169 ~ && let Some(number_match) = captures.get(1) { [INFO] [stdout] 170 | return f64::from_str(number_match.as_str()).ok(); [INFO] [stdout] 171 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/processor/rule_normalizer.rs:197:22 [INFO] [stdout] | [INFO] [stdout] 197 | .zip(cost_prices.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 197 - .zip(cost_prices.into_iter()) [INFO] [stdout] 197 + .zip(&*cost_prices) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/processor/rule_normalizer.rs:198:22 [INFO] [stdout] | [INFO] [stdout] 198 | .zip(mrps.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 198 - .zip(mrps.into_iter()) [INFO] [stdout] 198 + .zip(&*mrps) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/rule_normalizer.rs:201:21 [INFO] [stdout] | [INFO] [stdout] 201 | / if let Some(discount_val) = existing_discount { [INFO] [stdout] 202 | | if !discount_val.is_nan() { [INFO] [stdout] 203 | | return Some(discount_val); [INFO] [stdout] 204 | | } [INFO] [stdout] 205 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 201 ~ if let Some(discount_val) = existing_discount [INFO] [stdout] 202 ~ && !discount_val.is_nan() { [INFO] [stdout] 203 | return Some(discount_val); [INFO] [stdout] 204 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/processor/stages/source_transformer.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 130 | / pub fn from_str(s: &str) -> Self { [INFO] [stdout] 131 | | match s.to_lowercase().as_str() { [INFO] [stdout] 132 | | "json_api" => SourceType::JsonApi, [INFO] [stdout] 133 | | "pandamart" => SourceType::Pandamart, [INFO] [stdout] ... | [INFO] [stdout] 139 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/processor/stages/pipeline_builder.rs:197:50 [INFO] [stdout] | [INFO] [stdout] 197 | for (_index, stage) in self.stages.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 197 - for (_index, stage) in self.stages.iter().enumerate() { [INFO] [stdout] 197 + for stage in self.stages.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/html_transformer.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | / if let Some(captures) = re.captures(&cleaned) { [INFO] [stdout] 87 | | if let Some(number_match) = captures.get(1) { [INFO] [stdout] 88 | | let price: f64 = number_match.as_str().parse()?; [INFO] [stdout] 89 | | return Ok(format!("{:.2}", price)); [INFO] [stdout] 90 | | } [INFO] [stdout] 91 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if let Some(captures) = re.captures(&cleaned) [INFO] [stdout] 87 ~ && let Some(number_match) = captures.get(1) { [INFO] [stdout] 88 | let price: f64 = number_match.as_str().parse()?; [INFO] [stdout] 89 | return Ok(format!("{:.2}", price)); [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | / if let Some(value) = self.get_nested_value(item, path) { [INFO] [stdout] 86 | | if let Some(s) = value.as_str() { [INFO] [stdout] 87 | | if !s.trim().is_empty() { [INFO] [stdout] 88 | | return Ok(s.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 85 ~ if let Some(value) = self.get_nested_value(item, path) [INFO] [stdout] 86 ~ && let Some(s) = value.as_str() { [INFO] [stdout] 87 | if !s.trim().is_empty() { [INFO] [stdout] 88 | return Ok(s.to_string()); [INFO] [stdout] 89 | } [INFO] [stdout] 90 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | / if let Some(s) = value.as_str() { [INFO] [stdout] 87 | | if !s.trim().is_empty() { [INFO] [stdout] 88 | | return Ok(s.to_string()); [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ if let Some(s) = value.as_str() [INFO] [stdout] 87 ~ && !s.trim().is_empty() { [INFO] [stdout] 88 | return Ok(s.to_string()); [INFO] [stdout] 89 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | / if let Some(price_str) = value.as_str() { [INFO] [stdout] 104 | | if let Ok(price) = price_str.parse::() { [INFO] [stdout] 105 | | return Ok(price); [INFO] [stdout] 106 | | } [INFO] [stdout] 107 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ if let Some(price_str) = value.as_str() [INFO] [stdout] 104 ~ && let Ok(price) = price_str.parse::() { [INFO] [stdout] 105 | return Ok(price); [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | / if let Some(first_attr) = attributes.get(0) { [INFO] [stdout] 130 | | if let Some(value) = first_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 131 | | return Some(value.to_string()); [INFO] [stdout] 132 | | } [INFO] [stdout] 133 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 129 ~ if let Some(first_attr) = attributes.get(0) [INFO] [stdout] 130 ~ && let Some(value) = first_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 131 | return Some(value.to_string()); [INFO] [stdout] 132 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `attributes.get(0)` [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:129:39 [INFO] [stdout] | [INFO] [stdout] 129 | if let Some(first_attr) = attributes.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `attributes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/pandamart_transformer.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | / if let Some(units_attr) = attributes.get(2) { [INFO] [stdout] 143 | | if let Some(value) = units_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 144 | | return Some(value.to_string()); [INFO] [stdout] 145 | | } [INFO] [stdout] 146 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 142 ~ if let Some(units_attr) = attributes.get(2) [INFO] [stdout] 143 ~ && let Some(value) = units_attr.get("value").and_then(|v| v.as_str()) { [INFO] [stdout] 144 | return Some(value.to_string()); [INFO] [stdout] 145 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:76:28 [INFO] [stdout] | [INFO] [stdout] 76 | if !item.get(field_name).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item.get(field_name).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / if let Some(required_fields) = self.config.source_config.get("required_fields") { [INFO] [stdout] 73 | | if let Some(fields_array) = required_fields.as_array() { [INFO] [stdout] 74 | | for field in fields_array { [INFO] [stdout] 75 | | if let Some(field_name) = field.as_str() { [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if let Some(required_fields) = self.config.source_config.get("required_fields") [INFO] [stdout] 73 ~ && let Some(fields_array) = required_fields.as_array() { [INFO] [stdout] 74 | for field in fields_array { [INFO] [stdout] ... [INFO] [stdout] 80 | } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:75:21 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(field_name) = field.as_str() { [INFO] [stdout] 76 | | if !item.get(field_name).is_some() { [INFO] [stdout] 77 | | return false; [INFO] [stdout] 78 | | } [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ if let Some(field_name) = field.as_str() [INFO] [stdout] 76 ~ && !item.get(field_name).is_some() { [INFO] [stdout] 77 | return false; [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | config.max_items = 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `processor::stages::source_transformer::TransformerConfig { max_items: 2, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/processor/stages/transformers/json_transformer.rs:270:9 [INFO] [stdout] | [INFO] [stdout] 270 | let mut config = TransformerConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/test_two_stage_html.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/test_two_stage_html.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/test_naheed.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | if enabled_categories.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!enabled_categories.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/data-pipeline-from-storage.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/data-pipeline-from-storage.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing_subscriber; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/data-pipeline-from-storage.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/data-pipeline-from-storage.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | use tracing_subscriber; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/test_naheed.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | if enabled_categories.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!enabled_categories.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/storage/minio_client.rs:476:9 [INFO] [stdout] | [INFO] [stdout] 476 | config.env_access_key = Some("TEST_MINIO_ACCESS_KEY".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `config::minio_config::MinioConfig { env_access_key: Some("TEST_MINIO_ACCESS_KEY".to_string()), env_secret_key: Some("TEST_MINIO_SECRET_KEY".to_string()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/storage/minio_client.rs:475:9 [INFO] [stdout] | [INFO] [stdout] 475 | let mut config = MinioConfig::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/pipeline-tools.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/bin/pipeline-tools.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | use dotenv; [INFO] [stdout] | ^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_any_source` is never used [INFO] [stdout] --> examples/trait_based_demo.rs:248:10 [INFO] [stdout] | [INFO] [stdout] 248 | async fn process_any_source(source: &dyn DataSource) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_with_any_processor` is never used [INFO] [stdout] --> examples/trait_based_demo.rs:270:10 [INFO] [stdout] | [INFO] [stdout] 270 | async fn process_with_any_processor( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/cli/app.rs:106:33 [INFO] [stdout] | [INFO] [stdout] 106 | let valid_sources = vec!["kravemart", "bazaarapp", "dealcart", "pandamart", "naheed"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["kravemart", "bazaarapp", "dealcart", "pandamart", "naheed"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/processor/stages/examples.rs:226:32 [INFO] [stdout] | [INFO] [stdout] 226 | let _naheed_products = vec![ [INFO] [stdout] | ________________________________^ [INFO] [stdout] 227 | | // Fruits page 1 [INFO] [stdout] 228 | | ScrapedProduct::new( [INFO] [stdout] 229 | | "Fresh Apples".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 255 | | ).with_storage_metadata("groceries-pets/fresh-products", "vegetables", None), [INFO] [stdout] 256 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 226 ~ let _naheed_products = [ScrapedProduct::new( [INFO] [stdout] 227 + "Fresh Apples".to_string(), [INFO] [stdout] 228 + "Rs. 250".to_string(), [INFO] [stdout] 229 + "NAHEED_001".to_string(), [INFO] [stdout] 230 + "Fruits".to_string(), [INFO] [stdout] 231 + Some("https://naheed.pk/fruits/apples".to_string()), [INFO] [stdout] 232 + "
Fresh Apples HTML
".to_string(), [INFO] [stdout] 233 + ).with_storage_metadata("groceries-pets/fresh-products", "fruits", None), [INFO] [stdout] 234 + [INFO] [stdout] 235 + // Fruits page 2 [INFO] [stdout] 236 + ScrapedProduct::new( [INFO] [stdout] 237 + "Organic Bananas".to_string(), [INFO] [stdout] 238 + "Rs. 180".to_string(), [INFO] [stdout] 239 + "NAHEED_002".to_string(), [INFO] [stdout] 240 + "Fruits".to_string(), [INFO] [stdout] 241 + Some("https://naheed.pk/fruits/bananas".to_string()), [INFO] [stdout] 242 + "
Organic Bananas HTML
".to_string(), [INFO] [stdout] 243 + ).with_storage_metadata("groceries-pets/fresh-products", "fruits", Some(2)), [INFO] [stdout] 244 + [INFO] [stdout] 245 + // Vegetables page 1 [INFO] [stdout] 246 + ScrapedProduct::new( [INFO] [stdout] 247 + "Fresh Tomatoes".to_string(), [INFO] [stdout] 248 + "Rs. 120".to_string(), [INFO] [stdout] 249 + "NAHEED_003".to_string(), [INFO] [stdout] 250 + "Vegetables".to_string(), [INFO] [stdout] 251 + Some("https://naheed.pk/vegetables/tomatoes".to_string()), [INFO] [stdout] 252 + "
Fresh Tomatoes HTML
".to_string(), [INFO] [stdout] 253 ~ ).with_storage_metadata("groceries-pets/fresh-products", "vegetables", None)]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant redefinition of a binding `factory` [INFO] [stdout] --> examples/concurrency_example.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let factory = factory; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: `factory` is initially defined here [INFO] [stdout] --> examples/concurrency_example.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | let factory = GlobalHttpClientFactory::instance().await?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals [INFO] [stdout] = note: `#[warn(clippy::redundant_locals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> examples/concurrency_example.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | let test_urls = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 84 | | "https://httpbin.org/delay/1", [INFO] [stdout] 85 | | "https://httpbin.org/json", [INFO] [stdout] 86 | | "https://jsonplaceholder.typicode.com/posts/1", [INFO] [stdout] 87 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 83 ~ let test_urls = ["https://httpbin.org/delay/1", [INFO] [stdout] 84 + "https://httpbin.org/json", [INFO] [stdout] 85 ~ "https://jsonplaceholder.typicode.com/posts/1"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> examples/concurrency_example.rs:220:20 [INFO] [stdout] | [INFO] [stdout] 220 | let api_urls = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 221 | | "https://jsonplaceholder.typicode.com/posts/1", [INFO] [stdout] 222 | | "https://jsonplaceholder.typicode.com/posts/2", [INFO] [stdout] 223 | | "https://jsonplaceholder.typicode.com/posts/3", [INFO] [stdout] 224 | | "https://jsonplaceholder.typicode.com/posts/4", [INFO] [stdout] 225 | | "https://jsonplaceholder.typicode.com/posts/5", [INFO] [stdout] 226 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 220 ~ let api_urls = ["https://jsonplaceholder.typicode.com/posts/1", [INFO] [stdout] 221 + "https://jsonplaceholder.typicode.com/posts/2", [INFO] [stdout] 222 + "https://jsonplaceholder.typicode.com/posts/3", [INFO] [stdout] 223 + "https://jsonplaceholder.typicode.com/posts/4", [INFO] [stdout] 224 ~ "https://jsonplaceholder.typicode.com/posts/5"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> examples/concurrency_example.rs:228:25 [INFO] [stdout] | [INFO] [stdout] 228 | let scraping_urls = vec![ [INFO] [stdout] | _________________________^ [INFO] [stdout] 229 | | "https://httpbin.org/json", [INFO] [stdout] 230 | | "https://httpbin.org/headers", [INFO] [stdout] 231 | | "https://httpbin.org/user-agent", [INFO] [stdout] 232 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 228 ~ let scraping_urls = ["https://httpbin.org/json", [INFO] [stdout] 229 + "https://httpbin.org/headers", [INFO] [stdout] 230 ~ "https://httpbin.org/user-agent"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 50s [INFO] running `Command { std: "docker" "inspect" "f965037acf1b4f247585690fbc54d84007b08f95bf05334469e5e9869e6bdb0a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f965037acf1b4f247585690fbc54d84007b08f95bf05334469e5e9869e6bdb0a", kill_on_drop: false }` [INFO] [stdout] f965037acf1b4f247585690fbc54d84007b08f95bf05334469e5e9869e6bdb0a