[INFO] fetching crate polars-readstat-rs 0.4.4... [INFO] linting polars-readstat-rs-0.4.4 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate polars-readstat-rs 0.4.4 into /workspace/builds/worker-1-tc1/source [INFO] removed /workspace/builds/worker-1-tc1/source/.cargo/config.toml [INFO] removed /workspace/builds/worker-1-tc1/source/rust-toolchain.toml [INFO] started tweaking crates.io crate polars-readstat-rs 0.4.4 [INFO] removed 0 missing examples [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate polars-readstat-rs 0.4.4 [INFO] tweaked toml for crates.io crate polars-readstat-rs 0.4.4 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate polars-readstat-rs 0.4.4 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 crates.io crate polars-readstat-rs 0.4.4 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded array-init-cursor v0.2.1 [INFO] [stderr] Downloaded serde_stacker v0.1.14 [INFO] [stderr] Downloaded polars-row v0.53.0 [INFO] [stderr] Downloaded stacker v0.1.23 [INFO] [stderr] Downloaded recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Downloaded now v0.1.3 [INFO] [stderr] Downloaded streaming-decompression v0.1.2 [INFO] [stderr] Downloaded recursive v0.1.1 [INFO] [stderr] Downloaded sqlparser_derive v0.4.0 [INFO] [stderr] Downloaded unicode-reverse v1.0.9 [INFO] [stderr] Downloaded polars-dtype v0.53.0 [INFO] [stderr] Downloaded boxcar v0.2.14 [INFO] [stderr] Downloaded planus v1.1.1 [INFO] [stderr] Downloaded polars-arrow-format v0.2.1 [INFO] [stderr] Downloaded polars-mem-engine v0.53.0 [INFO] [stderr] Downloaded polars-lazy v0.53.0 [INFO] [stderr] Downloaded polars-sql v0.53.0 [INFO] [stderr] Downloaded comfy-table v7.2.2 [INFO] [stderr] Downloaded polars-time v0.53.0 [INFO] [stderr] Downloaded polars-expr v0.53.0 [INFO] [stderr] Downloaded polars-ops v0.53.0 [INFO] [stderr] Downloaded polars-io v0.53.0 [INFO] [stderr] Downloaded polars-parquet v0.53.0 [INFO] [stderr] Downloaded polars v0.53.0 [INFO] [stderr] Downloaded object_store v0.13.1 [INFO] [stderr] Downloaded polars-parquet-format v0.1.0 [INFO] [stderr] Downloaded polars-stream v0.53.0 [INFO] [stderr] Downloaded signal-hook v0.4.3 [INFO] [stderr] Downloaded polars-plan v0.53.0 [INFO] [stderr] Downloaded sqlparser v0.60.0 [INFO] [stderr] Downloaded polars-core v0.53.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 30c2503d6592e59384dad01c56bbfcac861d1ec5e104fbe5e7c4debbee4bdc8b [INFO] running `Command { std: "docker" "start" "-a" "30c2503d6592e59384dad01c56bbfcac861d1ec5e104fbe5e7c4debbee4bdc8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "30c2503d6592e59384dad01c56bbfcac861d1ec5e104fbe5e7c4debbee4bdc8b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "30c2503d6592e59384dad01c56bbfcac861d1ec5e104fbe5e7c4debbee4bdc8b", kill_on_drop: false }` [INFO] [stdout] 30c2503d6592e59384dad01c56bbfcac861d1ec5e104fbe5e7c4debbee4bdc8b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 28adf1eaa8ef216fae61642c151e7ebb834f7093ab7ceac3c3f0b99b778231ff [INFO] running `Command { std: "docker" "start" "-a" "28adf1eaa8ef216fae61642c151e7ebb834f7093ab7ceac3c3f0b99b778231ff", kill_on_drop: false }` [INFO] [stderr] Compiling zerocopy v0.8.39 [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.2 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Checking foldhash v0.2.0 [INFO] [stderr] Compiling object v0.37.3 [INFO] [stderr] Compiling zerocopy-derive v0.8.39 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Compiling zmij v1.0.19 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling rustls v0.23.36 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking rustls-native-certs v0.8.3 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking array-init-cursor v0.2.1 [INFO] [stderr] Compiling signal-hook v0.4.3 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Checking planus v1.1.1 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Checking bytes v1.11.1 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking quick-xml v0.38.4 [INFO] [stderr] Compiling slotmap v1.1.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling virtue v0.0.18 [INFO] [stderr] Checking castaway v0.2.4 [INFO] [stderr] Checking rmp v0.8.15 [INFO] [stderr] Compiling polars-utils v0.53.0 [INFO] [stderr] Compiling bincode_derive v2.0.1 [INFO] [stderr] Checking siphasher v1.0.2 [INFO] [stderr] Checking polars-arrow-format v0.2.1 [INFO] [stderr] Checking simdutf8 v0.1.5 [INFO] [stderr] Checking zlib-rs v0.6.2 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking unty v0.0.4 [INFO] [stderr] Checking phf_shared v0.12.1 [INFO] [stderr] Checking compact_str v0.9.0 [INFO] [stderr] Checking rmp-serde v1.3.1 [INFO] [stderr] Compiling cc v1.2.55 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Checking raw-cpuid v11.6.0 [INFO] [stderr] Checking uuid v1.20.0 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Checking memmap2 v0.9.9 [INFO] [stderr] Checking bincode v2.0.1 [INFO] [stderr] Compiling polars-buffer v0.53.0 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Compiling polars-schema v0.53.0 [INFO] [stderr] Compiling chrono-tz v0.10.4 [INFO] [stderr] Checking phf v0.12.1 [INFO] [stderr] Compiling polars-arrow v0.53.0 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Compiling strum_macros v0.27.2 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking ethnum v1.5.2 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking streaming-iterator v0.1.9 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling polars-compute v0.53.0 [INFO] [stderr] Checking debug_unsafe v0.1.3 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking atoi_simd v0.17.0 [INFO] [stderr] Checking fast-float2 v0.2.3 [INFO] [stderr] Checking strength_reduce v0.2.4 [INFO] [stderr] Compiling litrs v1.0.0 [INFO] [stderr] Checking boxcar v0.2.14 [INFO] [stderr] Compiling polars-core v0.53.0 [INFO] [stderr] Checking unicode-segmentation v1.12.0 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling stacker v0.1.23 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Compiling lz4-sys v1.11.1+lz4-1.10.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Compiling polars-ops v0.53.0 [INFO] [stderr] Checking xxhash-rust v0.8.15 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling blake3 v1.8.3 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Checking fallible-streaming-iterator v0.1.9 [INFO] [stderr] Compiling document-features v0.2.12 [INFO] [stderr] Checking streaming-decompression v0.1.2 [INFO] [stderr] Checking polars-parquet-format v0.1.0 [INFO] [stderr] Checking now v0.1.3 [INFO] [stderr] Compiling recursive-proc-macro-impl v0.1.1 [INFO] [stderr] Checking home v0.5.12 [INFO] [stderr] Checking glob v0.3.3 [INFO] [stderr] Checking async-stream v0.3.6 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Compiling polars-expr v0.53.0 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling crypto-common v0.1.7 [INFO] [stderr] Compiling polars-stream v0.53.0 [INFO] [stderr] Checking crossbeam-queue v0.3.12 [INFO] [stderr] Compiling polars-lazy v0.53.0 [INFO] [stderr] Compiling polars v0.53.0 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Checking event-listener v5.4.1 [INFO] [stderr] Checking clap_lex v1.0.0 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Checking clap_builder v4.5.60 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking fs4 v0.13.1 [INFO] [stderr] Compiling ar_archive_writer v0.5.1 [INFO] [stderr] Checking anes v0.1.6 [INFO] [stderr] Compiling polars-plan v0.53.0 [INFO] [stderr] Checking comfy-table v7.2.2 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Compiling psm v0.1.30 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking serde_stacker v0.1.14 [INFO] [stderr] Checking recursive v0.1.1 [INFO] [stderr] Checking argminmax v0.6.3 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking rand_distr v0.5.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking object_store v0.13.1 [INFO] [stderr] Checking lz4 v1.28.1 [INFO] [stderr] Checking polars-error v0.53.0 [INFO] [stderr] Checking polars-dtype v0.53.0 [INFO] [stderr] Checking polars-row v0.53.0 [INFO] [stderr] Checking polars-parquet v0.53.0 [INFO] [stderr] Checking polars-time v0.53.0 [INFO] [stderr] Checking polars-io v0.53.0 [INFO] [stderr] Checking polars-mem-engine v0.53.0 [INFO] [stderr] Checking polars-readstat-rs v0.4.4 (/opt/rustwide/workdir) [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/decompressor/rdc.rs:127:26 [INFO] [stdout] | [INFO] [stdout] 127 | _ if cmd >= 3 && cmd <= 15 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(3..=15).contains(&cmd)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/sas/polars_output.rs:219:63 [INFO] [stdout] | [INFO] [stdout] 219 | for (_column, buffer) in self.columns_meta.iter().zip(self.buffers.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] 219 - for (_column, buffer) in self.columns_meta.iter().zip(self.buffers.into_iter()) { [INFO] [stdout] 219 + for (_column, buffer) in self.columns_meta.iter().zip(self.buffers) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/polars_output.rs:314:12 [INFO] [stdout] | [INFO] [stdout] 314 | if days_since_1970 >= -135080 && days_since_1970 <= 156935 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-135080..=156935).contains(&days_since_1970)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/polars_output.rs:324:8 [INFO] [stdout] | [INFO] [stdout] 324 | if days_since_1970 >= -135080 && days_since_1970 <= 156935 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-135080..=156935).contains(&days_since_1970)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/sas/polars_output.rs:392:5 [INFO] [stdout] | [INFO] [stdout] 392 | / pub fn new( [INFO] [stdout] 393 | | path: PathBuf, [INFO] [stdout] 394 | | threads: Option, [INFO] [stdout] 395 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 400 | | informative_nulls: Option, [INFO] [stdout] 401 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/sas/polars_output.rs:768:1 [INFO] [stdout] | [INFO] [stdout] 768 | / pub(crate) fn sas_batch_iter( [INFO] [stdout] 769 | | path: PathBuf, [INFO] [stdout] 770 | | threads: Option, [INFO] [stdout] 771 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 778 | | informative_nulls: Option, [INFO] [stdout] 779 | | ) -> PolarsResult { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/sas/polars_output.rs:797:1 [INFO] [stdout] | [INFO] [stdout] 797 | / pub(crate) fn sas_batch_iter_with_reader( [INFO] [stdout] 798 | | reader: &Sas7bdatReader, [INFO] [stdout] 799 | | path: PathBuf, [INFO] [stdout] 800 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 808 | | informative_nulls: Option, [INFO] [stdout] 809 | | ) -> PolarsResult { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/sas/polars_output.rs:1143:67 [INFO] [stdout] | [INFO] [stdout] 1143 | let prefetch = crate::scan_prefetch::spawn_prefetcher(iter.map(|batch| batch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/sas/writer.rs:383:5 [INFO] [stdout] | [INFO] [stdout] 383 | / for opt in utf8.into_iter() { [INFO] [stdout] 384 | | if let Some(s) = opt { [INFO] [stdout] 385 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 386 | | } [INFO] [stdout] 387 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/sas/writer.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | / if let Some(s) = opt { [INFO] [stdout] 385 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 386 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 383 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 384 + max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 385 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/sas/writer.rs:385:35 [INFO] [stdout] | [INFO] [stdout] 385 | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sas/arrow_output.rs:69:36 [INFO] [stdout] | [INFO] [stdout] 69 | let field = build_struct_field(&df.schema()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `df.schema()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/sas/metadata.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / match read_metadata_inner(file, header, endian, format, true) { [INFO] [stdout] 23 | | Ok(result) => return Ok(result), [INFO] [stdout] 24 | | Err(_) => {} [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ help: try: `if let Ok(result) = read_metadata_inner(file, header, endian, format, true) { return Ok(result) }` [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] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/sas/metadata.rs:108:20 [INFO] [stdout] | [INFO] [stdout] 108 | if row_length > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ check performed here [INFO] [stdout] ... [INFO] [stdout] 117 | let max_fit = available / row_length; [INFO] [stdout] | ---------------------- division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/sas/reader.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/sas/reader.rs:319:24 [INFO] [stdout] | [INFO] [stdout] 319 | let n_data_pages = (data_page_rows + rows_per_page - 1) / rows_per_page; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data_page_rows.div_ceil(rows_per_page)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/sas/reader.rs:361:1 [INFO] [stdout] | [INFO] [stdout] 361 | / pub(crate) fn data_reader_at_row( [INFO] [stdout] 362 | | path: &Path, [INFO] [stdout] 363 | | header: &Header, [INFO] [stdout] 364 | | metadata: &Metadata, [INFO] [stdout] ... | [INFO] [stdout] 369 | | page_index: &[DataPageEntry], [INFO] [stdout] 370 | | ) -> Result>> { [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/data.rs:693:30 [INFO] [stdout] | [INFO] [stdout] 693 | let as_char = if type_byte >= 0x41 && type_byte <= 0x7a { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x41..=0x7a).contains(&type_byte)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/decompressor/rdc.rs:127:26 [INFO] [stdout] | [INFO] [stdout] 127 | _ if cmd >= 3 && cmd <= 15 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(3..=15).contains(&cmd)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/spss/arrow_output.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | let field = build_struct_field(&df.schema()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `df.schema()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/spss/data.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | / pub fn read_data_frame_streaming( [INFO] [stdout] 82 | | path: &Path, [INFO] [stdout] 83 | | metadata: &Metadata, [INFO] [stdout] 84 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 93 | | on_batch: &mut dyn FnMut(DataFrame) -> bool, [INFO] [stdout] 94 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/spss/data.rs:302:1 [INFO] [stdout] | [INFO] [stdout] 302 | / pub fn read_data_frame_with_reader( [INFO] [stdout] 303 | | reader: &mut BufReader, [INFO] [stdout] 304 | | metadata: &Metadata, [INFO] [stdout] 305 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 312 | | value_labels_as_strings: bool, [INFO] [stdout] 313 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/spss/data.rs:471:1 [INFO] [stdout] | [INFO] [stdout] 471 | / pub fn read_data_columns_uncompressed( [INFO] [stdout] 472 | | path: &Path, [INFO] [stdout] 473 | | metadata: &Metadata, [INFO] [stdout] 474 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 479 | | value_labels_as_strings: bool, [INFO] [stdout] 480 | | ) -> Result> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `polars::prelude::Series` [INFO] [stdout] --> src/spss/data.rs:588:19 [INFO] [stdout] | [INFO] [stdout] 588 | cols.push(b.finish().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `b.finish()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/spss/data.rs:783:46 [INFO] [stdout] | [INFO] [stdout] 783 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/spss/data.rs:797:42 [INFO] [stdout] | [INFO] [stdout] 797 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/spss/data.rs:831:20 [INFO] [stdout] | [INFO] [stdout] 831 | if raw.iter().any(|b| *b == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `raw.contains(&0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/spss/data.rs:880:20 [INFO] [stdout] | [INFO] [stdout] 880 | || plan [INFO] [stdout] | ____________________^ [INFO] [stdout] 881 | | .missing_set [INFO] [stdout] 882 | | .as_ref() [INFO] [stdout] 883 | | .map_or(false, |set| set.contains(s)); [INFO] [stdout] | |_________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 883 - .map_or(false, |set| set.contains(s)); [INFO] [stdout] 883 + .is_some_and(|set| set.contains(s)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/sas/polars_output.rs:219:63 [INFO] [stdout] | [INFO] [stdout] 219 | for (_column, buffer) in self.columns_meta.iter().zip(self.buffers.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] 219 - for (_column, buffer) in self.columns_meta.iter().zip(self.buffers.into_iter()) { [INFO] [stdout] 219 + for (_column, buffer) in self.columns_meta.iter().zip(self.buffers) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/spss/data.rs:933:9 [INFO] [stdout] | [INFO] [stdout] 933 | / if plan.missing_doubles.len() >= 3 { [INFO] [stdout] 934 | | if bits == plan.missing_double_bits.get(2).copied().unwrap_or(0) { [INFO] [stdout] 935 | | return true; [INFO] [stdout] 936 | | } [INFO] [stdout] 937 | | } [INFO] [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] 933 ~ if plan.missing_doubles.len() >= 3 [INFO] [stdout] 934 ~ && bits == plan.missing_double_bits.get(2).copied().unwrap_or(0) { [INFO] [stdout] 935 | return true; [INFO] [stdout] 936 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/spss/data.rs:940:9 [INFO] [stdout] | [INFO] [stdout] 940 | plan.missing_double_bits.iter().any(|b| *b == bits) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `plan.missing_double_bits.contains(&bits)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/spss/data.rs:1008:12 [INFO] [stdout] | [INFO] [stdout] 1008 | if plan.missing_double_bits.iter().any(|b| *b == bits) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `plan.missing_double_bits.contains(&bits)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/polars_output.rs:314:12 [INFO] [stdout] | [INFO] [stdout] 314 | if days_since_1970 >= -135080 && days_since_1970 <= 156935 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-135080..=156935).contains(&days_since_1970)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/sas/polars_output.rs:324:8 [INFO] [stdout] | [INFO] [stdout] 324 | if days_since_1970 >= -135080 && days_since_1970 <= 156935 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-135080..=156935).contains(&days_since_1970)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/sas/polars_output.rs:392:5 [INFO] [stdout] | [INFO] [stdout] 392 | / pub fn new( [INFO] [stdout] 393 | | path: PathBuf, [INFO] [stdout] 394 | | threads: Option, [INFO] [stdout] 395 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 400 | | informative_nulls: Option, [INFO] [stdout] 401 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/spss/data.rs:1104:1 [INFO] [stdout] | [INFO] [stdout] 1104 | / fn read_zsav_data_with_indicators( [INFO] [stdout] 1105 | | reader: &mut R, [INFO] [stdout] 1106 | | endian: Endian, [INFO] [stdout] 1107 | | bias: f64, [INFO] [stdout] ... | [INFO] [stdout] 1114 | | encoding: &'static encoding_rs::Encoding, [INFO] [stdout] 1115 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/spss/data.rs:1189:1 [INFO] [stdout] | [INFO] [stdout] 1189 | / pub fn read_data_frame_with_indicators( [INFO] [stdout] 1190 | | path: &Path, [INFO] [stdout] 1191 | | metadata: &Metadata, [INFO] [stdout] 1192 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 1200 | | indicator_col_names: &[Option], [INFO] [stdout] 1201 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/spss/data.rs:1367:48 [INFO] [stdout] | [INFO] [stdout] 1367 | for (b, ind_b) in builders.into_iter().zip(ind_builders.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] 1367 - for (b, ind_b) in builders.into_iter().zip(ind_builders.into_iter()) { [INFO] [stdout] 1367 + for (b, ind_b) in builders.into_iter().zip(ind_builders) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/sas/polars_output.rs:768:1 [INFO] [stdout] | [INFO] [stdout] 768 | / pub(crate) fn sas_batch_iter( [INFO] [stdout] 769 | | path: PathBuf, [INFO] [stdout] 770 | | threads: Option, [INFO] [stdout] 771 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 778 | | informative_nulls: Option, [INFO] [stdout] 779 | | ) -> PolarsResult { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/sas/polars_output.rs:797:1 [INFO] [stdout] | [INFO] [stdout] 797 | / pub(crate) fn sas_batch_iter_with_reader( [INFO] [stdout] 798 | | reader: &Sas7bdatReader, [INFO] [stdout] 799 | | path: PathBuf, [INFO] [stdout] 800 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 808 | | informative_nulls: Option, [INFO] [stdout] 809 | | ) -> PolarsResult { [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/spss/data.rs:1713:1 [INFO] [stdout] | [INFO] [stdout] 1713 | / fn read_zsav_data( [INFO] [stdout] 1714 | | reader: &mut R, [INFO] [stdout] 1715 | | endian: Endian, [INFO] [stdout] 1716 | | bias: f64, [INFO] [stdout] ... | [INFO] [stdout] 1724 | | encoding: &'static encoding_rs::Encoding, [INFO] [stdout] 1725 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/sas/polars_output.rs:1143:67 [INFO] [stdout] | [INFO] [stdout] 1143 | let prefetch = crate::scan_prefetch::spawn_prefetcher(iter.map(|batch| batch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/spss/metadata.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | REC_TYPE_DICT_TERMINATION | _ => break, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/metadata.rs:63:34 [INFO] [stdout] | [INFO] [stdout] 63 | let padded = ((len + 3) / 4) * 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/metadata.rs:244:26 [INFO] [stdout] | [INFO] [stdout] 244 | let n_segments = (string_len + 251) / 252; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `string_len.div_ceil(252)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/sas/polars_output.rs:1316:9 [INFO] [stdout] | [INFO] [stdout] 1316 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/metadata.rs:308:22 [INFO] [stdout] | [INFO] [stdout] 308 | let padded = ((len + 3) / 4) * 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/spss/metadata.rs:429:52 [INFO] [stdout] | [INFO] [stdout] 429 | for (raw, label) in raw_values.into_iter().zip(labels.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] 429 - for (raw, label) in raw_values.into_iter().zip(labels.into_iter()) { [INFO] [stdout] 429 + for (raw, label) in raw_values.into_iter().zip(labels) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/spss/polars_output.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | / pub(crate) fn spss_batch_iter( [INFO] [stdout] 180 | | path: PathBuf, [INFO] [stdout] 181 | | threads: Option, [INFO] [stdout] 182 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 190 | | informative_nulls: Option, [INFO] [stdout] 191 | | ) -> PolarsResult { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/spss/polars_output.rs:210:1 [INFO] [stdout] | [INFO] [stdout] 210 | / pub(crate) fn spss_batch_iter_with_reader( [INFO] [stdout] 211 | | reader: &SpssReader, [INFO] [stdout] 212 | | path: PathBuf, [INFO] [stdout] 213 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 222 | | informative_nulls: Option, [INFO] [stdout] 223 | | ) -> PolarsResult { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/polars_output.rs:349:28 [INFO] [stdout] | [INFO] [stdout] 349 | let total_chunks = (total + batch_size - 1) / batch_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `total.div_ceil(batch_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/spss/polars_output.rs:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | / pub fn new( [INFO] [stdout] 596 | | path: PathBuf, [INFO] [stdout] 597 | | threads: Option, [INFO] [stdout] 598 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 604 | | compress_opts: crate::CompressOptionsLite, [INFO] [stdout] 605 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/spss/polars_output.rs:643:67 [INFO] [stdout] | [INFO] [stdout] 643 | let prefetch = crate::scan_prefetch::spawn_prefetcher(iter.map(|batch| batch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/sas/writer.rs:383:5 [INFO] [stdout] | [INFO] [stdout] 383 | / for opt in utf8.into_iter() { [INFO] [stdout] 384 | | if let Some(s) = opt { [INFO] [stdout] 385 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 386 | | } [INFO] [stdout] 387 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/sas/writer.rs:384:9 [INFO] [stdout] | [INFO] [stdout] 384 | / if let Some(s) = opt { [INFO] [stdout] 385 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 386 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 383 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 384 + max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 385 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/sas/writer.rs:385:35 [INFO] [stdout] | [INFO] [stdout] 385 | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/spss/reader.rs:130:13 [INFO] [stdout] | [INFO] [stdout] 130 | &self.reader, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `self.reader` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/spss/reader.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sas/arrow_output.rs:69:36 [INFO] [stdout] | [INFO] [stdout] 69 | let field = build_struct_field(&df.schema()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `df.schema()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/sas/metadata.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / match read_metadata_inner(file, header, endian, format, true) { [INFO] [stdout] 23 | | Ok(result) => return Ok(result), [INFO] [stdout] 24 | | Err(_) => {} [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ help: try: `if let Ok(result) = read_metadata_inner(file, header, endian, format, true) { return Ok(result) }` [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] [INFO] [stdout] [INFO] [stdout] warning: manual checked division [INFO] [stdout] --> src/sas/metadata.rs:108:20 [INFO] [stdout] | [INFO] [stdout] 108 | if row_length > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ check performed here [INFO] [stdout] ... [INFO] [stdout] 117 | let max_fit = available / row_length; [INFO] [stdout] | ---------------------- division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/spss/writer.rs:304:5 [INFO] [stdout] | [INFO] [stdout] 304 | / for opt in utf8.into_iter() { [INFO] [stdout] 305 | | if let Some(s) = opt { [INFO] [stdout] 306 | | let s: &str = s; [INFO] [stdout] 307 | | let len = s.as_bytes().len(); [INFO] [stdout] ... | [INFO] [stdout] 312 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/spss/writer.rs:305:9 [INFO] [stdout] | [INFO] [stdout] 305 | / if let Some(s) = opt { [INFO] [stdout] 306 | | let s: &str = s; [INFO] [stdout] 307 | | let len = s.as_bytes().len(); [INFO] [stdout] 308 | | if len > max_len { [INFO] [stdout] ... | [INFO] [stdout] 311 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 304 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 305 + let s: &str = s; [INFO] [stdout] 306 + let len = s.as_bytes().len(); [INFO] [stdout] 307 + if len > max_len { [INFO] [stdout] 308 + max_len = len; [INFO] [stdout] 309 + } [INFO] [stdout] 310 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/spss/writer.rs:307:23 [INFO] [stdout] | [INFO] [stdout] 307 | let len = s.as_bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/spss/writer.rs:322:8 [INFO] [stdout] | [INFO] [stdout] 322 | if name.as_bytes().len() > 64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/spss/writer.rs:331:27 [INFO] [stdout] | [INFO] [stdout] 331 | if name.is_empty() || name.as_bytes().len() > 8 || !name.is_ascii() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/spss/writer.rs:494:13 [INFO] [stdout] | [INFO] [stdout] 494 | / for opt in ca.into_iter() { [INFO] [stdout] 495 | | if let Some(s) = opt { [INFO] [stdout] 496 | | let (_, _, had_errors) = enc_1252.encode(s); [INFO] [stdout] 497 | | if had_errors { [INFO] [stdout] ... | [INFO] [stdout] 502 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/spss/writer.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | / if let Some(s) = opt { [INFO] [stdout] 496 | | let (_, _, had_errors) = enc_1252.encode(s); [INFO] [stdout] 497 | | if had_errors { [INFO] [stdout] 498 | | needs_utf8 = true; [INFO] [stdout] ... | [INFO] [stdout] 501 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 494 ~ for s in ca.into_iter().flatten() { [INFO] [stdout] 495 + let (_, _, had_errors) = enc_1252.encode(s); [INFO] [stdout] 496 + if had_errors { [INFO] [stdout] 497 + needs_utf8 = true; [INFO] [stdout] 498 + break; [INFO] [stdout] 499 + } [INFO] [stdout] 500 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/spss/writer.rs:587:1 [INFO] [stdout] | [INFO] [stdout] 587 | / fn write_very_long_segment_record( [INFO] [stdout] 588 | | writer: &mut W, [INFO] [stdout] 589 | | name: &str, [INFO] [stdout] 590 | | seg_size: usize, [INFO] [stdout] ... | [INFO] [stdout] 595 | | encoding: &'static encoding_rs::Encoding, [INFO] [stdout] 596 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/writer.rs:667:18 [INFO] [stdout] | [INFO] [stdout] 667 | let padded = ((len + 3) / 4) * 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/sas/reader.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/sas/reader.rs:319:24 [INFO] [stdout] | [INFO] [stdout] 319 | let n_data_pages = (data_page_rows + rows_per_page - 1) / rows_per_page; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data_page_rows.div_ceil(rows_per_page)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/sas/reader.rs:361:1 [INFO] [stdout] | [INFO] [stdout] 361 | / pub(crate) fn data_reader_at_row( [INFO] [stdout] 362 | | path: &Path, [INFO] [stdout] 363 | | header: &Header, [INFO] [stdout] 364 | | metadata: &Metadata, [INFO] [stdout] ... | [INFO] [stdout] 369 | | page_index: &[DataPageEntry], [INFO] [stdout] 370 | | ) -> Result>> { [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/spss/writer.rs:837:13 [INFO] [stdout] | [INFO] [stdout] 837 | col.string_len.min(255).max(1) as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `col.string_len.clamp(1, 255)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/spss/writer.rs:947:38 [INFO] [stdout] | [INFO] [stdout] 947 | writer.write_all(&buf)?; [INFO] [stdout] | ^^^^ help: change this to: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/stata/compress.rs:122:12 [INFO] [stdout] | [INFO] [stdout] 122 | if s.len() > 0 && s.null_count() == s.len() && opts.cast_all_null_to_boolean { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/spss/arrow_output.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | let field = build_struct_field(&df.schema()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `df.schema()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:231:13 [INFO] [stdout] | [INFO] [stdout] 231 | / for v in ca.into_iter() { [INFO] [stdout] 232 | | if let Some(v) = v { [INFO] [stdout] 233 | | if v.fract() != 0.0 { [INFO] [stdout] 234 | | return Ok(false); [INFO] [stdout] ... | [INFO] [stdout] 237 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:232:17 [INFO] [stdout] | [INFO] [stdout] 232 | / if let Some(v) = v { [INFO] [stdout] 233 | | if v.fract() != 0.0 { [INFO] [stdout] 234 | | return Ok(false); [INFO] [stdout] 235 | | } [INFO] [stdout] 236 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 231 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 232 + if v.fract() != 0.0 { [INFO] [stdout] 233 + return Ok(false); [INFO] [stdout] 234 + } [INFO] [stdout] 235 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:242:13 [INFO] [stdout] | [INFO] [stdout] 242 | / for v in ca.into_iter() { [INFO] [stdout] 243 | | if let Some(v) = v { [INFO] [stdout] 244 | | if v.fract() != 0.0 { [INFO] [stdout] 245 | | return Ok(false); [INFO] [stdout] ... | [INFO] [stdout] 248 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:243:17 [INFO] [stdout] | [INFO] [stdout] 243 | / if let Some(v) = v { [INFO] [stdout] 244 | | if v.fract() != 0.0 { [INFO] [stdout] 245 | | return Ok(false); [INFO] [stdout] 246 | | } [INFO] [stdout] 247 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 242 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 243 + if v.fract() != 0.0 { [INFO] [stdout] 244 + return Ok(false); [INFO] [stdout] 245 + } [INFO] [stdout] 246 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/spss/data.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | / pub fn read_data_frame_streaming( [INFO] [stdout] 82 | | path: &Path, [INFO] [stdout] 83 | | metadata: &Metadata, [INFO] [stdout] 84 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 93 | | on_batch: &mut dyn FnMut(DataFrame) -> bool, [INFO] [stdout] 94 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | / for v in ca.into_iter() { [INFO] [stdout] 263 | | if let Some(v) = v { [INFO] [stdout] 264 | | let v = v as f64; [INFO] [stdout] 265 | | any = true; [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:263:17 [INFO] [stdout] | [INFO] [stdout] 263 | / if let Some(v) = v { [INFO] [stdout] 264 | | let v = v as f64; [INFO] [stdout] 265 | | any = true; [INFO] [stdout] 266 | | if v < min { [INFO] [stdout] ... | [INFO] [stdout] 272 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 262 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 263 + let v = v as f64; [INFO] [stdout] 264 + any = true; [INFO] [stdout] 265 + if v < min { [INFO] [stdout] 266 + min = v; [INFO] [stdout] 267 + } [INFO] [stdout] 268 + if v > max { [INFO] [stdout] 269 + max = v; [INFO] [stdout] 270 + } [INFO] [stdout] 271 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:277:13 [INFO] [stdout] | [INFO] [stdout] 277 | / for v in ca.into_iter() { [INFO] [stdout] 278 | | if let Some(v) = v { [INFO] [stdout] 279 | | any = true; [INFO] [stdout] 280 | | if v < min { [INFO] [stdout] ... | [INFO] [stdout] 287 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:278:17 [INFO] [stdout] | [INFO] [stdout] 278 | / if let Some(v) = v { [INFO] [stdout] 279 | | any = true; [INFO] [stdout] 280 | | if v < min { [INFO] [stdout] 281 | | min = v; [INFO] [stdout] ... | [INFO] [stdout] 286 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 277 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 278 + any = true; [INFO] [stdout] 279 + if v < min { [INFO] [stdout] 280 + min = v; [INFO] [stdout] 281 + } [INFO] [stdout] 282 + if v > max { [INFO] [stdout] 283 + max = v; [INFO] [stdout] 284 + } [INFO] [stdout] 285 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:342:5 [INFO] [stdout] | [INFO] [stdout] 342 | / for v in ca.phys.iter() { [INFO] [stdout] 343 | | if let Some(v) = v { [INFO] [stdout] 344 | | let millis = match unit { [INFO] [stdout] 345 | | TimeUnit::Milliseconds => v, [INFO] [stdout] ... | [INFO] [stdout] 353 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:343:9 [INFO] [stdout] | [INFO] [stdout] 343 | / if let Some(v) = v { [INFO] [stdout] 344 | | let millis = match unit { [INFO] [stdout] 345 | | TimeUnit::Milliseconds => v, [INFO] [stdout] 346 | | TimeUnit::Microseconds => v / 1_000, [INFO] [stdout] ... | [INFO] [stdout] 352 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 342 ~ for v in ca.phys.iter().flatten() { [INFO] [stdout] 343 + let millis = match unit { [INFO] [stdout] 344 + TimeUnit::Milliseconds => v, [INFO] [stdout] 345 + TimeUnit::Microseconds => v / 1_000, [INFO] [stdout] 346 + TimeUnit::Nanoseconds => v / 1_000_000, [INFO] [stdout] 347 + }; [INFO] [stdout] 348 + if millis % day_ms != 0 { [INFO] [stdout] 349 + return Ok(false); [INFO] [stdout] 350 + } [INFO] [stdout] 351 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/stata/data.rs:50:1 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn read_data_frame_range( [INFO] [stdout] 51 | | path: &Path, [INFO] [stdout] 52 | | metadata: &Metadata, [INFO] [stdout] 53 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 60 | | shared: &SharedDecode, [INFO] [stdout] 61 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/stata/data.rs:63:23 [INFO] [stdout] | [INFO] [stdout] 63 | let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 63 - let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] 63 + let data_offset = metadata.data_offset.ok_or(Error::MissingMetadata)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/stata/data.rs:168:40 [INFO] [stdout] | [INFO] [stdout] 168 | ... } else if var.name == "utf8_strl" { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 169 | | ... if o > 5 { [INFO] [stdout] 170 | | ... b.append_value(""); [INFO] [stdout] 171 | | ... continue; [INFO] [stdout] 172 | | ... } [INFO] [stdout] 173 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 ~ } else if var.name == "utf8_strl" [INFO] [stdout] 169 ~ && o > 5 { [INFO] [stdout] 170 | b.append_value(""); [INFO] [stdout] 171 | continue; [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/spss/data.rs:302:1 [INFO] [stdout] | [INFO] [stdout] 302 | / pub fn read_data_frame_with_reader( [INFO] [stdout] 303 | | reader: &mut BufReader, [INFO] [stdout] 304 | | metadata: &Metadata, [INFO] [stdout] 305 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 312 | | value_labels_as_strings: bool, [INFO] [stdout] 313 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/stata/data.rs:224:1 [INFO] [stdout] | [INFO] [stdout] 224 | / pub fn read_data_frame_streaming( [INFO] [stdout] 225 | | path: &Path, [INFO] [stdout] 226 | | metadata: &Metadata, [INFO] [stdout] 227 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 236 | | on_batch: &mut dyn FnMut(DataFrame) -> bool, [INFO] [stdout] 237 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/stata/data.rs:239:23 [INFO] [stdout] | [INFO] [stdout] 239 | let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 239 - let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] 239 + let data_offset = metadata.data_offset.ok_or(Error::MissingMetadata)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/stata/data.rs:396:44 [INFO] [stdout] | [INFO] [stdout] 396 | ... } else if var.name == "utf8_strl" { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 397 | | ... if o > 5 { [INFO] [stdout] 398 | | ... b.append_value(""); [INFO] [stdout] 399 | | ... continue; [INFO] [stdout] 400 | | ... } [INFO] [stdout] 401 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 396 ~ } else if var.name == "utf8_strl" [INFO] [stdout] 397 ~ && o > 5 { [INFO] [stdout] 398 | b.append_value(""); [INFO] [stdout] 399 | continue; [INFO] [stdout] 400 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/spss/data.rs:471:1 [INFO] [stdout] | [INFO] [stdout] 471 | / pub fn read_data_columns_uncompressed( [INFO] [stdout] 472 | | path: &Path, [INFO] [stdout] 473 | | metadata: &Metadata, [INFO] [stdout] 474 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 479 | | value_labels_as_strings: bool, [INFO] [stdout] 480 | | ) -> Result> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/stata/data.rs:498:1 [INFO] [stdout] | [INFO] [stdout] 498 | / fn read_numeric_only( [INFO] [stdout] 499 | | reader: &mut BufReader, [INFO] [stdout] 500 | | builders: &mut [ColumnBuilder], [INFO] [stdout] 501 | | plans: &[NumericPlan], [INFO] [stdout] ... | [INFO] [stdout] 507 | | rules: crate::stata::value::MissingRules, [INFO] [stdout] 508 | | ) -> Result { [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `polars::prelude::Series` [INFO] [stdout] --> src/spss/data.rs:588:19 [INFO] [stdout] | [INFO] [stdout] 588 | cols.push(b.finish().into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `b.finish()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/stata/data.rs:570:6 [INFO] [stdout] | [INFO] [stdout] 570 | ) -> Result<( [INFO] [stdout] | ______^ [INFO] [stdout] 571 | | Vec, [INFO] [stdout] 572 | | Vec, [INFO] [stdout] 573 | | Vec, [INFO] [stdout] ... | [INFO] [stdout] 576 | | Vec>, [INFO] [stdout] 577 | | )> { [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/stata/data.rs:654:1 [INFO] [stdout] | [INFO] [stdout] 654 | / fn append_value( [INFO] [stdout] 655 | | builder: &mut ColumnBuilder, [INFO] [stdout] 656 | | var_type: &VarType, [INFO] [stdout] 657 | | buf: &[u8], [INFO] [stdout] ... | [INFO] [stdout] 665 | | scratch: Option<&mut StringScratch>, [INFO] [stdout] 666 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/spss/data.rs:783:46 [INFO] [stdout] | [INFO] [stdout] 783 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/spss/data.rs:797:42 [INFO] [stdout] | [INFO] [stdout] 797 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: checking if a string is ascii using iterators [INFO] [stdout] --> src/stata/data.rs:838:17 [INFO] [stdout] | [INFO] [stdout] 838 | let ascii = s.chars().all(|c| c.is_ascii()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.is_ascii()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_character_iteration [INFO] [stdout] = note: `#[warn(clippy::needless_character_iteration)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/spss/data.rs:831:20 [INFO] [stdout] | [INFO] [stdout] 831 | if raw.iter().any(|b| *b == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `raw.contains(&0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/spss/data.rs:880:20 [INFO] [stdout] | [INFO] [stdout] 880 | || plan [INFO] [stdout] | ____________________^ [INFO] [stdout] 881 | | .missing_set [INFO] [stdout] 882 | | .as_ref() [INFO] [stdout] 883 | | .map_or(false, |set| set.contains(s)); [INFO] [stdout] | |_________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 883 - .map_or(false, |set| set.contains(s)); [INFO] [stdout] 883 + .is_some_and(|set| set.contains(s)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/spss/data.rs:933:9 [INFO] [stdout] | [INFO] [stdout] 933 | / if plan.missing_doubles.len() >= 3 { [INFO] [stdout] 934 | | if bits == plan.missing_double_bits.get(2).copied().unwrap_or(0) { [INFO] [stdout] 935 | | return true; [INFO] [stdout] 936 | | } [INFO] [stdout] 937 | | } [INFO] [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] 933 ~ if plan.missing_doubles.len() >= 3 [INFO] [stdout] 934 ~ && bits == plan.missing_double_bits.get(2).copied().unwrap_or(0) { [INFO] [stdout] 935 | return true; [INFO] [stdout] 936 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/spss/data.rs:940:9 [INFO] [stdout] | [INFO] [stdout] 940 | plan.missing_double_bits.iter().any(|b| *b == bits) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `plan.missing_double_bits.contains(&bits)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/spss/data.rs:1008:12 [INFO] [stdout] | [INFO] [stdout] 1008 | if plan.missing_double_bits.iter().any(|b| *b == bits) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `plan.missing_double_bits.contains(&bits)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1063:30 [INFO] [stdout] | [INFO] [stdout] 1063 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1081:30 [INFO] [stdout] | [INFO] [stdout] 1081 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/spss/data.rs:1104:1 [INFO] [stdout] | [INFO] [stdout] 1104 | / fn read_zsav_data_with_indicators( [INFO] [stdout] 1105 | | reader: &mut R, [INFO] [stdout] 1106 | | endian: Endian, [INFO] [stdout] 1107 | | bias: f64, [INFO] [stdout] ... | [INFO] [stdout] 1114 | | encoding: &'static encoding_rs::Encoding, [INFO] [stdout] 1115 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/stata/data.rs:1140:1 [INFO] [stdout] | [INFO] [stdout] 1140 | / pub fn read_data_frame_range_with_indicators( [INFO] [stdout] 1141 | | path: &Path, [INFO] [stdout] 1142 | | metadata: &Metadata, [INFO] [stdout] 1143 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 1153 | | indicator_suffix: &str, [INFO] [stdout] 1154 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/stata/data.rs:1156:23 [INFO] [stdout] | [INFO] [stdout] 1156 | let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 1156 - let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] 1156 + let data_offset = metadata.data_offset.ok_or(Error::MissingMetadata)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/spss/data.rs:1189:1 [INFO] [stdout] | [INFO] [stdout] 1189 | / pub fn read_data_frame_with_indicators( [INFO] [stdout] 1190 | | path: &Path, [INFO] [stdout] 1191 | | metadata: &Metadata, [INFO] [stdout] 1192 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 1200 | | indicator_col_names: &[Option], [INFO] [stdout] 1201 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/data.rs:1250:5 [INFO] [stdout] | [INFO] [stdout] 1250 | / for null_builder in null_builders { [INFO] [stdout] 1251 | | if let Some(b) = null_builder { [INFO] [stdout] 1252 | | cols.push(b.finish().into_series().into()); [INFO] [stdout] 1253 | | } [INFO] [stdout] 1254 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/data.rs:1251:9 [INFO] [stdout] | [INFO] [stdout] 1251 | / if let Some(b) = null_builder { [INFO] [stdout] 1252 | | cols.push(b.finish().into_series().into()); [INFO] [stdout] 1253 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1250 ~ for b in null_builders.into_iter().flatten() { [INFO] [stdout] 1251 + cols.push(b.finish().into_series().into()); [INFO] [stdout] 1252 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/stata/data.rs:1259:1 [INFO] [stdout] | [INFO] [stdout] 1259 | / fn append_value_tagged( [INFO] [stdout] 1260 | | builder: &mut ColumnBuilder, [INFO] [stdout] 1261 | | null_builder: &mut StringChunkedBuilder, [INFO] [stdout] 1262 | | var_type: &VarType, [INFO] [stdout] ... | [INFO] [stdout] 1272 | | use_value_labels: bool, [INFO] [stdout] 1273 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1282:47 [INFO] [stdout] | [INFO] [stdout] 1282 | null_builder.append_value(&indicator_from_offset(k, raw, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset(k, raw, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1294:47 [INFO] [stdout] | [INFO] [stdout] 1294 | null_builder.append_value(&indicator_from_offset(k, raw, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset(k, raw, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1306:47 [INFO] [stdout] | [INFO] [stdout] 1306 | null_builder.append_value(&indicator_from_offset(k, raw, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset(k, raw, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1319:47 [INFO] [stdout] | [INFO] [stdout] 1319 | null_builder.append_value(&indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/spss/data.rs:1367:48 [INFO] [stdout] | [INFO] [stdout] 1367 | for (b, ind_b) in builders.into_iter().zip(ind_builders.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] 1367 - for (b, ind_b) in builders.into_iter().zip(ind_builders.into_iter()) { [INFO] [stdout] 1367 + for (b, ind_b) in builders.into_iter().zip(ind_builders) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1331:47 [INFO] [stdout] | [INFO] [stdout] 1331 | null_builder.append_value(&indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 76 | let n = read_u32_tagged(reader, endian, b"", b"")?; [INFO] [stdout] | ---------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 77 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 76 ~ [INFO] [stdout] 77 ~ read_u32_tagged(reader, endian, b"", b"")? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 79 | let n = read_u16_tagged(reader, endian, b"", b"")? as u32; [INFO] [stdout] | ----------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 80 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 79 ~ [INFO] [stdout] 80 ~ (read_u16_tagged(reader, endian, b"", b"")? as u32) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/spss/data.rs:1713:1 [INFO] [stdout] | [INFO] [stdout] 1713 | / fn read_zsav_data( [INFO] [stdout] 1714 | | reader: &mut R, [INFO] [stdout] 1715 | | endian: Endian, [INFO] [stdout] 1716 | | bias: f64, [INFO] [stdout] ... | [INFO] [stdout] 1724 | | encoding: &'static encoding_rs::Encoding, [INFO] [stdout] 1725 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 84 | let n = read_u64_tagged(reader, endian, b"", b"")?; [INFO] [stdout] | ---------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 85 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 84 ~ [INFO] [stdout] 85 ~ read_u64_tagged(reader, endian, b"", b"")? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 87 | let n = read_u32_tagged(reader, endian, b"", b"")? as u64; [INFO] [stdout] | ----------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 88 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 87 ~ [INFO] [stdout] 88 ~ (read_u32_tagged(reader, endian, b"", b"")? as u64) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/stata/metadata.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | metadata.row_count = header.nobs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `stata::types::Metadata { row_count: header.nobs, byte_order: header.endian, encoding: encoding::default_encoding(header.version), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/stata/metadata.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | let mut metadata = Metadata::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: the loop variable `i` is used to index `typlist` [INFO] [stdout] --> src/stata/metadata.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..header.nvars as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 79 - for i in 0..header.nvars as usize { [INFO] [stdout] 79 + for (i, ) in typlist.iter().enumerate().take(header.nvars as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/spss/metadata.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | REC_TYPE_DICT_TERMINATION | _ => break, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/metadata.rs:63:34 [INFO] [stdout] | [INFO] [stdout] 63 | let padded = ((len + 3) / 4) * 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/stata/metadata.rs:279:14 [INFO] [stdout] | [INFO] [stdout] 279 | for i in 0..14 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 279 - for i in 0..14 { [INFO] [stdout] 279 + for in &mut map { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `typlist` [INFO] [stdout] --> src/stata/metadata.rs:307:18 [INFO] [stdout] | [INFO] [stdout] 307 | for i in 0..nvar { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 307 - for i in 0..nvar { [INFO] [stdout] 307 + for in typlist.iter_mut().take(nvar) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/metadata.rs:244:26 [INFO] [stdout] | [INFO] [stdout] 244 | let n_segments = (string_len + 251) / 252; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `string_len.div_ceil(252)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/metadata.rs:308:22 [INFO] [stdout] | [INFO] [stdout] 308 | let padded = ((len + 3) / 4) * 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/stata/metadata.rs:494:24 [INFO] [stdout] | [INFO] [stdout] 494 | if let Err(_) = read_tag(reader, b"") { [INFO] [stdout] | -------^^^^^^----------------------------- help: try: `if read_tag(reader, b"").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/spss/metadata.rs:429:52 [INFO] [stdout] | [INFO] [stdout] 429 | for (raw, label) in raw_values.into_iter().zip(labels.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] 429 - for (raw, label) in raw_values.into_iter().zip(labels.into_iter()) { [INFO] [stdout] 429 + for (raw, label) in raw_values.into_iter().zip(labels) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `off` [INFO] [stdout] --> src/stata/metadata.rs:550:22 [INFO] [stdout] | [INFO] [stdout] 550 | for i in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 550 - for i in 0..n { [INFO] [stdout] 550 + for in off.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/stata/value.rs:249:16 [INFO] [stdout] | [INFO] [stdout] 249 | if k >= 1 && k <= 26 { Some(k) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use: `(1..=26).contains(&k)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/stata/value.rs:272:16 [INFO] [stdout] | [INFO] [stdout] 272 | if diff >= 1 && diff <= 26 { Some(diff) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=26).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/stata/polars_output.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | / pub fn new( [INFO] [stdout] 107 | | path: PathBuf, [INFO] [stdout] 108 | | threads: Option, [INFO] [stdout] 109 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 115 | | informative_nulls: Option, [INFO] [stdout] 116 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/spss/polars_output.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub(crate) type SpssBatchIter = Box> + Send>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 87 | [INFO] [stdout] 88 | fn split_batch_ranges(total_batches: usize, n_workers: usize) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 105 | struct ParallelSpssBatchIter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 114 | impl Iterator for ParallelSpssBatchIter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | impl Drop for ParallelSpssBatchIter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 156 | struct SpssBackgroundIter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 161 | impl Iterator for SpssBackgroundIter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 169 | impl Drop for SpssBackgroundIter { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | / pub(crate) fn spss_batch_iter( [INFO] [stdout] 180 | | path: PathBuf, [INFO] [stdout] 181 | | threads: Option, [INFO] [stdout] 182 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 190 | | informative_nulls: Option, [INFO] [stdout] 191 | | ) -> PolarsResult { [INFO] [stdout] | |________________________________^ [INFO] [stdout] ... [INFO] [stdout] 210 | / pub(crate) fn spss_batch_iter_with_reader( [INFO] [stdout] 211 | | reader: &SpssReader, [INFO] [stdout] 212 | | path: PathBuf, [INFO] [stdout] 213 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 222 | | informative_nulls: Option, [INFO] [stdout] 223 | | ) -> PolarsResult { [INFO] [stdout] | |________________________________^ [INFO] [stdout] ... [INFO] [stdout] 582 | pub struct SpssScan { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 594 | impl SpssScan { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 620 | impl AnonymousScan for SpssScan { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 701 | fn build_schema(metadata: &crate::spss::types::Metadata, value_labels_as_strings: bool) -> Schema { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/spss/polars_output.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/spss/polars_output.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | / pub(crate) fn spss_batch_iter( [INFO] [stdout] 180 | | path: PathBuf, [INFO] [stdout] 181 | | threads: Option, [INFO] [stdout] 182 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 190 | | informative_nulls: Option, [INFO] [stdout] 191 | | ) -> PolarsResult { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/stata/polars_output.rs:223:1 [INFO] [stdout] | [INFO] [stdout] 223 | / pub(crate) fn stata_batch_iter( [INFO] [stdout] 224 | | path: PathBuf, [INFO] [stdout] 225 | | threads: Option, [INFO] [stdout] 226 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 234 | | informative_nulls: Option, [INFO] [stdout] 235 | | ) -> PolarsResult { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/spss/polars_output.rs:210:1 [INFO] [stdout] | [INFO] [stdout] 210 | / pub(crate) fn spss_batch_iter_with_reader( [INFO] [stdout] 211 | | reader: &SpssReader, [INFO] [stdout] 212 | | path: PathBuf, [INFO] [stdout] 213 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 222 | | informative_nulls: Option, [INFO] [stdout] 223 | | ) -> PolarsResult { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/stata/polars_output.rs:254:1 [INFO] [stdout] | [INFO] [stdout] 254 | / pub(crate) fn stata_batch_iter_with_reader( [INFO] [stdout] 255 | | reader: &StataReader, [INFO] [stdout] 256 | | path: PathBuf, [INFO] [stdout] 257 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 266 | | informative_nulls: Option, [INFO] [stdout] 267 | | ) -> PolarsResult { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/stata/polars_output.rs:316:28 [INFO] [stdout] | [INFO] [stdout] 316 | let total_chunks = (total + batch_size - 1) / batch_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `total.div_ceil(batch_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/polars_output.rs:349:28 [INFO] [stdout] | [INFO] [stdout] 349 | let total_chunks = (total + batch_size - 1) / batch_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `total.div_ceil(batch_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/stata/polars_output.rs:565:67 [INFO] [stdout] | [INFO] [stdout] 565 | let prefetch = crate::scan_prefetch::spawn_prefetcher(iter.map(|batch| batch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/spss/polars_output.rs:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | / pub fn new( [INFO] [stdout] 596 | | path: PathBuf, [INFO] [stdout] 597 | | threads: Option, [INFO] [stdout] 598 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 604 | | compress_opts: crate::CompressOptionsLite, [INFO] [stdout] 605 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/spss/polars_output.rs:643:67 [INFO] [stdout] | [INFO] [stdout] 643 | let prefetch = crate::scan_prefetch::spawn_prefetcher(iter.map(|batch| batch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/stata/arrow_output.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | let field = build_struct_field(&df.schema()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `df.schema()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/spss/reader.rs:130:13 [INFO] [stdout] | [INFO] [stdout] 130 | &self.reader, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `self.reader` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/spss/reader.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/stata/reader.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/spss/writer.rs:956:1 [INFO] [stdout] | [INFO] [stdout] 956 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1260 | fn anyvalue_to_f64(v: AnyValue) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1294 | fn write_name(writer: &mut W, name: &str) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1303 | fn write_u32(writer: &mut W, v: u32) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1308 | fn write_i32(writer: &mut W, v: i32) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1313 | fn encode_format(format_type: u8, width: u8, decimals: u8) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1317 | fn long_string_segment_count(string_len: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1325 | fn long_string_segment_sizes(string_len: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1335 | fn make_long_string_ghost_name(stem: &str, segment_index: usize) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1354 | fn write_spss_string_value(buf: &mut [u8], value: &[u8], declared_len: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/stata/writer.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 82 | if changed { [INFO] [stdout] | ____________________^ [INFO] [stdout] 83 | | out.push(col.clone()); [INFO] [stdout] 84 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/stata/writer.rs:84:16 [INFO] [stdout] | [INFO] [stdout] 84 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 85 | | out.push(col.clone()); [INFO] [stdout] 86 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/spss/writer.rs:304:5 [INFO] [stdout] | [INFO] [stdout] 304 | / for opt in utf8.into_iter() { [INFO] [stdout] 305 | | if let Some(s) = opt { [INFO] [stdout] 306 | | let s: &str = s; [INFO] [stdout] 307 | | let len = s.as_bytes().len(); [INFO] [stdout] ... | [INFO] [stdout] 312 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/spss/writer.rs:305:9 [INFO] [stdout] | [INFO] [stdout] 305 | / if let Some(s) = opt { [INFO] [stdout] 306 | | let s: &str = s; [INFO] [stdout] 307 | | let len = s.as_bytes().len(); [INFO] [stdout] 308 | | if len > max_len { [INFO] [stdout] ... | [INFO] [stdout] 311 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 304 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 305 + let s: &str = s; [INFO] [stdout] 306 + let len = s.as_bytes().len(); [INFO] [stdout] 307 + if len > max_len { [INFO] [stdout] 308 + max_len = len; [INFO] [stdout] 309 + } [INFO] [stdout] 310 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/spss/writer.rs:307:23 [INFO] [stdout] | [INFO] [stdout] 307 | let len = s.as_bytes().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/spss/writer.rs:322:8 [INFO] [stdout] | [INFO] [stdout] 322 | if name.as_bytes().len() > 64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/spss/writer.rs:331:27 [INFO] [stdout] | [INFO] [stdout] 331 | if name.is_empty() || name.as_bytes().len() > 8 || !name.is_ascii() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/spss/writer.rs:494:13 [INFO] [stdout] | [INFO] [stdout] 494 | / for opt in ca.into_iter() { [INFO] [stdout] 495 | | if let Some(s) = opt { [INFO] [stdout] 496 | | let (_, _, had_errors) = enc_1252.encode(s); [INFO] [stdout] 497 | | if had_errors { [INFO] [stdout] ... | [INFO] [stdout] 502 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/spss/writer.rs:495:17 [INFO] [stdout] | [INFO] [stdout] 495 | / if let Some(s) = opt { [INFO] [stdout] 496 | | let (_, _, had_errors) = enc_1252.encode(s); [INFO] [stdout] 497 | | if had_errors { [INFO] [stdout] 498 | | needs_utf8 = true; [INFO] [stdout] ... | [INFO] [stdout] 501 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 494 ~ for s in ca.into_iter().flatten() { [INFO] [stdout] 495 + let (_, _, had_errors) = enc_1252.encode(s); [INFO] [stdout] 496 + if had_errors { [INFO] [stdout] 497 + needs_utf8 = true; [INFO] [stdout] 498 + break; [INFO] [stdout] 499 + } [INFO] [stdout] 500 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:499:63 [INFO] [stdout] | [INFO] [stdout] 499 | let column = df.column(&col.name).map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/spss/writer.rs:587:1 [INFO] [stdout] | [INFO] [stdout] 587 | / fn write_very_long_segment_record( [INFO] [stdout] 588 | | writer: &mut W, [INFO] [stdout] 589 | | name: &str, [INFO] [stdout] 590 | | seg_size: usize, [INFO] [stdout] ... | [INFO] [stdout] 595 | | encoding: &'static encoding_rs::Encoding, [INFO] [stdout] 596 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/spss/writer.rs:667:18 [INFO] [stdout] | [INFO] [stdout] 667 | let padded = ((len + 3) / 4) * 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/stata/writer.rs:718:12 [INFO] [stdout] | [INFO] [stdout] 718 | if bytes.iter().any(|b| *b == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bytes.contains(&0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:742:37 [INFO] [stdout] | [INFO] [stdout] 742 | let utf8 = series.str().map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/writer.rs:744:5 [INFO] [stdout] | [INFO] [stdout] 744 | / for opt in utf8.into_iter() { [INFO] [stdout] 745 | | if let Some(s) = opt { [INFO] [stdout] 746 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 747 | | } [INFO] [stdout] 748 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/writer.rs:745:9 [INFO] [stdout] | [INFO] [stdout] 745 | / if let Some(s) = opt { [INFO] [stdout] 746 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 747 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 744 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 745 + max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 746 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/stata/writer.rs:746:35 [INFO] [stdout] | [INFO] [stdout] 746 | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:753:37 [INFO] [stdout] | [INFO] [stdout] 753 | let utf8 = series.str().map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/writer.rs:754:5 [INFO] [stdout] | [INFO] [stdout] 754 | / for opt in utf8.into_iter() { [INFO] [stdout] 755 | | if let Some(s) = opt { [INFO] [stdout] 756 | | if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] 757 | | return Ok(true); [INFO] [stdout] ... | [INFO] [stdout] 760 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/writer.rs:755:9 [INFO] [stdout] | [INFO] [stdout] 755 | / if let Some(s) = opt { [INFO] [stdout] 756 | | if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] 757 | | return Ok(true); [INFO] [stdout] 758 | | } [INFO] [stdout] 759 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 754 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 755 + if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] 756 + return Ok(true); [INFO] [stdout] 757 + } [INFO] [stdout] 758 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/stata/writer.rs:756:16 [INFO] [stdout] | [INFO] [stdout] 756 | if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.as_bytes().contains(&0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:765:37 [INFO] [stdout] | [INFO] [stdout] 765 | let utf8 = series.str().map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/writer.rs:766:5 [INFO] [stdout] | [INFO] [stdout] 766 | / for opt in utf8.into_iter() { [INFO] [stdout] 767 | | if let Some(s) = opt { [INFO] [stdout] 768 | | if s.ends_with(' ') { [INFO] [stdout] 769 | | return Ok(true); [INFO] [stdout] ... | [INFO] [stdout] 772 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/writer.rs:767:9 [INFO] [stdout] | [INFO] [stdout] 767 | / if let Some(s) = opt { [INFO] [stdout] 768 | | if s.ends_with(' ') { [INFO] [stdout] 769 | | return Ok(true); [INFO] [stdout] 770 | | } [INFO] [stdout] 771 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 766 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 767 + if s.ends_with(' ') { [INFO] [stdout] 768 + return Ok(true); [INFO] [stdout] 769 + } [INFO] [stdout] 770 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/spss/writer.rs:837:13 [INFO] [stdout] | [INFO] [stdout] 837 | col.string_len.min(255).max(1) as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `col.string_len.clamp(1, 255)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/spss/writer.rs:947:38 [INFO] [stdout] | [INFO] [stdout] 947 | writer.write_all(&buf)?; [INFO] [stdout] | ^^^^ help: change this to: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/spss/writer.rs:1072:34 [INFO] [stdout] | [INFO] [stdout] 1072 | (Null, String(r)) if r.is_empty() => true, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1072 - (Null, String(r)) if r.is_empty() => true, [INFO] [stdout] 1072 + (Null, String("")) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/spss/writer.rs:1073:34 [INFO] [stdout] | [INFO] [stdout] 1073 | (String(l), Null) if l.is_empty() => true, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1073 - (String(l), Null) if l.is_empty() => true, [INFO] [stdout] 1073 + (String(""), Null) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/stata/writer.rs:1306:20 [INFO] [stdout] | [INFO] [stdout] 1306 | let n_chunks = (nrows + chunk_rows - 1) / chunk_rows; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `nrows.div_ceil(chunk_rows)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:1379:58 [INFO] [stdout] | [INFO] [stdout] 1379 | let column = batch.column(&col.name).map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/stata/compress.rs:122:12 [INFO] [stdout] | [INFO] [stdout] 122 | if s.len() > 0 && s.null_count() == s.len() && opts.cast_all_null_to_boolean { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:231:13 [INFO] [stdout] | [INFO] [stdout] 231 | / for v in ca.into_iter() { [INFO] [stdout] 232 | | if let Some(v) = v { [INFO] [stdout] 233 | | if v.fract() != 0.0 { [INFO] [stdout] 234 | | return Ok(false); [INFO] [stdout] ... | [INFO] [stdout] 237 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:232:17 [INFO] [stdout] | [INFO] [stdout] 232 | / if let Some(v) = v { [INFO] [stdout] 233 | | if v.fract() != 0.0 { [INFO] [stdout] 234 | | return Ok(false); [INFO] [stdout] 235 | | } [INFO] [stdout] 236 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 231 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 232 + if v.fract() != 0.0 { [INFO] [stdout] 233 + return Ok(false); [INFO] [stdout] 234 + } [INFO] [stdout] 235 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:242:13 [INFO] [stdout] | [INFO] [stdout] 242 | / for v in ca.into_iter() { [INFO] [stdout] 243 | | if let Some(v) = v { [INFO] [stdout] 244 | | if v.fract() != 0.0 { [INFO] [stdout] 245 | | return Ok(false); [INFO] [stdout] ... | [INFO] [stdout] 248 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:243:17 [INFO] [stdout] | [INFO] [stdout] 243 | / if let Some(v) = v { [INFO] [stdout] 244 | | if v.fract() != 0.0 { [INFO] [stdout] 245 | | return Ok(false); [INFO] [stdout] 246 | | } [INFO] [stdout] 247 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 242 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 243 + if v.fract() != 0.0 { [INFO] [stdout] 244 + return Ok(false); [INFO] [stdout] 245 + } [INFO] [stdout] 246 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | / for v in ca.into_iter() { [INFO] [stdout] 263 | | if let Some(v) = v { [INFO] [stdout] 264 | | let v = v as f64; [INFO] [stdout] 265 | | any = true; [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:263:17 [INFO] [stdout] | [INFO] [stdout] 263 | / if let Some(v) = v { [INFO] [stdout] 264 | | let v = v as f64; [INFO] [stdout] 265 | | any = true; [INFO] [stdout] 266 | | if v < min { [INFO] [stdout] ... | [INFO] [stdout] 272 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 262 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 263 + let v = v as f64; [INFO] [stdout] 264 + any = true; [INFO] [stdout] 265 + if v < min { [INFO] [stdout] 266 + min = v; [INFO] [stdout] 267 + } [INFO] [stdout] 268 + if v > max { [INFO] [stdout] 269 + max = v; [INFO] [stdout] 270 + } [INFO] [stdout] 271 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:277:13 [INFO] [stdout] | [INFO] [stdout] 277 | / for v in ca.into_iter() { [INFO] [stdout] 278 | | if let Some(v) = v { [INFO] [stdout] 279 | | any = true; [INFO] [stdout] 280 | | if v < min { [INFO] [stdout] ... | [INFO] [stdout] 287 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:278:17 [INFO] [stdout] | [INFO] [stdout] 278 | / if let Some(v) = v { [INFO] [stdout] 279 | | any = true; [INFO] [stdout] 280 | | if v < min { [INFO] [stdout] 281 | | min = v; [INFO] [stdout] ... | [INFO] [stdout] 286 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 277 ~ for v in ca.into_iter().flatten() { [INFO] [stdout] 278 + any = true; [INFO] [stdout] 279 + if v < min { [INFO] [stdout] 280 + min = v; [INFO] [stdout] 281 + } [INFO] [stdout] 282 + if v > max { [INFO] [stdout] 283 + max = v; [INFO] [stdout] 284 + } [INFO] [stdout] 285 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/compress.rs:342:5 [INFO] [stdout] | [INFO] [stdout] 342 | / for v in ca.phys.iter() { [INFO] [stdout] 343 | | if let Some(v) = v { [INFO] [stdout] 344 | | let millis = match unit { [INFO] [stdout] 345 | | TimeUnit::Milliseconds => v, [INFO] [stdout] ... | [INFO] [stdout] 353 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/compress.rs:343:9 [INFO] [stdout] | [INFO] [stdout] 343 | / if let Some(v) = v { [INFO] [stdout] 344 | | let millis = match unit { [INFO] [stdout] 345 | | TimeUnit::Milliseconds => v, [INFO] [stdout] 346 | | TimeUnit::Microseconds => v / 1_000, [INFO] [stdout] ... | [INFO] [stdout] 352 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 342 ~ for v in ca.phys.iter().flatten() { [INFO] [stdout] 343 + let millis = match unit { [INFO] [stdout] 344 + TimeUnit::Milliseconds => v, [INFO] [stdout] 345 + TimeUnit::Microseconds => v / 1_000, [INFO] [stdout] 346 + TimeUnit::Nanoseconds => v / 1_000_000, [INFO] [stdout] 347 + }; [INFO] [stdout] 348 + if millis % day_ms != 0 { [INFO] [stdout] 349 + return Ok(false); [INFO] [stdout] 350 + } [INFO] [stdout] 351 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/stata/data.rs:50:1 [INFO] [stdout] | [INFO] [stdout] 50 | / pub fn read_data_frame_range( [INFO] [stdout] 51 | | path: &Path, [INFO] [stdout] 52 | | metadata: &Metadata, [INFO] [stdout] 53 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 60 | | shared: &SharedDecode, [INFO] [stdout] 61 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/stata/data.rs:63:23 [INFO] [stdout] | [INFO] [stdout] 63 | let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 63 - let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] 63 + let data_offset = metadata.data_offset.ok_or(Error::MissingMetadata)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/lib.rs:153:1 [INFO] [stdout] | [INFO] [stdout] 153 | / impl Default for CompressOptionsLite { [INFO] [stdout] 154 | | fn default() -> Self { [INFO] [stdout] 155 | | Self { [INFO] [stdout] 156 | | enabled: false, [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [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] 145 + #[derive(Default)] [INFO] [stdout] 146 | pub struct CompressOptionsLite { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/stata/data.rs:168:40 [INFO] [stdout] | [INFO] [stdout] 168 | ... } else if var.name == "utf8_strl" { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 169 | | ... if o > 5 { [INFO] [stdout] 170 | | ... b.append_value(""); [INFO] [stdout] 171 | | ... continue; [INFO] [stdout] 172 | | ... } [INFO] [stdout] 173 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information 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 ~ } else if var.name == "utf8_strl" [INFO] [stdout] 169 ~ && o > 5 { [INFO] [stdout] 170 | b.append_value(""); [INFO] [stdout] 171 | continue; [INFO] [stdout] 172 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/stata/data.rs:224:1 [INFO] [stdout] | [INFO] [stdout] 224 | / pub fn read_data_frame_streaming( [INFO] [stdout] 225 | | path: &Path, [INFO] [stdout] 226 | | metadata: &Metadata, [INFO] [stdout] 227 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 236 | | on_batch: &mut dyn FnMut(DataFrame) -> bool, [INFO] [stdout] 237 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/stata/data.rs:239:23 [INFO] [stdout] | [INFO] [stdout] 239 | let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 239 - let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] 239 + let data_offset = metadata.data_offset.ok_or(Error::MissingMetadata)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/lib.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | compress_opts.compress_numeric = opts.compress_numeric; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `stata::compress::CompressOptions { compress_numeric: opts.compress_numeric, check_date_time: opts.datetime_to_date, check_string: opts.string_to_numeric, check_string_only: false, cast_all_null_to_boolean: true, no_boolean: false, cols: opts.cols.clone(), use_stata_bounds: false }` and removing relevant reassignments [INFO] [stdout] --> src/lib.rs:401:5 [INFO] [stdout] | [INFO] [stdout] 401 | let mut compress_opts = CompressOptions::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/stata/data.rs:396:44 [INFO] [stdout] | [INFO] [stdout] 396 | ... } else if var.name == "utf8_strl" { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 397 | | ... if o > 5 { [INFO] [stdout] 398 | | ... b.append_value(""); [INFO] [stdout] 399 | | ... continue; [INFO] [stdout] 400 | | ... } [INFO] [stdout] 401 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 396 ~ } else if var.name == "utf8_strl" [INFO] [stdout] 397 ~ && o > 5 { [INFO] [stdout] 398 | b.append_value(""); [INFO] [stdout] 399 | continue; [INFO] [stdout] 400 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/stata/writer.rs:1684:26 [INFO] [stdout] | [INFO] [stdout] 1684 | writer.write_all(&vec![0u8; DTA_VALUE_LABEL_PADDING_LEN])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0u8; DTA_VALUE_LABEL_PADDING_LEN]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/stata/data.rs:498:1 [INFO] [stdout] | [INFO] [stdout] 498 | / fn read_numeric_only( [INFO] [stdout] 499 | | reader: &mut BufReader, [INFO] [stdout] 500 | | builders: &mut [ColumnBuilder], [INFO] [stdout] 501 | | plans: &[NumericPlan], [INFO] [stdout] ... | [INFO] [stdout] 507 | | rules: crate::stata::value::MissingRules, [INFO] [stdout] 508 | | ) -> Result { [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/stata/data.rs:570:6 [INFO] [stdout] | [INFO] [stdout] 570 | ) -> Result<( [INFO] [stdout] | ______^ [INFO] [stdout] 571 | | Vec, [INFO] [stdout] 572 | | Vec, [INFO] [stdout] 573 | | Vec, [INFO] [stdout] ... | [INFO] [stdout] 576 | | Vec>, [INFO] [stdout] 577 | | )> { [INFO] [stdout] | |__^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/stata/data.rs:654:1 [INFO] [stdout] | [INFO] [stdout] 654 | / fn append_value( [INFO] [stdout] 655 | | builder: &mut ColumnBuilder, [INFO] [stdout] 656 | | var_type: &VarType, [INFO] [stdout] 657 | | buf: &[u8], [INFO] [stdout] ... | [INFO] [stdout] 665 | | scratch: Option<&mut StringScratch>, [INFO] [stdout] 666 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: checking if a string is ascii using iterators [INFO] [stdout] --> src/stata/data.rs:838:17 [INFO] [stdout] | [INFO] [stdout] 838 | let ascii = s.chars().all(|c| c.is_ascii()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.is_ascii()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_character_iteration [INFO] [stdout] = note: `#[warn(clippy::needless_character_iteration)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1063:30 [INFO] [stdout] | [INFO] [stdout] 1063 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1081:30 [INFO] [stdout] | [INFO] [stdout] 1081 | builder.append_value(&v.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/stata/data.rs:1140:1 [INFO] [stdout] | [INFO] [stdout] 1140 | / pub fn read_data_frame_range_with_indicators( [INFO] [stdout] 1141 | | path: &Path, [INFO] [stdout] 1142 | | metadata: &Metadata, [INFO] [stdout] 1143 | | endian: Endian, [INFO] [stdout] ... | [INFO] [stdout] 1153 | | indicator_suffix: &str, [INFO] [stdout] 1154 | | ) -> Result { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/stata/data.rs:1156:23 [INFO] [stdout] | [INFO] [stdout] 1156 | let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 1156 - let data_offset = metadata.data_offset.ok_or_else(|| Error::MissingMetadata)?; [INFO] [stdout] 1156 + let data_offset = metadata.data_offset.ok_or(Error::MissingMetadata)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/data.rs:1250:5 [INFO] [stdout] | [INFO] [stdout] 1250 | / for null_builder in null_builders { [INFO] [stdout] 1251 | | if let Some(b) = null_builder { [INFO] [stdout] 1252 | | cols.push(b.finish().into_series().into()); [INFO] [stdout] 1253 | | } [INFO] [stdout] 1254 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/data.rs:1251:9 [INFO] [stdout] | [INFO] [stdout] 1251 | / if let Some(b) = null_builder { [INFO] [stdout] 1252 | | cols.push(b.finish().into_series().into()); [INFO] [stdout] 1253 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1250 ~ for b in null_builders.into_iter().flatten() { [INFO] [stdout] 1251 + cols.push(b.finish().into_series().into()); [INFO] [stdout] 1252 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (13/7) [INFO] [stdout] --> src/stata/data.rs:1259:1 [INFO] [stdout] | [INFO] [stdout] 1259 | / fn append_value_tagged( [INFO] [stdout] 1260 | | builder: &mut ColumnBuilder, [INFO] [stdout] 1261 | | null_builder: &mut StringChunkedBuilder, [INFO] [stdout] 1262 | | var_type: &VarType, [INFO] [stdout] ... | [INFO] [stdout] 1272 | | use_value_labels: bool, [INFO] [stdout] 1273 | | ) -> Result<()> { [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1282:47 [INFO] [stdout] | [INFO] [stdout] 1282 | null_builder.append_value(&indicator_from_offset(k, raw, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset(k, raw, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1294:47 [INFO] [stdout] | [INFO] [stdout] 1294 | null_builder.append_value(&indicator_from_offset(k, raw, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset(k, raw, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1306:47 [INFO] [stdout] | [INFO] [stdout] 1306 | null_builder.append_value(&indicator_from_offset(k, raw, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset(k, raw, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1319:47 [INFO] [stdout] | [INFO] [stdout] 1319 | null_builder.append_value(&indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/stata/data.rs:1331:47 [INFO] [stdout] | [INFO] [stdout] 1331 | null_builder.append_value(&indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `indicator_from_offset_f(k, raw_bits, label_map, use_value_labels)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 76 | let n = read_u32_tagged(reader, endian, b"", b"")?; [INFO] [stdout] | ---------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 77 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 76 ~ [INFO] [stdout] 77 ~ read_u32_tagged(reader, endian, b"", b"")? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 79 | let n = read_u16_tagged(reader, endian, b"", b"")? as u32; [INFO] [stdout] | ----------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 80 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 79 ~ [INFO] [stdout] 80 ~ (read_u16_tagged(reader, endian, b"", b"")? as u32) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 84 | let n = read_u64_tagged(reader, endian, b"", b"")?; [INFO] [stdout] | ---------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 85 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 84 ~ [INFO] [stdout] 85 ~ read_u64_tagged(reader, endian, b"", b"")? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/stata/header.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 87 | let n = read_u32_tagged(reader, endian, b"", b"")? as u64; [INFO] [stdout] | ----------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 88 | n [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 87 ~ [INFO] [stdout] 88 ~ (read_u32_tagged(reader, endian, b"", b"")? as u64) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/stata/metadata.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | metadata.row_count = header.nobs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `stata::types::Metadata { row_count: header.nobs, byte_order: header.endian, encoding: encoding::default_encoding(header.version), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/stata/metadata.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | let mut metadata = Metadata::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: the loop variable `i` is used to index `typlist` [INFO] [stdout] --> src/stata/metadata.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..header.nvars as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 79 - for i in 0..header.nvars as usize { [INFO] [stdout] 79 + for (i, ) in typlist.iter().enumerate().take(header.nvars as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/stata/metadata.rs:279:14 [INFO] [stdout] | [INFO] [stdout] 279 | for i in 0..14 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 279 - for i in 0..14 { [INFO] [stdout] 279 + for in &mut map { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `typlist` [INFO] [stdout] --> src/stata/metadata.rs:307:18 [INFO] [stdout] | [INFO] [stdout] 307 | for i in 0..nvar { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 307 - for i in 0..nvar { [INFO] [stdout] 307 + for in typlist.iter_mut().take(nvar) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/stata/metadata.rs:494:24 [INFO] [stdout] | [INFO] [stdout] 494 | if let Err(_) = read_tag(reader, b"") { [INFO] [stdout] | -------^^^^^^----------------------------- help: try: `if read_tag(reader, b"").is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `off` [INFO] [stdout] --> src/stata/metadata.rs:550:22 [INFO] [stdout] | [INFO] [stdout] 550 | for i in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 550 - for i in 0..n { [INFO] [stdout] 550 + for in off.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/stata/value.rs:249:16 [INFO] [stdout] | [INFO] [stdout] 249 | if k >= 1 && k <= 26 { Some(k) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use: `(1..=26).contains(&k)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/stata/value.rs:272:16 [INFO] [stdout] | [INFO] [stdout] 272 | if diff >= 1 && diff <= 26 { Some(diff) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=26).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/stata/polars_output.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/stata/polars_output.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | / pub fn new( [INFO] [stdout] 107 | | path: PathBuf, [INFO] [stdout] 108 | | threads: Option, [INFO] [stdout] 109 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 115 | | informative_nulls: Option, [INFO] [stdout] 116 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/stata/polars_output.rs:223:1 [INFO] [stdout] | [INFO] [stdout] 223 | / pub(crate) fn stata_batch_iter( [INFO] [stdout] 224 | | path: PathBuf, [INFO] [stdout] 225 | | threads: Option, [INFO] [stdout] 226 | | missing_string_as_null: bool, [INFO] [stdout] ... | [INFO] [stdout] 234 | | informative_nulls: Option, [INFO] [stdout] 235 | | ) -> PolarsResult { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/stata/polars_output.rs:254:1 [INFO] [stdout] | [INFO] [stdout] 254 | / pub(crate) fn stata_batch_iter_with_reader( [INFO] [stdout] 255 | | reader: &StataReader, [INFO] [stdout] 256 | | path: PathBuf, [INFO] [stdout] 257 | | threads: Option, [INFO] [stdout] ... | [INFO] [stdout] 266 | | informative_nulls: Option, [INFO] [stdout] 267 | | ) -> PolarsResult { [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/stata/polars_output.rs:316:28 [INFO] [stdout] | [INFO] [stdout] 316 | let total_chunks = (total + batch_size - 1) / batch_size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `total.div_ceil(batch_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/stata/polars_output.rs:565:67 [INFO] [stdout] | [INFO] [stdout] 565 | let prefetch = crate::scan_prefetch::spawn_prefetcher(iter.map(|batch| batch)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/stata/arrow_output.rs:70:36 [INFO] [stdout] | [INFO] [stdout] 70 | let field = build_struct_field(&df.schema()); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `df.schema()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/stata/reader.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/stata/writer.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 82 | if changed { [INFO] [stdout] | ____________________^ [INFO] [stdout] 83 | | out.push(col.clone()); [INFO] [stdout] 84 | | } else { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/stata/writer.rs:84:16 [INFO] [stdout] | [INFO] [stdout] 84 | } else { [INFO] [stdout] | ________________^ [INFO] [stdout] 85 | | out.push(col.clone()); [INFO] [stdout] 86 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:499:63 [INFO] [stdout] | [INFO] [stdout] 499 | let column = df.column(&col.name).map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/stata/writer.rs:718:12 [INFO] [stdout] | [INFO] [stdout] 718 | if bytes.iter().any(|b| *b == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bytes.contains(&0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:742:37 [INFO] [stdout] | [INFO] [stdout] 742 | let utf8 = series.str().map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/writer.rs:744:5 [INFO] [stdout] | [INFO] [stdout] 744 | / for opt in utf8.into_iter() { [INFO] [stdout] 745 | | if let Some(s) = opt { [INFO] [stdout] 746 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 747 | | } [INFO] [stdout] 748 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/writer.rs:745:9 [INFO] [stdout] | [INFO] [stdout] 745 | / if let Some(s) = opt { [INFO] [stdout] 746 | | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 747 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 744 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 745 + max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] 746 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/stata/writer.rs:746:35 [INFO] [stdout] | [INFO] [stdout] 746 | max_len = max_len.max(s.as_bytes().len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `s.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:753:37 [INFO] [stdout] | [INFO] [stdout] 753 | let utf8 = series.str().map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/writer.rs:754:5 [INFO] [stdout] | [INFO] [stdout] 754 | / for opt in utf8.into_iter() { [INFO] [stdout] 755 | | if let Some(s) = opt { [INFO] [stdout] 756 | | if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] 757 | | return Ok(true); [INFO] [stdout] ... | [INFO] [stdout] 760 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/writer.rs:755:9 [INFO] [stdout] | [INFO] [stdout] 755 | / if let Some(s) = opt { [INFO] [stdout] 756 | | if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] 757 | | return Ok(true); [INFO] [stdout] 758 | | } [INFO] [stdout] 759 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 754 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 755 + if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] 756 + return Ok(true); [INFO] [stdout] 757 + } [INFO] [stdout] 758 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/stata/writer.rs:756:16 [INFO] [stdout] | [INFO] [stdout] 756 | if s.as_bytes().iter().any(|b| *b == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.as_bytes().contains(&0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:765:37 [INFO] [stdout] | [INFO] [stdout] 765 | let utf8 = series.str().map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/stata/writer.rs:766:5 [INFO] [stdout] | [INFO] [stdout] 766 | / for opt in utf8.into_iter() { [INFO] [stdout] 767 | | if let Some(s) = opt { [INFO] [stdout] 768 | | if s.ends_with(' ') { [INFO] [stdout] 769 | | return Ok(true); [INFO] [stdout] ... | [INFO] [stdout] 772 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/stata/writer.rs:767:9 [INFO] [stdout] | [INFO] [stdout] 767 | / if let Some(s) = opt { [INFO] [stdout] 768 | | if s.ends_with(' ') { [INFO] [stdout] 769 | | return Ok(true); [INFO] [stdout] 770 | | } [INFO] [stdout] 771 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 766 ~ for s in utf8.into_iter().flatten() { [INFO] [stdout] 767 + if s.ends_with(' ') { [INFO] [stdout] 768 + return Ok(true); [INFO] [stdout] 769 + } [INFO] [stdout] 770 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/stata/writer.rs:1306:20 [INFO] [stdout] | [INFO] [stdout] 1306 | let n_chunks = (nrows + chunk_rows - 1) / chunk_rows; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `nrows.div_ceil(chunk_rows)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/stata/writer.rs:1379:58 [INFO] [stdout] | [INFO] [stdout] 1379 | let column = batch.column(&col.name).map_err(|e| Error::Polars(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::Polars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> benches/readstat_stream_benchmarks.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | while let Some(batch) = iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for batch in iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/lib.rs:153:1 [INFO] [stdout] | [INFO] [stdout] 153 | / impl Default for CompressOptionsLite { [INFO] [stdout] 154 | | fn default() -> Self { [INFO] [stdout] 155 | | Self { [INFO] [stdout] 156 | | enabled: false, [INFO] [stdout] ... | [INFO] [stdout] 163 | | } [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] 145 + #[derive(Default)] [INFO] [stdout] 146 | pub struct CompressOptionsLite { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/lib.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | compress_opts.compress_numeric = opts.compress_numeric; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `stata::compress::CompressOptions { compress_numeric: opts.compress_numeric, check_date_time: opts.datetime_to_date, check_string: opts.string_to_numeric, check_string_only: false, cast_all_null_to_boolean: true, no_boolean: false, cols: opts.cols.clone(), use_stata_bounds: false }` and removing relevant reassignments [INFO] [stdout] --> src/lib.rs:401:5 [INFO] [stdout] | [INFO] [stdout] 401 | let mut compress_opts = CompressOptions::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: useless use of `vec!` [INFO] [stdout] --> src/stata/writer.rs:1684:26 [INFO] [stdout] | [INFO] [stdout] 1684 | writer.write_all(&vec![0u8; DTA_VALUE_LABEL_PADDING_LEN])?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0u8; DTA_VALUE_LABEL_PADDING_LEN]` [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> examples/readstat_dump_parquet.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | opts.missing_string_as_null = Some(false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `polars_readstat_rs::ScanOptions { missing_string_as_null: Some(false), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> examples/readstat_dump_parquet.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | let mut opts = ScanOptions::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: this loop could be written as a `for` loop [INFO] [stdout] --> tests/streaming.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | while let Some(df) = stream.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for df in stream` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> tests/streaming.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 143 | while let Some(df) = stream.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for df in stream` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> examples/readstat_scan_options.rs:116:48 [INFO] [stdout] | [INFO] [stdout] 116 | let exprs: Vec = cols.iter().map(|c| col(c)).collect(); [INFO] [stdout] | ^^^^^^^^^^ help: replace the closure with the function itself: `col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> tests/stata/stata_compress.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | opts.check_string = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `polars_readstat_rs::CompressOptions { check_string: false, compress_numeric: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/stata/stata_compress.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | let mut opts = CompressOptions::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] --> tests/stata/stata_compress.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | opts.check_string = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `polars_readstat_rs::CompressOptions { check_string: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/stata/stata_compress.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | let mut opts = CompressOptions::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] --> tests/stata/stata_compress.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | opts.check_string = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `polars_readstat_rs::CompressOptions { check_string: true, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> tests/stata/stata_compress.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | let mut opts = CompressOptions::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: redundant guard [INFO] [stdout] --> tests/spss/spss_writer_roundtrip.rs:99:30 [INFO] [stdout] | [INFO] [stdout] 99 | (Null, String(r)) if r.is_empty() => true, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 99 - (Null, String(r)) if r.is_empty() => true, [INFO] [stdout] 99 + (Null, String("")) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> tests/spss/spss_writer_roundtrip.rs:100:30 [INFO] [stdout] | [INFO] [stdout] 100 | (String(l), Null) if l.is_empty() => true, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 100 - (String(l), Null) if l.is_empty() => true, [INFO] [stdout] 100 + (String(""), Null) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> tests/stata/stata_writer_roundtrip.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | / for opt in utf8.into_iter() { [INFO] [stdout] 49 | | if let Some(v) = opt { [INFO] [stdout] 50 | | max_len = max_len.max(v.len()); [INFO] [stdout] 51 | | } [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> tests/stata/stata_writer_roundtrip.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | / if let Some(v) = opt { [INFO] [stdout] 50 | | max_len = max_len.max(v.len()); [INFO] [stdout] 51 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 48 ~ for v in utf8.into_iter().flatten() { [INFO] [stdout] 49 + max_len = max_len.max(v.len()); [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> tests/stata/stata_writer_roundtrip.rs:164:30 [INFO] [stdout] | [INFO] [stdout] 164 | (Null, String(r)) if r.is_empty() => true, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 164 - (Null, String(r)) if r.is_empty() => true, [INFO] [stdout] 164 + (Null, String("")) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> tests/stata/stata_writer_roundtrip.rs:165:30 [INFO] [stdout] | [INFO] [stdout] 165 | (String(l), Null) if l.is_empty() => true, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 - (String(l), Null) if l.is_empty() => true, [INFO] [stdout] 165 + (String(""), Null) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 00s [INFO] running `Command { std: "docker" "inspect" "28adf1eaa8ef216fae61642c151e7ebb834f7093ab7ceac3c3f0b99b778231ff", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "28adf1eaa8ef216fae61642c151e7ebb834f7093ab7ceac3c3f0b99b778231ff", kill_on_drop: false }` [INFO] [stdout] 28adf1eaa8ef216fae61642c151e7ebb834f7093ab7ceac3c3f0b99b778231ff