[INFO] cloning repository https://github.com/predomics/gpredomics [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/predomics/gpredomics" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpredomics%2Fgpredomics", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpredomics%2Fgpredomics'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 612187867689f4eb25bdc1e2e96de5c853d0eb02 [INFO] linting predomics/gpredomics against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpredomics%2Fgpredomics" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-6-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/predomics/gpredomics [INFO] finished tweaking git repo https://github.com/predomics/gpredomics [INFO] tweaked toml for git repo https://github.com/predomics/gpredomics written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/predomics/gpredomics on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/predomics/gpredomics 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 foldhash v0.1.4 [INFO] [stderr] Downloaded document-features v0.2.10 [INFO] [stderr] Downloaded is-terminal v0.4.13 [INFO] [stderr] Downloaded fishers_exact v1.0.1 [INFO] [stderr] Downloaded bytemuck_derive v1.8.1 [INFO] [stderr] Downloaded nu-ansi-term v0.49.0 [INFO] [stderr] Downloaded rmp v0.8.14 [INFO] [stderr] Downloaded argmin-math v0.4.0 [INFO] [stderr] Downloaded fast-float v0.2.0 [INFO] [stderr] Downloaded matrixmultiply v0.3.9 [INFO] [stderr] Downloaded cc v1.2.6 [INFO] [stderr] Downloaded wide v0.7.30 [INFO] [stderr] Downloaded argmin v0.10.0 [INFO] [stderr] Downloaded statrs v0.18.0 [INFO] [stderr] Downloaded wgpu v24.0.1 [INFO] [stderr] Downloaded simba v0.9.0 [INFO] [stderr] Downloaded bytemuck v1.21.0 [INFO] [stderr] Downloaded rmp-serde v1.3.0 [INFO] [stderr] Downloaded flexi_logger v0.27.4 [INFO] [stderr] Downloaded wgpu-core v24.0.0 [INFO] [stderr] Downloaded syn v2.0.92 [INFO] [stderr] Downloaded wgpu-hal v24.0.0 [INFO] [stderr] Downloaded nalgebra v0.33.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 9ac65dcbd10677860bbabccd3c8b347ca0e1514faa004be35b1ee3df9313e13b [INFO] running `Command { std: "docker" "start" "-a" "9ac65dcbd10677860bbabccd3c8b347ca0e1514faa004be35b1ee3df9313e13b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9ac65dcbd10677860bbabccd3c8b347ca0e1514faa004be35b1ee3df9313e13b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ac65dcbd10677860bbabccd3c8b347ca0e1514faa004be35b1ee3df9313e13b", kill_on_drop: false }` [INFO] [stdout] 9ac65dcbd10677860bbabccd3c8b347ca0e1514faa004be35b1ee3df9313e13b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 420c9ec1222fbce03745e4f9c29fe73437c3cf8d3ca85a322a4a7db5f4b5826f [INFO] running `Command { std: "docker" "start" "-a" "420c9ec1222fbce03745e4f9c29fe73437c3cf8d3ca85a322a4a7db5f4b5826f", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling libm v0.2.11 [INFO] [stderr] Compiling serde v1.0.216 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking foldhash v0.1.4 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Compiling rustversion v1.0.19 [INFO] [stderr] Compiling thiserror v2.0.11 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Compiling naga v24.0.0 [INFO] [stderr] Checking libloading v0.8.6 [INFO] [stderr] Compiling syn v2.0.92 [INFO] [stderr] Compiling khronos-egl v6.0.0 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking termcolor v1.4.1 [INFO] [stderr] Checking unicode-width v0.1.14 [INFO] [stderr] Compiling ash v0.38.0+1.3.281 [INFO] [stderr] Checking codespan-reporting v0.11.1 [INFO] [stderr] Compiling matrixmultiply v0.3.9 [INFO] [stderr] Compiling wgpu-hal v24.0.0 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Checking unicode-xid v0.2.6 [INFO] [stderr] Checking hexf-parse v0.2.1 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Compiling wgpu-core v24.0.0 [INFO] [stderr] Checking glow v0.16.0 [INFO] [stderr] Checking renderdoc-sys v1.1.0 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking profiling v1.0.16 [INFO] [stderr] Compiling litrs v0.4.1 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking ordered-float v4.6.0 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Compiling wgpu v24.0.1 [INFO] [stderr] Compiling signal-hook v0.3.17 [INFO] [stderr] Checking iana-time-zone v0.1.61 [INFO] [stderr] Compiling document-features v0.2.10 [INFO] [stderr] Checking clap_builder v4.5.41 [INFO] [stderr] Checking rmp v0.8.14 [INFO] [stderr] Checking chrono v0.4.39 [INFO] [stderr] Checking rand_xoshiro v0.6.0 [INFO] [stderr] Checking is-terminal v0.4.13 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling rustix v1.1.2 [INFO] [stderr] Checking static_assertions v1.1.0 [INFO] [stderr] Checking nu-ansi-term v0.49.0 [INFO] [stderr] Checking glob v0.3.1 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Compiling gpredomics v0.8.1 (/opt/rustwide/workdir) [INFO] [stderr] Checking unsafe-libyaml v0.2.11 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking pollster v0.4.0 [INFO] [stderr] Checking fast-float v0.2.0 [INFO] [stderr] Checking fishers_exact v1.0.1 [INFO] [stderr] Compiling serde_derive v1.0.216 [INFO] [stderr] Compiling bytemuck_derive v1.8.1 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling thiserror-impl v2.0.11 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling clap_derive v4.5.41 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking flexi_logger v0.27.4 [INFO] [stderr] Checking clap v4.5.41 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking wide v0.7.30 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking rand_distr v0.4.3 [INFO] [stderr] Checking argmin-math v0.4.0 [INFO] [stderr] Checking argmin v0.10.0 [INFO] [stderr] Checking simba v0.9.0 [INFO] [stderr] Checking bitflags v2.8.0 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking rmp-serde v1.3.0 [INFO] [stderr] Checking serde_json v1.0.134 [INFO] [stderr] Checking gpu-descriptor-types v0.2.0 [INFO] [stderr] Checking gpu-alloc-types v0.3.0 [INFO] [stderr] Checking spirv v0.3.0+sdk-1.3.268.0 [INFO] [stderr] Checking gpu-alloc v0.6.0 [INFO] [stderr] Checking gpu-descriptor v0.3.1 [INFO] [stderr] Checking wgpu-types v24.0.0 [INFO] [stderr] Checking toml v0.5.11 [INFO] [stderr] Checking nalgebra v0.33.2 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking statrs v0.18.0 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | validation_folds: validation_folds, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validation_folds` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | training_sets: training_sets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `training_sets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | validation_folds: validation_folds, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validation_folds` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | training_sets: training_sets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `training_sets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:407:13 [INFO] [stdout] | [INFO] [stdout] 407 | importances: importances, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `importances` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:624:13 [INFO] [stdout] | [INFO] [stdout] 624 | fold_collections: fold_collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `fold_collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data.rs:1273:13 [INFO] [stdout] | [INFO] [stdout] 1273 | X: X, [INFO] [stdout] | ^^^^ help: replace it with: `X` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data.rs:1284:13 [INFO] [stdout] | [INFO] [stdout] 1284 | sample_annotations: sample_annotations, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sample_annotations` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data.rs:1299:13 [INFO] [stdout] | [INFO] [stdout] 1299 | X: X, [INFO] [stdout] | ^^^^ help: replace it with: `X` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/experiment.rs:759:59 [INFO] [stdout] | [INFO] [stdout] 759 | self.others = Some(ExperimentMetadata::Jury { jury: jury }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `jury` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/param.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / #[allow(non_camel_case_types)] [INFO] [stdout] 11 | | [INFO] [stdout] | |_^ [INFO] [stdout] 12 | /// Fit function options for model evaluation [INFO] [stdout] 13 | pub enum FitFunction { [INFO] [stdout] | -------------------- the attribute applies to this enum [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/param.rs:921:1 [INFO] [stdout] | [INFO] [stdout] 921 | / /// Default value definitions [INFO] [stdout] 922 | | [INFO] [stdout] | |_^ [INFO] [stdout] 923 | fn seed_default() -> u64 { [INFO] [stdout] | --------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bayesian_mcmc.rs:557:13 [INFO] [stdout] | [INFO] [stdout] 557 | param: param, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `param` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bayesian_mcmc.rs:1036:17 [INFO] [stdout] | [INFO] [stdout] 1036 | bp: bp, [INFO] [stdout] | ^^^^^^ help: replace it with: `bp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bayesian_mcmc.rs:1037:17 [INFO] [stdout] | [INFO] [stdout] 1037 | i: i, [INFO] [stdout] | ^^^^ help: replace it with: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/beam.rs:662:9 [INFO] [stdout] | [INFO] [stdout] 662 | language: language, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/beam.rs:663:9 [INFO] [stdout] | [INFO] [stdout] 663 | data_type: data_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:229:9 [INFO] [stdout] | [INFO] [stdout] 229 | gpredomics_version: gpredomics_version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gpredomics_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | test_data: test_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `test_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 236 | collections: collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | cv_folds_ids: cv_folds_ids, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cv_folds_ids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:372:9 [INFO] [stdout] | [INFO] [stdout] 372 | gpredomics_version: gpredomics_version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gpredomics_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:376:9 [INFO] [stdout] | [INFO] [stdout] 376 | test_data: test_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `test_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:379:9 [INFO] [stdout] | [INFO] [stdout] 379 | collections: collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:385:9 [INFO] [stdout] | [INFO] [stdout] 385 | cv_folds_ids: cv_folds_ids, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cv_folds_ids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:522:9 [INFO] [stdout] | [INFO] [stdout] 522 | gpredomics_version: gpredomics_version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gpredomics_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:526:9 [INFO] [stdout] | [INFO] [stdout] 526 | test_data: test_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `test_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 529 | collections: collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:535:9 [INFO] [stdout] | [INFO] [stdout] 535 | cv_folds_ids: cv_folds_ids, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cv_folds_ids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | validation_folds: validation_folds, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validation_folds` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | training_sets: training_sets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `training_sets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | validation_folds: validation_folds, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validation_folds` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | training_sets: training_sets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `training_sets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:407:13 [INFO] [stdout] | [INFO] [stdout] 407 | importances: importances, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `importances` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/cv.rs:624:13 [INFO] [stdout] | [INFO] [stdout] 624 | fold_collections: fold_collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `fold_collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data.rs:1273:13 [INFO] [stdout] | [INFO] [stdout] 1273 | X: X, [INFO] [stdout] | ^^^^ help: replace it with: `X` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data.rs:1284:13 [INFO] [stdout] | [INFO] [stdout] 1284 | sample_annotations: sample_annotations, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sample_annotations` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data.rs:1299:13 [INFO] [stdout] | [INFO] [stdout] 1299 | X: X, [INFO] [stdout] | ^^^^ help: replace it with: `X` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/experiment.rs:759:59 [INFO] [stdout] | [INFO] [stdout] 759 | self.others = Some(ExperimentMetadata::Jury { jury: jury }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `jury` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/param.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / #[allow(non_camel_case_types)] [INFO] [stdout] 11 | | [INFO] [stdout] | |_^ [INFO] [stdout] 12 | /// Fit function options for model evaluation [INFO] [stdout] 13 | pub enum FitFunction { [INFO] [stdout] | -------------------- the attribute applies to this enum [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/param.rs:921:1 [INFO] [stdout] | [INFO] [stdout] 921 | / /// Default value definitions [INFO] [stdout] 922 | | [INFO] [stdout] | |_^ [INFO] [stdout] 923 | fn seed_default() -> u64 { [INFO] [stdout] | --------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/individual.rs:2705:17 [INFO] [stdout] | [INFO] [stdout] 2705 | specificity: specificity, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `specificity` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/individual.rs:2706:17 [INFO] [stdout] | [INFO] [stdout] 2706 | sensitivity: sensitivity, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sensitivity` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/individual.rs:2707:17 [INFO] [stdout] | [INFO] [stdout] 2707 | accuracy: accuracy, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `accuracy` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bayesian_mcmc.rs:557:13 [INFO] [stdout] | [INFO] [stdout] 557 | param: param, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `param` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bayesian_mcmc.rs:1036:17 [INFO] [stdout] | [INFO] [stdout] 1036 | bp: bp, [INFO] [stdout] | ^^^^^^ help: replace it with: `bp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bayesian_mcmc.rs:1037:17 [INFO] [stdout] | [INFO] [stdout] 1037 | i: i, [INFO] [stdout] | ^^^^ help: replace it with: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/beam.rs:662:9 [INFO] [stdout] | [INFO] [stdout] 662 | language: language, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/beam.rs:663:9 [INFO] [stdout] | [INFO] [stdout] 663 | data_type: data_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:229:9 [INFO] [stdout] | [INFO] [stdout] 229 | gpredomics_version: gpredomics_version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gpredomics_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | test_data: test_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `test_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 236 | collections: collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | cv_folds_ids: cv_folds_ids, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cv_folds_ids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:372:9 [INFO] [stdout] | [INFO] [stdout] 372 | gpredomics_version: gpredomics_version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gpredomics_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:376:9 [INFO] [stdout] | [INFO] [stdout] 376 | test_data: test_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `test_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:379:9 [INFO] [stdout] | [INFO] [stdout] 379 | collections: collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:385:9 [INFO] [stdout] | [INFO] [stdout] 385 | cv_folds_ids: cv_folds_ids, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cv_folds_ids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:522:9 [INFO] [stdout] | [INFO] [stdout] 522 | gpredomics_version: gpredomics_version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gpredomics_version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:526:9 [INFO] [stdout] | [INFO] [stdout] 526 | test_data: test_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `test_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 529 | collections: collections, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collections` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:535:9 [INFO] [stdout] | [INFO] [stdout] 535 | cv_folds_ids: cv_folds_ids, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cv_folds_ids` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/gpu.rs:130:15 [INFO] [stdout] | [INFO] [stdout] 130 | mat_cols: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 130 - mat_cols: &Vec>, [INFO] [stdout] 130 + mat_cols: &[HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/gpu.rs:296:28 [INFO] [stdout] | [INFO] [stdout] 296 | feature_selection: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 296 - feature_selection: &Vec, [INFO] [stdout] 296 + feature_selection: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/gpu.rs:797:13 [INFO] [stdout] | [INFO] [stdout] 797 | return result_vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 797 - return result_vec; [INFO] [stdout] 797 + result_vec [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/gpu.rs:632:42 [INFO] [stdout] | [INFO] [stdout] 632 | pub fn compute_scores(&self, models: &Vec, threshold: f32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 632 - pub fn compute_scores(&self, models: &Vec, threshold: f32) -> Vec { [INFO] [stdout] 632 + pub fn compute_scores(&self, models: &[Individual], threshold: f32) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/gpu.rs:761:27 [INFO] [stdout] | [INFO] [stdout] 761 | let group_x = (num_models as u32 + 15) / 16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(num_models as u32).div_ceil(16)` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/gpu.rs:762:27 [INFO] [stdout] | [INFO] [stdout] 762 | let group_y = (self.samples as u32 + 15) / 16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(self.samples as u32).div_ceil(16)` [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/utils.rs:71:21 [INFO] [stdout] | [INFO] [stdout] 71 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars.by_ref()` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/utils.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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/utils.rs:272:9 [INFO] [stdout] | [INFO] [stdout] 272 | alpha >= 0.0 && alpha <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&alpha)` [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/utils.rs:318:9 [INFO] [stdout] | [INFO] [stdout] 318 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:405:49 [INFO] [stdout] | [INFO] [stdout] 405 | pub fn compute_auc_from_value(value: &[f64], y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 405 - pub fn compute_auc_from_value(value: &[f64], y: &Vec) -> f64 { [INFO] [stdout] 405 + pub fn compute_auc_from_value(value: &[f64], y: &[u8]) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:460:5 [INFO] [stdout] | [INFO] [stdout] 460 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 460 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:486:16 [INFO] [stdout] | [INFO] [stdout] 486 | predicted: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 486 - predicted: &Vec, [INFO] [stdout] 486 + predicted: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:487:8 [INFO] [stdout] | [INFO] [stdout] 487 | y: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 487 - y: &Vec, [INFO] [stdout] 487 + y: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:559:5 [INFO] [stdout] | [INFO] [stdout] 559 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 559 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/utils.rs:1141:41 [INFO] [stdout] | [INFO] [stdout] 1141 | strata.entry(tag_value).or_insert_with(Vec::new).push(idx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:1254:8 [INFO] [stdout] | [INFO] [stdout] 1254 | y: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1254 - y: &Vec, [INFO] [stdout] 1254 + y: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/utils.rs:1405:1 [INFO] [stdout] | [INFO] [stdout] 1405 | / pub fn compute_threshold_and_metrics_with_bootstrap( [INFO] [stdout] 1406 | | value: &[f64], [INFO] [stdout] 1407 | | y: &Vec, [INFO] [stdout] 1408 | | fit_function: &FitFunction, [INFO] [stdout] ... | [INFO] [stdout] 1413 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1414 | | ) -> (f64, [f64; 3], f64, f64, f64, f64, f64) { [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: length comparison to zero [INFO] [stdout] --> src/utils.rs:1704:8 [INFO] [stdout] | [INFO] [stdout] 1704 | if pop.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pop.individuals.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: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:1717:17 [INFO] [stdout] | [INFO] [stdout] 1717 | &pop.individuals.iter().map(|i| {i.auc}).sum::()/param.ga.population_size as f64, [INFO] [stdout] | -----------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pop.individuals.iter().map(|i| {i.auc}).sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:1718:17 [INFO] [stdout] | [INFO] [stdout] 1718 | &pop.individuals.iter().map(|i| {i.fit}).sum::()/param.ga.population_size as f64, [INFO] [stdout] | -----------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pop.individuals.iter().map(|i| {i.fit}).sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bar` [INFO] [stdout] --> src/utils.rs:1733:18 [INFO] [stdout] | [INFO] [stdout] 1733 | for i in (max_pos + 1)..scale { [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 [INFO] [stdout] | [INFO] [stdout] 1733 - for i in (max_pos + 1)..scale { [INFO] [stdout] 1733 + for in bar.iter_mut().take(scale).skip((max_pos + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/utils.rs:1753:52 [INFO] [stdout] | [INFO] [stdout] 1753 | if param.ga.forced_diversity_pct != 0.0 && epoch % param.ga.forced_diversity_epochs == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.forced_diversity_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/utils.rs:1756:50 [INFO] [stdout] | [INFO] [stdout] 1756 | if param.ga.random_sampling_pct > 0.0 && epoch % param.ga.random_sampling_epochs == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.random_sampling_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/utils.rs:1759:20 [INFO] [stdout] | [INFO] [stdout] 1759 | && epoch % param.cv.resampling_inner_folds_epochs == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.cv.resampling_inner_folds_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/utils.rs:1764:44 [INFO] [stdout] | [INFO] [stdout] 1764 | let analysis_tag = if param.tag != "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/utils.rs:1877:5 [INFO] [stdout] | [INFO] [stdout] 1877 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:1997:9 [INFO] [stdout] | [INFO] [stdout] 1997 | return "0".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1997 - return "0".to_string(); [INFO] [stdout] 1997 + "0".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:1999:9 [INFO] [stdout] | [INFO] [stdout] 1999 | return format!("{:.1e}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1999 - return format!("{:.1e}", value); [INFO] [stdout] 1999 + format!("{:.1e}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2001:9 [INFO] [stdout] | [INFO] [stdout] 2001 | return format!("{:.4}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2001 - return format!("{:.4}", value); [INFO] [stdout] 2001 + format!("{:.4}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2003:9 [INFO] [stdout] | [INFO] [stdout] 2003 | return format!("{:.3}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2003 - return format!("{:.3}", value); [INFO] [stdout] 2003 + format!("{:.3}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2005:9 [INFO] [stdout] | [INFO] [stdout] 2005 | return format!("{:.2}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2005 - return format!("{:.2}", value); [INFO] [stdout] 2005 + format!("{:.2}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2008:13 [INFO] [stdout] | [INFO] [stdout] 2008 | return format!("{:.0}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2008 - return format!("{:.0}", value); [INFO] [stdout] 2008 + format!("{:.0}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2010:13 [INFO] [stdout] | [INFO] [stdout] 2010 | return format!("{:.1}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2010 - return format!("{:.1}", value); [INFO] [stdout] 2010 + format!("{:.1}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2014:13 [INFO] [stdout] | [INFO] [stdout] 2014 | return format!("{:.0}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2014 - return format!("{:.0}", value); [INFO] [stdout] 2014 + format!("{:.0}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2016:13 [INFO] [stdout] | [INFO] [stdout] 2016 | return format!("{:.1}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2016 - return format!("{:.1}", value); [INFO] [stdout] 2016 + format!("{:.1}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/utils.rs:2006:32 [INFO] [stdout] | [INFO] [stdout] 2006 | } else if abs_value < 10.0 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 2007 | | if (value - value.round()).abs() < 1e-10 { [INFO] [stdout] 2008 | | return format!("{:.0}", value); [INFO] [stdout] 2009 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 2012 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/utils.rs:2012:12 [INFO] [stdout] | [INFO] [stdout] 2012 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 2013 | | if (value - value.round()).abs() < 1e-10 { [INFO] [stdout] 2014 | | return format!("{:.0}", value); [INFO] [stdout] 2015 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 2018 | | } [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: manual `!Range::contains` implementation [INFO] [stdout] --> src/utils.rs:1998:15 [INFO] [stdout] | [INFO] [stdout] 1998 | } else if abs_value < 0.001 || abs_value >= 10000.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.001..10000.0).contains(&abs_value)` [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: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/cv.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | .zip(indices_class1_folds.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] 54 - .zip(indices_class1_folds.into_iter()) [INFO] [stdout] 54 + .zip(indices_class1_folds) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `validation_folds` [INFO] [stdout] --> src/cv.rs:63:22 [INFO] [stdout] | [INFO] [stdout] 63 | for j in 0..folds { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 63 - for j in 0..folds { [INFO] [stdout] 63 + for (j, ) in validation_folds.iter().enumerate().take(folds) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cv.rs:117:14 [INFO] [stdout] | [INFO] [stdout] 117 | .expect(&format!( [INFO] [stdout] | ______________^ [INFO] [stdout] 118 | | "Stratification column '{}' not found in sample annotations", [INFO] [stdout] 119 | | stratify_by [INFO] [stdout] 120 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 117 ~ .unwrap_or_else(|| panic!("Stratification column '{}' not found in sample annotations", [INFO] [stdout] 118 ~ stratify_by)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/cv.rs:152:18 [INFO] [stdout] | [INFO] [stdout] 152 | .zip(indices_class1_folds.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] 152 - .zip(indices_class1_folds.into_iter()) [INFO] [stdout] 152 + .zip(indices_class1_folds) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `validation_folds` [INFO] [stdout] --> src/cv.rs:161:22 [INFO] [stdout] | [INFO] [stdout] 161 | for j in 0..folds { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 161 - for j in 0..folds { [INFO] [stdout] 161 + for (j, ) in validation_folds.iter().enumerate().take(folds) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:191:12 [INFO] [stdout] | [INFO] [stdout] 191 | if param.cv.stratify_by.len() > 0 && data.sample_annotations.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.cv.stratify_by.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:231:28 [INFO] [stdout] | [INFO] [stdout] 231 | if collection.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!collection.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:234:32 [INFO] [stdout] | [INFO] [stdout] 234 | ... if final_population.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!final_population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:297:13 [INFO] [stdout] | [INFO] [stdout] 297 | self.fold_collections.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.fold_collections.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:320:16 [INFO] [stdout] | [INFO] [stdout] 320 | if fold_last_fbm.individuals.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `fold_last_fbm.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/cv.rs:451:17 [INFO] [stdout] | [INFO] [stdout] 451 | param.beam.max_nb_of_models as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:503:16 [INFO] [stdout] | [INFO] [stdout] 503 | if self.fold_collections[fold_idx].len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.fold_collections[fold_idx].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:504:20 [INFO] [stdout] | [INFO] [stdout] 504 | && self.fold_collections[fold_idx] [INFO] [stdout] | ____________________^ [INFO] [stdout] 505 | | .last() [INFO] [stdout] 506 | | .unwrap() [INFO] [stdout] 507 | | .individuals [INFO] [stdout] 508 | | .len() [INFO] [stdout] 509 | | > 0 [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] help: using `!is_empty` is clearer and more explicit [INFO] [stdout] | [INFO] [stdout] 504 ~ && !self.fold_collections[fold_idx] [INFO] [stdout] 505 + .last() [INFO] [stdout] 506 + .unwrap() [INFO] [stdout] 507 + .individuals.is_empty() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cv.rs:511:59 [INFO] [stdout] | [INFO] [stdout] 511 | let fbm = self.extract_fold_fbm(fold_idx, ¶m); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cv.rs:524:25 [INFO] [stdout] | [INFO] [stdout] 524 | ¶m [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: you should consider adding a `Default` implementation for `Data` [INFO] [stdout] --> src/data.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / pub fn new() -> Data { [INFO] [stdout] 97 | | Data { [INFO] [stdout] 98 | | X: HashMap::new(), [INFO] [stdout] 99 | | y: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 111 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 90 + impl Default for Data { [INFO] [stdout] 91 + fn default() -> Self { [INFO] [stdout] 92 + Self::new() [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `ranks` [INFO] [stdout] --> src/data.rs:904:22 [INFO] [stdout] | [INFO] [stdout] 904 | for j in start..=i { [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] 904 - for j in start..=i { [INFO] [stdout] 904 + for in ranks.iter_mut().take(i + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data.rs:1040:10 [INFO] [stdout] | [INFO] [stdout] 1040 | ) -> (Vec<(usize, u8, f64)>, Vec<(usize, u8, f64)>) { [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: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/data.rs:1048:25 [INFO] [stdout] | [INFO] [stdout] 1048 | param.data.feature_minimal_prevalence_pct as f64 / 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.data.feature_minimal_prevalence_pct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/data.rs:1054:25 [INFO] [stdout] | [INFO] [stdout] 1054 | param.data.feature_minimal_prevalence_pct as f64 / 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.data.feature_minimal_prevalence_pct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/data.rs:1060:25 [INFO] [stdout] | [INFO] [stdout] 1060 | param.data.feature_minimal_prevalence_pct as f64 / 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.data.feature_minimal_prevalence_pct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/data.rs:1142:20 [INFO] [stdout] | [INFO] [stdout] 1142 | .chain(class_1_features.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:510: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] 1142 - .chain(class_1_features.into_iter()) [INFO] [stdout] 1142 + .chain(class_1_features) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/data.rs:1149:18 [INFO] [stdout] | [INFO] [stdout] 1149 | ...!( self.feature_selection.len()>0, "No feature has been selected, please lower your selection criteria or improve the quality o... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.feature_selection.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/data.rs:1193:13 [INFO] [stdout] | [INFO] [stdout] 1193 | fdr_alpha >= 0.0 && fdr_alpha <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&fdr_alpha)` [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: function call inside of `expect` [INFO] [stdout] --> src/data.rs:1499:14 [INFO] [stdout] | [INFO] [stdout] 1499 | .expect(&format!( [INFO] [stdout] | ______________^ [INFO] [stdout] 1500 | | "Stratification column '{}' not found in sample annotations", [INFO] [stdout] 1501 | | stratify_col [INFO] [stdout] 1502 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1499 ~ .unwrap_or_else(|| panic!("Stratification column '{}' not found in sample annotations", [INFO] [stdout] 1500 ~ stratify_col)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data.rs:1541:22 [INFO] [stdout] | [INFO] [stdout] 1541 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ImportanceCollection` [INFO] [stdout] --> src/experiment.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / pub fn new() -> ImportanceCollection { [INFO] [stdout] 115 | | ImportanceCollection { [INFO] [stdout] 116 | | importances: Vec::new(), [INFO] [stdout] 117 | | } [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 112 + impl Default for ImportanceCollection { [INFO] [stdout] 113 + fn default() -> Self { [INFO] [stdout] 114 + Self::new() [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/experiment.rs:191:31 [INFO] [stdout] | [INFO] [stdout] 191 | let type_ok = imp_type [INFO] [stdout] | _______________________________^ [INFO] [stdout] 192 | | .as_ref() [INFO] [stdout] 193 | | .map_or(true, |t| imp.importance_type == *t); [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 193 - .map_or(true, |t| imp.importance_type == *t); [INFO] [stdout] 193 + .is_none_or(|t| imp.importance_type == *t); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/experiment.rs:297:1 [INFO] [stdout] | [INFO] [stdout] 297 | / pub enum ExperimentMetadata { [INFO] [stdout] 298 | | /// Bayesian MCMC trace to analyze posterior distributions [INFO] [stdout] 299 | | / MCMC { [INFO] [stdout] 300 | | | /// Complete MCMC analysis trace [INFO] [stdout] 301 | | | trace: MCMCAnalysisTrace, [INFO] [stdout] 302 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 1176 bytes [INFO] [stdout] 303 | | /// Voting Jury results [INFO] [stdout] 304 | | / Jury { [INFO] [stdout] 305 | | | /// Jury population [INFO] [stdout] 306 | | | jury: Jury, [INFO] [stdout] 307 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 240 bytes [INFO] [stdout] 308 | | } [INFO] [stdout] | |___^ the entire enum is at least 1176 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 301 - trace: MCMCAnalysisTrace, [INFO] [stdout] 301 + trace: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/experiment.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | if matches!(self.cv_folds_ids, None) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.cv_folds_ids.is_none()` [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: useless use of `format!` [INFO] [stdout] --> src/experiment.rs:442:24 [INFO] [stdout] | [INFO] [stdout] 442 | text.push_str(&format!("Experiment results:\n\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Experiment results:\n\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/experiment.rs:522:13 [INFO] [stdout] | [INFO] [stdout] 522 | / match metadata { [INFO] [stdout] 523 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 524 | | text.push_str(&format!( [INFO] [stdout] 525 | | "{}\n", [INFO] [stdout] ... | [INFO] [stdout] 529 | | _ => {} [INFO] [stdout] 530 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/experiment.rs:521:21 [INFO] [stdout] | [INFO] [stdout] 521 | if let Some(ref metadata) = self.others { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 522 | match metadata { [INFO] [stdout] 523 | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/experiment.rs:522:13 [INFO] [stdout] | [INFO] [stdout] 522 | / match metadata { [INFO] [stdout] 523 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 524 | | text.push_str(&format!( [INFO] [stdout] 525 | | "{}\n", [INFO] [stdout] ... | [INFO] [stdout] 529 | | _ => {} [INFO] [stdout] 530 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 522 ~ if let ExperimentMetadata::Jury { jury } = metadata { [INFO] [stdout] 523 + text.push_str(&format!( [INFO] [stdout] 524 + "{}\n", [INFO] [stdout] 525 + jury.display(&self.train_data, self.test_data.as_ref(), &self.parameters) [INFO] [stdout] 526 + )); [INFO] [stdout] 527 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/experiment.rs:574:12 [INFO] [stdout] | [INFO] [stdout] 574 | if self.train_data.check_compatibility(&new_data) == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.train_data.check_compatibility(&new_data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/experiment.rs:587:13 [INFO] [stdout] | [INFO] [stdout] 587 | / match metadata { [INFO] [stdout] 588 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 589 | | cinfo!( [INFO] [stdout] 590 | | self.parameters.general.display_colorful, [INFO] [stdout] ... | [INFO] [stdout] 595 | | _ => {} [INFO] [stdout] 596 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/experiment.rs:586:21 [INFO] [stdout] | [INFO] [stdout] 586 | if let Some(ref mut metadata) = self.others { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 587 | match metadata { [INFO] [stdout] 588 | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [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/experiment.rs:587:13 [INFO] [stdout] | [INFO] [stdout] 587 | / match metadata { [INFO] [stdout] 588 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 589 | | cinfo!( [INFO] [stdout] 590 | | self.parameters.general.display_colorful, [INFO] [stdout] ... | [INFO] [stdout] 595 | | _ => {} [INFO] [stdout] 596 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 587 ~ if let ExperimentMetadata::Jury { jury } = metadata { [INFO] [stdout] 588 + cinfo!( [INFO] [stdout] 589 + self.parameters.general.display_colorful, [INFO] [stdout] 590 + "{}", [INFO] [stdout] 591 + jury.display(&self.train_data, Some(&new_data), &self.parameters) [INFO] [stdout] 592 + ); [INFO] [stdout] 593 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/param.rs:763:5 [INFO] [stdout] | [INFO] [stdout] 763 | let _ = validate(&mut config)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 763 - let _ = validate(&mut config)?; [INFO] [stdout] 763 + validate(&mut config)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/param.rs:790:8 [INFO] [stdout] | [INFO] [stdout] 790 | if param.general.log_base.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.general.log_base.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/param.rs:794:53 [INFO] [stdout] | [INFO] [stdout] 794 | if param.cv.fit_on_valid && param.data.Xtest == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/param.rs:820:20 [INFO] [stdout] | [INFO] [stdout] 820 | return Err(format!("Both Xtest and ytest must be provided together.",)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Both Xtest and ytest must be provided together.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/param.rs:911:30 [INFO] [stdout] | [INFO] [stdout] 911 | if param.general.algo == "ga".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `"ga"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/param.rs:915:20 [INFO] [stdout] | [INFO] [stdout] 915 | ...rr(format!("Randomized samples and overfit penalty cannot be used together. If you want to resample the folds of the cross-validation used to penalise overfitting, you can use the parameter random_sampling_epochs.")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Randomized samples and overfit penalty cannot be used together. If you want to resample the folds of the cross-validation used to penalise overfitting, you can use the parameter random_sampling_epochs.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/individual.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / impl Default for AdditionalMetrics { [INFO] [stdout] 52 | | fn default() -> Self { [INFO] [stdout] 53 | | AdditionalMetrics { [INFO] [stdout] 54 | | mcc: None, [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [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] 37 + #[derive(Default)] [INFO] [stdout] 38 | pub struct AdditionalMetrics { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Individual` [INFO] [stdout] --> src/individual.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | / pub fn new() -> Individual { [INFO] [stdout] 189 | | Individual { [INFO] [stdout] 190 | | features: HashMap::new(), [INFO] [stdout] 191 | | auc: 0.0, [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 178 + impl Default for Individual { [INFO] [stdout] 179 + fn default() -> Self { [INFO] [stdout] 180 + Self::new() [INFO] [stdout] 181 + } [INFO] [stdout] 182 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:274:25 [INFO] [stdout] | [INFO] [stdout] 270 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] ... [INFO] [stdout] 274 | self.metrics.mcc.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:282:25 [INFO] [stdout] | [INFO] [stdout] 278 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] ... [INFO] [stdout] 282 | self.metrics.f1_score.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 286 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] ... [INFO] [stdout] 290 | self.metrics.npv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:298:25 [INFO] [stdout] | [INFO] [stdout] 294 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] ... [INFO] [stdout] 298 | self.metrics.ppv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:306:25 [INFO] [stdout] | [INFO] [stdout] 302 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] ... [INFO] [stdout] 306 | self.metrics.g_mean.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:321:55 [INFO] [stdout] | [INFO] [stdout] 320 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] 321 | m = format!("{} | MCC {:.3} ", m, self.metrics.mcc.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:324:60 [INFO] [stdout] | [INFO] [stdout] 323 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] 324 | m = format!("{} | F1-score {:.3} ", m, self.metrics.f1_score.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:327:55 [INFO] [stdout] | [INFO] [stdout] 326 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] 327 | m = format!("{} | NPV {:.3} ", m, self.metrics.npv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:330:55 [INFO] [stdout] | [INFO] [stdout] 329 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] 330 | m = format!("{} | PPV {:.3} ", m, self.metrics.ppv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:333:58 [INFO] [stdout] | [INFO] [stdout] 332 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] 333 | m = format!("{} | G-mean {:.3} ", m, self.metrics.g_mean.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/individual.rs:245:15 [INFO] [stdout] | [INFO] [stdout] 245 | algo: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 245 ~ algo: &str, [INFO] [stdout] 246 | ci_alpha: f64, [INFO] [stdout] 247 | ) -> String { [INFO] [stdout] 248 ~ let algo_str = match algo { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/individual.rs:357:13 [INFO] [stdout] | [INFO] [stdout] 357 | .enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 357 ~ [INFO] [stdout] 358 ~ .map(|&&(index, coef)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:364:50 [INFO] [stdout] | [INFO] [stdout] 364 | if self.language == POW2_LANG && !(*coef == 1_i8) && self.data_type != LOG_TYPE { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*coef != 1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:367:24 [INFO] [stdout] | [INFO] [stdout] 367 | && !(*coef == 1_i8) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*coef != 1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/individual.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | .enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 379 ~ [INFO] [stdout] 380 ~ .map(|&&(index, coef)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:386:50 [INFO] [stdout] | [INFO] [stdout] 386 | if self.language == POW2_LANG && !(*coef == -1_i8) && self.data_type != LOG_TYPE { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*coef != -1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:389:24 [INFO] [stdout] | [INFO] [stdout] 389 | && !(*coef == -1_i8) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*coef != -1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `data.classes.get(0)` [INFO] [stdout] --> src/individual.rs:405:22 [INFO] [stdout] | [INFO] [stdout] 405 | let class0 = data.classes.get(0).map(|s| s.as_str()).unwrap_or("0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `data.classes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/individual.rs:601:46 [INFO] [stdout] | [INFO] [stdout] 601 | TERNARY_LANG | RATIO_LANG => value >= -1 && value <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&value)` [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: the loop variable `sample` is used to index `r` [INFO] [stdout] --> src/individual.rs:839:31 [INFO] [stdout] | [INFO] [stdout] 839 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 839 - for sample in 0..sample_len { [INFO] [stdout] 839 + for (sample, ) in r.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/individual.rs:866:22 [INFO] [stdout] | [INFO] [stdout] 866 | .zip(neg_sums.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] 866 - .zip(neg_sums.into_iter()) [INFO] [stdout] 866 + .zip(neg_sums) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `score` [INFO] [stdout] --> src/individual.rs:875:31 [INFO] [stdout] | [INFO] [stdout] 875 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 875 - for sample in 0..sample_len { [INFO] [stdout] 875 + for (sample, ) in score.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `r` [INFO] [stdout] --> src/individual.rs:911:31 [INFO] [stdout] | [INFO] [stdout] 911 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 911 - for sample in 0..sample_len { [INFO] [stdout] 911 + for (sample, ) in r.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/individual.rs:947:22 [INFO] [stdout] | [INFO] [stdout] 947 | .zip(neg_sums.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] 947 - .zip(neg_sums.into_iter()) [INFO] [stdout] 947 + .zip(neg_sums) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `score` [INFO] [stdout] --> src/individual.rs:956:31 [INFO] [stdout] | [INFO] [stdout] 956 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 956 - for sample in 0..sample_len { [INFO] [stdout] 956 + for (sample, ) in score.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `r` [INFO] [stdout] --> src/individual.rs:999:31 [INFO] [stdout] | [INFO] [stdout] 999 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 999 - for sample in 0..sample_len { [INFO] [stdout] 999 + for (sample, ) in r.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/individual.rs:1029:22 [INFO] [stdout] | [INFO] [stdout] 1029 | .zip(neg_sums.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] 1029 - .zip(neg_sums.into_iter()) [INFO] [stdout] 1029 + .zip(neg_sums) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `score` [INFO] [stdout] --> src/individual.rs:1038:31 [INFO] [stdout] | [INFO] [stdout] 1038 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1038 - for sample in 0..sample_len { [INFO] [stdout] 1038 + for (sample, ) in score.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/individual.rs:1311:5 [INFO] [stdout] | [INFO] [stdout] 1311 | / pub fn random_select( [INFO] [stdout] 1312 | | k_min: usize, [INFO] [stdout] 1313 | | k_max: usize, [INFO] [stdout] 1314 | | feature_selection: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 1321 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1322 | | ) -> Individual { [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/individual.rs:1391:5 [INFO] [stdout] | [INFO] [stdout] 1391 | / pub fn random_select_k( [INFO] [stdout] 1392 | | k_min: usize, [INFO] [stdout] 1393 | | k_max: usize, [INFO] [stdout] 1394 | | feature_selection: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 1400 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1401 | | ) -> Individual { [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/individual.rs:1511:5 [INFO] [stdout] | [INFO] [stdout] 1511 | / pub fn random_select_weighted( [INFO] [stdout] 1512 | | k_min: usize, [INFO] [stdout] 1513 | | k_max: usize, [INFO] [stdout] 1514 | | feature_selection: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 1521 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1522 | | ) -> Individual { [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 loop variable `i` is only used to index `combined` [INFO] [stdout] --> src/individual.rs:1712:18 [INFO] [stdout] | [INFO] [stdout] 1712 | for i in 0..combined.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1712 - for i in 0..combined.len() { [INFO] [stdout] 1712 + for in &combined { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/individual.rs:2083:26 [INFO] [stdout] | [INFO] [stdout] 2083 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/individual.rs:2090:13 [INFO] [stdout] | [INFO] [stdout] 2090 | positions.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2090 - positions.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] 2090 + positions.sort_by_key(|b| std::cmp::Reverse(b.0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/individual.rs:2114:38 [INFO] [stdout] | [INFO] [stdout] 2114 | ... .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i8` -> `i8`) [INFO] [stdout] --> src/individual.rs:2302:37 [INFO] [stdout] | [INFO] [stdout] 2302 | .map(|(id, coef)| (*id, coef.signum() as i8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `coef.signum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i8` -> `i8`) [INFO] [stdout] --> src/individual.rs:2308:37 [INFO] [stdout] | [INFO] [stdout] 2308 | .map(|(id, coef)| (*id, coef.signum() as i8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `coef.signum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/individual.rs:2489:12 [INFO] [stdout] | [INFO] [stdout] 2489 | if desc.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!desc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Population` [INFO] [stdout] --> src/population.rs:255:5 [INFO] [stdout] | [INFO] [stdout] 255 | / pub fn new() -> Population { [INFO] [stdout] 256 | | Population { [INFO] [stdout] 257 | | individuals: Vec::new(), [INFO] [stdout] 258 | | } [INFO] [stdout] 259 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 35 + impl Default for Population { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:141:55 [INFO] [stdout] | [INFO] [stdout] 141 | ) = self.bayesian_compute_roc_and_metrics(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/population.rs:145:51 [INFO] [stdout] | [INFO] [stdout] 145 | self.bayesian_compute_metrics(&data_to_test, train_best_threshold); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `data_to_test` [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: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:367:13 [INFO] [stdout] | [INFO] [stdout] 367 | i.fit = i.fit - i.k as f64 * param.general.k_penalty; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= i.k as f64 * param.general.k_penalty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:370:17 [INFO] [stdout] | [INFO] [stdout] 370 | i.fit = i.fit - (param.general.threshold_ci_penalty * threshold_ci.rejection_rate); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= (param.general.threshold_ci_penalty * threshold_ci.rejection_rate)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:375:21 [INFO] [stdout] | [INFO] [stdout] 375 | i.fit = i.fit - (1.0 - i.sensitivity) * param.general.bias_penalty [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= (1.0 - i.sensitivity) * param.general.bias_penalty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:378:21 [INFO] [stdout] | [INFO] [stdout] 378 | i.fit = i.fit - (1.0 - i.specificity) * param.general.bias_penalty [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= (1.0 - i.specificity) * param.general.bias_penalty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:494:37 [INFO] [stdout] | [INFO] [stdout] 494 | ... &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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/population.rs:527:37 [INFO] [stdout] | [INFO] [stdout] 527 | ... &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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/population.rs:550:33 [INFO] [stdout] | [INFO] [stdout] 550 | ... &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/population.rs:657:21 [INFO] [stdout] | [INFO] [stdout] 657 | gpu_assays: &Vec<(Option, Option)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 657 - gpu_assays: &Vec<(Option, Option)>, [INFO] [stdout] 657 + gpu_assays: &[(Option, Option)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `fit_without_penalty` doesn't need a mutable reference [INFO] [stdout] --> src/population.rs:669:38 [INFO] [stdout] | [INFO] [stdout] 669 | self.fit_without_penalty(&mut fold_data, &mut None, val_gpu_assay, &None, param); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 669 - self.fit_without_penalty(&mut fold_data, &mut None, val_gpu_assay, &None, param); [INFO] [stdout] 669 + self.fit_without_penalty(&fold_data, &mut None, val_gpu_assay, &None, param); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `fit_without_penalty` doesn't need a mutable reference [INFO] [stdout] --> src/population.rs:674:38 [INFO] [stdout] | [INFO] [stdout] 674 | self.fit_without_penalty(&mut train_data, &mut None, train_gpu_assay, &None, param); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 674 - self.fit_without_penalty(&mut train_data, &mut None, train_gpu_assay, &None, param); [INFO] [stdout] 674 + self.fit_without_penalty(&train_data, &mut None, train_gpu_assay, &None, param); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/population.rs:734:12 [INFO] [stdout] | [INFO] [stdout] 734 | if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 734 - if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] 734 + if eval[0] > 1.0 || &eval[0] < &0.0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/population.rs:734:31 [INFO] [stdout] | [INFO] [stdout] 734 | if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 734 - if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] 734 + if &eval[0] > &1.0 || eval[0] < 0.0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/population.rs:823:5 [INFO] [stdout] | [INFO] [stdout] 823 | / pub fn generate( [INFO] [stdout] 824 | | &mut self, [INFO] [stdout] 825 | | population_size: u32, [INFO] [stdout] 826 | | k_min: usize, [INFO] [stdout] ... | [INFO] [stdout] 834 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 835 | | ) { [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: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/population.rs:892:30 [INFO] [stdout] | [INFO] [stdout] 892 | individuals: self.individuals.iter().take(n).map(|i| i.clone()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.individuals.iter().take(n).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ind.threshold_ci` after checking its variant with `is_some` [INFO] [stdout] --> src/population.rs:959:36 [INFO] [stdout] | [INFO] [stdout] 957 | if ind.threshold_ci.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = &mut ind.threshold_ci` [INFO] [stdout] 958 | let scores = ind.evaluate(data); [INFO] [stdout] 959 | let threshold_ci = ind.threshold_ci.as_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:973:21 [INFO] [stdout] | [INFO] [stdout] 973 | &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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 (8/7) [INFO] [stdout] --> src/population.rs:1057:5 [INFO] [stdout] | [INFO] [stdout] 1057 | / pub fn compute_pop_mda_feature_importance( [INFO] [stdout] 1058 | | &self, [INFO] [stdout] 1059 | | data: &Data, [INFO] [stdout] 1060 | | permutations: usize, [INFO] [stdout] ... | [INFO] [stdout] 1065 | | population_id: Option, [INFO] [stdout] 1066 | | ) -> ImportanceCollection { [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/population.rs:1121:20 [INFO] [stdout] | [INFO] [stdout] 1121 | if done % step == 0 || done == n_individuals { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `done.is_multiple_of(step)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/population.rs:1143:22 [INFO] [stdout] | [INFO] [stdout] 1143 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:1163:61 [INFO] [stdout] | [INFO] [stdout] 1163 | ImportanceAggregation::mean => mean_and_std(&values), [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [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/population.rs:1242:44 [INFO] [stdout] | [INFO] [stdout] 1242 | let sample_prob = ind.evaluate(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/population.rs:1306:59 [INFO] [stdout] | [INFO] [stdout] 1306 | compute_auc_from_value(&self.bayesian_predict(&data), &data.y), [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/population.rs:1364:41 [INFO] [stdout] | [INFO] [stdout] 1364 | niches.entry(niche_key).or_insert_with(Vec::new).push(idx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/population.rs:1464:9 [INFO] [stdout] | [INFO] [stdout] 1464 | freq_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1464 - freq_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 1464 + freq_vec.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/population.rs:1490:9 [INFO] [stdout] | [INFO] [stdout] 1490 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/population.rs:1569:13 [INFO] [stdout] | [INFO] [stdout] 1569 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/population.rs:1581:26 [INFO] [stdout] | [INFO] [stdout] 1581 | result.push_str(&format!( [INFO] [stdout] | __________________________^ [INFO] [stdout] 1582 | | "\x1b[1;96mBlue\x1b[0m = Always positively associated (+1) | " [INFO] [stdout] 1583 | | )); [INFO] [stdout] | |_________^ help: consider using `.to_string()`: `"\x1b[1;96mBlue\x1b[0m = Always positively associated (+1) | ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/population.rs:1584:26 [INFO] [stdout] | [INFO] [stdout] 1584 | result.push_str(&format!( [INFO] [stdout] | __________________________^ [INFO] [stdout] 1585 | | "\x1b[1;95mMagenta\x1b[0m = Always negatively associated (-1) | " [INFO] [stdout] 1586 | | )); [INFO] [stdout] | |_________^ help: consider using `.to_string()`: `"\x1b[1;95mMagenta\x1b[0m = Always negatively associated (-1) | ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:135:12 [INFO] [stdout] | [INFO] [stdout] 135 | if voting_threshold < &0.0 || voting_threshold > &1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(&0.0..=&1.0).contains(&voting_threshold)` [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/voting.rs:140:12 [INFO] [stdout] | [INFO] [stdout] 140 | if threshold_window < &0.0 || threshold_window > &100.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(&0.0..=&100.0).contains(&threshold_window)` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/voting.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | / match weighting_method { [INFO] [stdout] 149 | | WeightingMethod::Specialized { [INFO] [stdout] 150 | | sensitivity_threshold, [INFO] [stdout] 151 | | specificity_threshold, [INFO] [stdout] ... | [INFO] [stdout] 161 | | _ => (), [INFO] [stdout] 162 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ if let WeightingMethod::Specialized { [INFO] [stdout] 149 + sensitivity_threshold, [INFO] [stdout] 150 + specificity_threshold, [INFO] [stdout] 151 + } = weighting_method { [INFO] [stdout] 152 + warn!("Specialized voting mode is experimental"); [INFO] [stdout] 153 + if *sensitivity_threshold < 0.0 || *sensitivity_threshold > 1.0 { [INFO] [stdout] 154 + panic!("Sensitivity threshold must be in [0,1]"); [INFO] [stdout] 155 + } [INFO] [stdout] 156 + if *specificity_threshold < 0.0 || *specificity_threshold > 1.0 { [INFO] [stdout] 157 + panic!("Specificity threshold must be in [0,1]"); [INFO] [stdout] 158 + } [INFO] [stdout] 159 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:346:20 [INFO] [stdout] | [INFO] [stdout] 346 | if score >= 0.0 && score <= 1.0 && pred_class != 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&score)` [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/voting.rs:441:17 [INFO] [stdout] | [INFO] [stdout] 441 | &self.weights.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.weights.as_ref().unwrap()` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:452:24 [INFO] [stdout] | [INFO] [stdout] 452 | if score >= 0.0 && score <= 1.0 && pred_class != 2 && true_class != 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&score)` [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/voting.rs:907:17 [INFO] [stdout] | [INFO] [stdout] 907 | &self.predicted_classes.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.predicted_classes.as_ref().unwrap()` [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/voting.rs:951:42 [INFO] [stdout] | [INFO] [stdout] 951 | self.experts.clone().display(&data, test_data, param) [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: called `unwrap` on `test_data` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1057:42 [INFO] [stdout] | [INFO] [stdout] 1049 | if test_data.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = test_data` [INFO] [stdout] ... [INFO] [stdout] 1057 | ) = self.compute_new_metrics(test_data.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1072:21 [INFO] [stdout] | [INFO] [stdout] 1068 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] ... [INFO] [stdout] 1072 | self.metrics.mcc.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1080:21 [INFO] [stdout] | [INFO] [stdout] 1076 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] ... [INFO] [stdout] 1080 | self.metrics.f1_score.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1088:21 [INFO] [stdout] | [INFO] [stdout] 1084 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] ... [INFO] [stdout] 1088 | self.metrics.npv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1096:21 [INFO] [stdout] | [INFO] [stdout] 1092 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] ... [INFO] [stdout] 1096 | self.metrics.ppv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1104:21 [INFO] [stdout] | [INFO] [stdout] 1100 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] ... [INFO] [stdout] 1104 | self.metrics.g_mean.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1121:70 [INFO] [stdout] | [INFO] [stdout] 1120 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] 1121 | summary_str = format!("{} | MCC {:.3}", summary_str, self.metrics.mcc.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1127:21 [INFO] [stdout] | [INFO] [stdout] 1123 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] ... [INFO] [stdout] 1127 | self.metrics.f1_score.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1131:70 [INFO] [stdout] | [INFO] [stdout] 1130 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] 1131 | summary_str = format!("{} | NPV {:.3}", summary_str, self.metrics.npv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1134:70 [INFO] [stdout] | [INFO] [stdout] 1133 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] 1134 | summary_str = format!("{} | PPV {:.3}", summary_str, self.metrics.ppv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1140:21 [INFO] [stdout] | [INFO] [stdout] 1136 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] ... [INFO] [stdout] 1140 | self.metrics.g_mean.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/voting.rs:1224:29 [INFO] [stdout] | [INFO] [stdout] 1224 | let max_errors = if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/voting.rs:1229:34 [INFO] [stdout] | [INFO] [stdout] 1229 | let max_abstentions = if abstentions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!abstentions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/voting.rs:1425:10 [INFO] [stdout] | [INFO] [stdout] 1425 | ) -> (Vec, Vec, Vec, Vec<(usize, f64)>) { [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `predictions` [INFO] [stdout] --> src/voting.rs:1434:18 [INFO] [stdout] | [INFO] [stdout] 1434 | for i in 0..data.sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1434 - for i in 0..data.sample_len { [INFO] [stdout] 1434 + for (i, ) in predictions.iter().enumerate().take(data.sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/voting.rs:1576:59 [INFO] [stdout] | [INFO] [stdout] 1576 | for (_, expert) in self.experts.individuals.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1576 - for (_, expert) in self.experts.individuals.iter().enumerate() { [INFO] [stdout] 1576 + for expert in self.experts.individuals.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/csv_report.rs:590:20 [INFO] [stdout] | [INFO] [stdout] 590 | if score >= 0.0 && score <= 1.0 && pred_class != 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&score)` [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: the loop variable `i_sample` is used to index `z_new` [INFO] [stdout] --> src/bayesian_mcmc.rs:380:25 [INFO] [stdout] | [INFO] [stdout] 380 | for i_sample in 0..self.data.sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 380 - for i_sample in 0..self.data.sample_len { [INFO] [stdout] 380 + for (i_sample, ) in z_new.iter_mut().enumerate().take(self.data.sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bayesian_mcmc.rs:406:50 [INFO] [stdout] | [INFO] [stdout] 406 | fn log_posterior(&self, ind: &Individual, z: &Vec<[f64; 3]>) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 406 - fn log_posterior(&self, ind: &Individual, z: &Vec<[f64; 3]>) -> f64 { [INFO] [stdout] 406 + fn log_posterior(&self, ind: &Individual, z: &[[f64; 3]]) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bayesian_mcmc.rs:441:52 [INFO] [stdout] | [INFO] [stdout] 441 | fn compute_sigma_i(&self, ind: &Individual, z: &Vec<[f64; 3]>, i: usize) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 441 - fn compute_sigma_i(&self, ind: &Individual, z: &Vec<[f64; 3]>, i: usize) -> f64 { [INFO] [stdout] 441 + fn compute_sigma_i(&self, ind: &Individual, z: &[[f64; 3]], i: usize) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/bayesian_mcmc.rs:445:46 [INFO] [stdout] | [INFO] [stdout] 445 | for (_i_sample, z_sample) in z.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 445 - for (_i_sample, z_sample) in z.iter().enumerate() { [INFO] [stdout] 445 + for z_sample in z.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/bayesian_mcmc.rs:656:26 [INFO] [stdout] | [INFO] [stdout] 656 | for (_, stat) in &mut self.model_stats { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 656 - for (_, stat) in &mut self.model_stats { [INFO] [stdout] 656 + for stat in self.model_stats.values_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/bayesian_mcmc.rs:662:26 [INFO] [stdout] | [INFO] [stdout] 662 | for (_, prob) in &mut self.feature_prob { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 662 - for (_, prob) in &mut self.feature_prob { [INFO] [stdout] 662 + for prob in self.feature_prob.values_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bayesian_mcmc.rs:938:30 [INFO] [stdout] | [INFO] [stdout] 938 | feature_to_drop.push(idx.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting float literal to `f64` is unnecessary [INFO] [stdout] --> src/bayesian_mcmc.rs:957:21 [INFO] [stdout] | [INFO] [stdout] 957 | let n_classes = 3.0 as f64; [INFO] [stdout] | ^^^^^^^^^^ help: try: `3.0_f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/bayesian_mcmc.rs:1003:25 [INFO] [stdout] | [INFO] [stdout] 1003 | if let &coef @ (-1 | 0 | 1) = [1, 0, -1].choose(rng).unwrap() { [INFO] [stdout] | ^^^^^^^^^^ help: try: `-1..=1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/bayesian_mcmc.rs:1028:17 [INFO] [stdout] | [INFO] [stdout] 1028 | (n as f64 / param.mcmc.n_iter as f64) as f64 * 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(n as f64 / param.mcmc.n_iter as f64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `update_feature_groups` doesn't need a mutable reference [INFO] [stdout] --> src/bayesian_mcmc.rs:1072:54 [INFO] [stdout] | [INFO] [stdout] 1072 | let z_new = bp.update_feature_groups(&z, &mut ind, feature_idx, new_coef); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 1072 - let z_new = bp.update_feature_groups(&z, &mut ind, feature_idx, new_coef); [INFO] [stdout] 1072 + let z_new = bp.update_feature_groups(&z, &ind, feature_idx, new_coef); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bayesian_mcmc.rs:1164:58 [INFO] [stdout] | [INFO] [stdout] 1164 | mcmc_result = get_best_mcmc_sbs(&data, &results, ¶m); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bayesian_mcmc.rs:1231:37 [INFO] [stdout] | [INFO] [stdout] 1231 | .map(|(_, _, _, _, idx, _)| idx.clone()) [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/beam.rs:53:36 [INFO] [stdout] | [INFO] [stdout] 53 | fn generate_combinations(features: &Vec, k: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 53 - fn generate_combinations(features: &Vec, k: usize) -> Vec> { [INFO] [stdout] 53 + fn generate_combinations(features: &[usize], k: usize) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/beam.rs:314:21 [INFO] [stdout] | [INFO] [stdout] 314 | / tmp_ind.features = tmp_ind [INFO] [stdout] 315 | | .features [INFO] [stdout] 316 | | .into_iter() [INFO] [stdout] 317 | | .filter(|(_, coeff)| *coeff > 0) [INFO] [stdout] 318 | | .collect(); [INFO] [stdout] | |__________________________________^ help: consider calling `.retain()` instead: `tmp_ind.features.retain(|_, &mut coeff| *coeff > 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/beam.rs:393:21 [INFO] [stdout] | [INFO] [stdout] 393 | features.extend(unique_features.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/collect.rs:416:17 [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] 393 - features.extend(unique_features.into_iter()); [INFO] [stdout] 393 + features.extend(unique_features); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/beam.rs:595:25 [INFO] [stdout] | [INFO] [stdout] 595 | all_features.extend(selected_negative.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/collect.rs:416:17 [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] 595 - all_features.extend(selected_negative.into_iter()); [INFO] [stdout] 595 + all_features.extend(selected_negative); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/beam.rs:742:51 [INFO] [stdout] | [INFO] [stdout] 742 | let populations = iterative_growth(&base_pop, &data, &gpu_assay, param, running, &mut rng); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/beam.rs:773:43 [INFO] [stdout] | [INFO] [stdout] 773 | let pattern_ind = generate_individual(&data, TERNARY_LANG, RAW_TYPE, ¶m); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/beam.rs:773:74 [INFO] [stdout] | [INFO] [stdout] 773 | let pattern_ind = generate_individual(&data, TERNARY_LANG, RAW_TYPE, ¶m); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:821:38 [INFO] [stdout] | [INFO] [stdout] 821 | cv = Some(CV::new_from_param(&data, param, &mut data_rng, folds_nb)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/beam.rs:834:46 [INFO] [stdout] | [INFO] [stdout] 834 | create_gpu_assays_for_folds_beam(cv, ¶m) [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:842:30 [INFO] [stdout] | [INFO] [stdout] 842 | pop.fit_on_folds(cv, ¶m, &gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:862:16 [INFO] [stdout] | [INFO] [stdout] 862 | if last_pop.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/beam.rs:935:12 [INFO] [stdout] | [INFO] [stdout] 935 | if pop.individuals.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/beam.rs:945:16 [INFO] [stdout] | [INFO] [stdout] 945 | if pop.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/beam.rs:1034:34 [INFO] [stdout] | [INFO] [stdout] 1034 | new_pop.fit_on_folds(cv, ¶m, gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:1037:21 [INFO] [stdout] | [INFO] [stdout] 1037 | new_pop.fit(&data, &mut None, gpu_assay, &None, param); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: unneeded late initialization [INFO] [stdout] --> src/beam.rs:1283:5 [INFO] [stdout] | [INFO] [stdout] 1283 | let best_n_pop; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `best_n_pop` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1283 ~ [INFO] [stdout] 1284 ~ let best_n_pop = if all_models.individuals.len() > n as usize && n as usize != 0 { [INFO] [stdout] 1285 ~ Population { [INFO] [stdout] 1286 | individuals: all_models.individuals.clone()[..n as usize].to_vec(), [INFO] [stdout] 1287 | } [INFO] [stdout] 1288 | } else { [INFO] [stdout] 1289 ~ all_models [INFO] [stdout] 1290 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1284:39 [INFO] [stdout] | [INFO] [stdout] 1284 | if all_models.individuals.len() > n as usize && n as usize != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1284:53 [INFO] [stdout] | [INFO] [stdout] 1284 | if all_models.individuals.len() > n as usize && n as usize != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1286:59 [INFO] [stdout] | [INFO] [stdout] 1286 | individuals: all_models.individuals.clone()[..n as usize].to_vec(), [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1323:19 [INFO] [stdout] | [INFO] [stdout] 1323 | } else if (param.beam.max_nb_of_models as usize) * lang_data_combinations [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1331:14 [INFO] [stdout] | [INFO] [stdout] 1331 | ((param.beam.max_nb_of_models*lang_data_combinations) as usize * data.sample_len * std::mem::size_of::()) as f64 ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(param.beam.max_nb_of_models*lang_data_combinations)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1334:26 [INFO] [stdout] | [INFO] [stdout] 1334 | let max_nb = (param.beam.max_nb_of_models as usize) * lang_data_combinations; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1386:19 [INFO] [stdout] | [INFO] [stdout] 1386 | } else if (param.beam.max_nb_of_models as usize) * lang_data_combinations > gpu_max_nb_models_val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1388:75 [INFO] [stdout] | [INFO] [stdout] 1388 | idx, gpu_max_nb_models_val, param.beam.max_nb_of_models * lang_data_combinations as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lang_data_combinations` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1391:26 [INFO] [stdout] | [INFO] [stdout] 1391 | let max_nb = (param.beam.max_nb_of_models as usize) * lang_data_combinations; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1401:19 [INFO] [stdout] | [INFO] [stdout] 1401 | } else if (param.beam.max_nb_of_models as usize) * lang_data_combinations > gpu_max_nb_models_train { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1403:77 [INFO] [stdout] | [INFO] [stdout] 1403 | idx, gpu_max_nb_models_train, param.beam.max_nb_of_models * lang_data_combinations as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lang_data_combinations` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1406:26 [INFO] [stdout] | [INFO] [stdout] 1406 | let max_nb = (param.beam.max_nb_of_models as usize) * lang_data_combinations; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:270:38 [INFO] [stdout] | [INFO] [stdout] 270 | cv = Some(CV::new_from_param(&data, param, &mut data_rng, folds_nb)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/ga.rs:291:30 [INFO] [stdout] | [INFO] [stdout] 291 | pop.fit_on_folds(cv, ¶m, &gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ga.rs:305:50 [INFO] [stdout] | [INFO] [stdout] 305 | if param.ga.random_sampling_pct > 0.0 && epoch % param.ga.random_sampling_epochs == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.random_sampling_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:311:45 [INFO] [stdout] | [INFO] [stdout] 311 | pop.fit(&epoch_data, &mut None, &gpu_assay, &None, param); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `gpu_assay` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ga.rs:318:16 [INFO] [stdout] | [INFO] [stdout] 318 | && epoch % param.cv.resampling_inner_folds_epochs == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.cv.resampling_inner_folds_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:326:42 [INFO] [stdout] | [INFO] [stdout] 326 | cv = Some(CV::new_from_param(&data, param, &mut data_rng, folds_nb)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/ga.rs:331:38 [INFO] [stdout] | [INFO] [stdout] 331 | pop.fit_on_folds(cv, ¶m, &gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ga.rs:358:9 [INFO] [stdout] | [INFO] [stdout] 358 | / if epoch >= param.ga.min_epochs { [INFO] [stdout] 359 | | if epoch - best_model.epoch + 1 > param.ga.max_age_best_model { [INFO] [stdout] 360 | | info!("Best model has reached limit age..."); [INFO] [stdout] 361 | | need_to_break = true; [INFO] [stdout] 362 | | } [INFO] [stdout] 363 | | } [INFO] [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] 358 ~ if epoch >= param.ga.min_epochs [INFO] [stdout] 359 ~ && epoch - best_model.epoch + 1 > param.ga.max_age_best_model { [INFO] [stdout] 360 | info!("Best model has reached limit age..."); [INFO] [stdout] 361 | need_to_break = true; [INFO] [stdout] 362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ga.rs:380:16 [INFO] [stdout] | [INFO] [stdout] 380 | if populations.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `populations.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:390:53 [INFO] [stdout] | [INFO] [stdout] 390 | last_population.compute_all_metrics(&data, ¶m.general.fit); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 (8/7) [INFO] [stdout] --> src/ga.rs:418:1 [INFO] [stdout] | [INFO] [stdout] 418 | / pub fn evolve( [INFO] [stdout] 419 | | pop: Population, [INFO] [stdout] 420 | | data: &Data, [INFO] [stdout] 421 | | cv: &mut Option, [INFO] [stdout] ... | [INFO] [stdout] 426 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 427 | | ) -> Population { [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ga.rs:433:48 [INFO] [stdout] | [INFO] [stdout] 433 | if param.ga.forced_diversity_pct != 0.0 && epoch % param.ga.forced_diversity_epochs == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.forced_diversity_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:476:35 [INFO] [stdout] | [INFO] [stdout] 476 | children.fit_on_folds(cv, ¶m, gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/ga.rs:479:22 [INFO] [stdout] | [INFO] [stdout] 479 | children.fit(&data, &mut None, gpu_assay, &None, param); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/ga.rs:512:9 [INFO] [stdout] | [INFO] [stdout] 512 | / if !individual_by_types.contains_key(&i_type) { [INFO] [stdout] 513 | | individual_by_types.insert(i_type, vec![individual]); [INFO] [stdout] 514 | | } else { [INFO] [stdout] 515 | | individual_by_types [INFO] [stdout] ... | [INFO] [stdout] 518 | | .push(individual); [INFO] [stdout] 519 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 512 ~ if let std::collections::hash_map::Entry::Vacant(e) = individual_by_types.entry(i_type) { [INFO] [stdout] 513 + e.insert(vec![individual]); [INFO] [stdout] 514 + } else { [INFO] [stdout] 515 + individual_by_types [INFO] [stdout] 516 + .get_mut(&i_type) [INFO] [stdout] 517 + .unwrap() [INFO] [stdout] 518 + .push(individual); [INFO] [stdout] 519 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ga.rs:650:24 [INFO] [stdout] | [INFO] [stdout] 650 | feature_selection: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 650 - feature_selection: &Vec, [INFO] [stdout] 650 + feature_selection: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:818:45 [INFO] [stdout] | [INFO] [stdout] 818 | if individual.features.contains_key(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:820:40 [INFO] [stdout] | [INFO] [stdout] 820 | individual.features.remove(&i); [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:853:45 [INFO] [stdout] | [INFO] [stdout] 853 | if individual.features.contains_key(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:855:40 [INFO] [stdout] | [INFO] [stdout] 855 | individual.features.remove(&i); [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:887:57 [INFO] [stdout] | [INFO] [stdout] 887 | let value = if individual.features.contains_key(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:889:40 [INFO] [stdout] | [INFO] [stdout] 889 | individual.features.remove(&i).unwrap() [INFO] [stdout] | ^^ help: change this to: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ga.rs:903:17 [INFO] [stdout] | [INFO] [stdout] 903 | / if value != 0 { [INFO] [stdout] 904 | | individual [INFO] [stdout] 905 | | .features [INFO] [stdout] 906 | | .insert(*i, if value.abs() < 64 { 2 * value } else { value }); [INFO] [stdout] 907 | | individual.k += 1; [INFO] [stdout] 908 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 902 ~ r if r < p3 [INFO] [stdout] 903 ~ && value != 0 => { [INFO] [stdout] 904 | individual [INFO] [stdout] ... [INFO] [stdout] 907 | individual.k += 1; [INFO] [stdout] 908 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ga.rs:911:17 [INFO] [stdout] | [INFO] [stdout] 911 | / if value != 0 { [INFO] [stdout] 912 | | individual [INFO] [stdout] 913 | | .features [INFO] [stdout] 914 | | .insert(*i, if value.abs() == 1 { value } else { value / 2 }); [INFO] [stdout] 915 | | individual.k += 1; [INFO] [stdout] 916 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 910 ~ r if r < p4 [INFO] [stdout] 911 ~ && value != 0 => { [INFO] [stdout] 912 | individual [INFO] [stdout] ... [INFO] [stdout] 915 | individual.k += 1; [INFO] [stdout] 916 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:186:32 [INFO] [stdout] | [INFO] [stdout] 186 | run_cv_training(&data, ¶m, running) [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:189:48 [INFO] [stdout] | [INFO] [stdout] 189 | run_training(&mut data, &mut None, ¶m, running); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:346:32 [INFO] [stdout] | [INFO] [stdout] 346 | run_cv_training(&data, ¶m, running) [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:349:48 [INFO] [stdout] | [INFO] [stdout] 349 | run_training(&mut data, &mut None, ¶m, running); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:499:50 [INFO] [stdout] | [INFO] [stdout] 499 | run_training(&mut data, initial_pop, ¶m, running); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:600:68 [INFO] [stdout] | [INFO] [stdout] 600 | (collection, meta) = (ga(data, &mut None, initial_pop, ¶m, running), None); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:608:70 [INFO] [stdout] | [INFO] [stdout] 608 | (collection, meta) = (beam(data, &mut None, initial_pop, ¶m, running), None); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:611:17 [INFO] [stdout] | [INFO] [stdout] 611 | param.beam.max_nb_of_models as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:648:6 [INFO] [stdout] | [INFO] [stdout] 648 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 649 | | Vec>, [INFO] [stdout] 650 | | Population, [INFO] [stdout] 651 | | Option, Vec)>>, [INFO] [stdout] 652 | | Option, [INFO] [stdout] 653 | | ) { [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:656:40 [INFO] [stdout] | [INFO] [stdout] 656 | let mut folds = CV::new_from_param(&data, param, &mut rng, param.cv.outer_folds); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: unneeded late initialization [INFO] [stdout] --> src/lib.rs:659:5 [INFO] [stdout] | [INFO] [stdout] 659 | let collections; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 685 | collections = folds.fold_collections; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `collections` here [INFO] [stdout] | [INFO] [stdout] 659 ~ [INFO] [stdout] 660 | let mut final_population; [INFO] [stdout] ... [INFO] [stdout] 684 | [INFO] [stdout] 685 ~ let collections = folds.fold_collections; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:682:26 [INFO] [stdout] | [INFO] [stdout] 682 | final_population.fit(&data, &mut None, &None, &None, &run_param); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: the borrowed expression implements the required traits [INFO] [stdout] --> examples/generate_version_experiments.rs:28:15 [INFO] [stdout] | [INFO] [stdout] 28 | .args(&["rev-parse", "HEAD"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["rev-parse", "HEAD"]` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> tests/test_consistency.rs:313:18 [INFO] [stdout] | [INFO] [stdout] 313 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | let logger = if param.general.log_base.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.general.log_base.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: length comparison to zero [INFO] [stdout] --> src/main.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | let logger = if param.general.log_base.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.general.log_base.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:120:22 [INFO] [stdout] | [INFO] [stdout] 120 | Signals::new(&[SIGTERM, SIGHUP, SIGINT]).expect("Failed to set up signal handler"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[SIGTERM, SIGHUP, SIGINT]` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/main.rs:131:16 [INFO] [stdout] | [INFO] [stdout] 131 | if soft_kill == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `!soft_kill` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:120:22 [INFO] [stdout] | [INFO] [stdout] 120 | Signals::new(&[SIGTERM, SIGHUP, SIGINT]).expect("Failed to set up signal handler"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[SIGTERM, SIGHUP, SIGINT]` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/main.rs:131:16 [INFO] [stdout] | [INFO] [stdout] 131 | if soft_kill == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `!soft_kill` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:174:34 [INFO] [stdout] | [INFO] [stdout] 174 | if param.general.save_exp != "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:174:34 [INFO] [stdout] | [INFO] [stdout] 174 | if param.general.save_exp != "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use gpredomics; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/test_ga_e2e_qin2014.rs:142:15 [INFO] [stdout] | [INFO] [stdout] 142 | .args(&["rev-parse", "HEAD"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["rev-parse", "HEAD"]` [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] --> tests/test_beam_e2e_qin2014.rs:168:15 [INFO] [stdout] | [INFO] [stdout] 168 | .args(&["rev-parse", "HEAD"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["rev-parse", "HEAD"]` [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: length comparison to one [INFO] [stdout] --> tests/test_beam_e2e_qin2014.rs:433:9 [INFO] [stdout] | [INFO] [stdout] 433 | beam_populations.len() >= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!beam_populations.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: length comparison to zero [INFO] [stdout] --> tests/test_beam_e2e_qin2014.rs:1525:13 [INFO] [stdout] | [INFO] [stdout] 1525 | jury.experts.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!jury.experts.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_ga_e2e_qin2014.rs:471:9 [INFO] [stdout] | [INFO] [stdout] 471 | experiment.train_data.feature_selection.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!experiment.train_data.feature_selection.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: length comparison to zero [INFO] [stdout] --> tests/test_beam_e2e_qin2014.rs:1839:13 [INFO] [stdout] | [INFO] [stdout] 1839 | jury.experts.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!jury.experts.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:69:15 [INFO] [stdout] | [INFO] [stdout] 69 | .args(&["rev-parse", "HEAD"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["rev-parse", "HEAD"]` [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: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | population.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.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: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | first_sample.features.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!first_sample.features.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | assert!(population.individuals.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:239:17 [INFO] [stdout] | [INFO] [stdout] 239 | assert!(population.individuals.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:292:17 [INFO] [stdout] | [INFO] [stdout] 292 | assert!(population.individuals.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:340:17 [INFO] [stdout] | [INFO] [stdout] 340 | assert!(population.individuals.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:370:17 [INFO] [stdout] | [INFO] [stdout] 370 | assert!(population.individuals.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:614:9 [INFO] [stdout] | [INFO] [stdout] 614 | population.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:626:17 [INFO] [stdout] | [INFO] [stdout] 626 | assert!(individual.features.len() > 0, "Should have features"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!individual.features.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_ga_e2e_qin2014.rs:1436:13 [INFO] [stdout] | [INFO] [stdout] 1436 | jury.experts.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!jury.experts.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:690:17 [INFO] [stdout] | [INFO] [stdout] 690 | assert!(population.individuals.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:728:13 [INFO] [stdout] | [INFO] [stdout] 728 | population.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_mcmc_e2e_qin2014.rs:756:13 [INFO] [stdout] | [INFO] [stdout] 756 | assert!(aucs.len() > 0, "Should have posterior samples"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!aucs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/test_ga_e2e_qin2014.rs:1745:13 [INFO] [stdout] | [INFO] [stdout] 1745 | jury.experts.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!jury.experts.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/gpu.rs:130:15 [INFO] [stdout] | [INFO] [stdout] 130 | mat_cols: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 130 - mat_cols: &Vec>, [INFO] [stdout] 130 + mat_cols: &[HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/gpu.rs:296:28 [INFO] [stdout] | [INFO] [stdout] 296 | feature_selection: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 296 - feature_selection: &Vec, [INFO] [stdout] 296 + feature_selection: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/gpu.rs:797:13 [INFO] [stdout] | [INFO] [stdout] 797 | return result_vec; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 797 - return result_vec; [INFO] [stdout] 797 + result_vec [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/gpu.rs:632:42 [INFO] [stdout] | [INFO] [stdout] 632 | pub fn compute_scores(&self, models: &Vec, threshold: f32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 632 - pub fn compute_scores(&self, models: &Vec, threshold: f32) -> Vec { [INFO] [stdout] 632 + pub fn compute_scores(&self, models: &[Individual], threshold: f32) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/gpu.rs:761:27 [INFO] [stdout] | [INFO] [stdout] 761 | let group_x = (num_models as u32 + 15) / 16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(num_models as u32).div_ceil(16)` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/gpu.rs:762:27 [INFO] [stdout] | [INFO] [stdout] 762 | let group_y = (self.samples as u32 + 15) / 16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(self.samples as u32).div_ceil(16)` [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 operation has no effect [INFO] [stdout] --> src/gpu.rs:1353:24 [INFO] [stdout] | [INFO] [stdout] 1353 | max_size > 1 * 1024 * 1024, [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `1024` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> src/gpu.rs:2114:9 [INFO] [stdout] | [INFO] [stdout] 2114 | assert!(true, "WGSL shader compiled successfully"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/utils.rs:71:21 [INFO] [stdout] | [INFO] [stdout] 71 | while let Some(c) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for c in chars.by_ref()` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/utils.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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/utils.rs:272:9 [INFO] [stdout] | [INFO] [stdout] 272 | alpha >= 0.0 && alpha <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&alpha)` [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/utils.rs:318:9 [INFO] [stdout] | [INFO] [stdout] 318 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:405:49 [INFO] [stdout] | [INFO] [stdout] 405 | pub fn compute_auc_from_value(value: &[f64], y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 405 - pub fn compute_auc_from_value(value: &[f64], y: &Vec) -> f64 { [INFO] [stdout] 405 + pub fn compute_auc_from_value(value: &[f64], y: &[u8]) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:460:5 [INFO] [stdout] | [INFO] [stdout] 460 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 460 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:486:16 [INFO] [stdout] | [INFO] [stdout] 486 | predicted: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 486 - predicted: &Vec, [INFO] [stdout] 486 + predicted: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:487:8 [INFO] [stdout] | [INFO] [stdout] 487 | y: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 487 - y: &Vec, [INFO] [stdout] 487 + y: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/utils.rs:559:5 [INFO] [stdout] | [INFO] [stdout] 559 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 559 | /// [MCC, F1-score, NPV, PPV, G-mean] [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/utils.rs:1141:41 [INFO] [stdout] | [INFO] [stdout] 1141 | strata.entry(tag_value).or_insert_with(Vec::new).push(idx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:1254:8 [INFO] [stdout] | [INFO] [stdout] 1254 | y: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1254 - y: &Vec, [INFO] [stdout] 1254 + y: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/utils.rs:1405:1 [INFO] [stdout] | [INFO] [stdout] 1405 | / pub fn compute_threshold_and_metrics_with_bootstrap( [INFO] [stdout] 1406 | | value: &[f64], [INFO] [stdout] 1407 | | y: &Vec, [INFO] [stdout] 1408 | | fit_function: &FitFunction, [INFO] [stdout] ... | [INFO] [stdout] 1413 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1414 | | ) -> (f64, [f64; 3], f64, f64, f64, f64, f64) { [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: length comparison to zero [INFO] [stdout] --> src/utils.rs:1704:8 [INFO] [stdout] | [INFO] [stdout] 1704 | if pop.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pop.individuals.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: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:1717:17 [INFO] [stdout] | [INFO] [stdout] 1717 | &pop.individuals.iter().map(|i| {i.auc}).sum::()/param.ga.population_size as f64, [INFO] [stdout] | -----------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pop.individuals.iter().map(|i| {i.auc}).sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:1718:17 [INFO] [stdout] | [INFO] [stdout] 1718 | &pop.individuals.iter().map(|i| {i.fit}).sum::()/param.ga.population_size as f64, [INFO] [stdout] | -----------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `pop.individuals.iter().map(|i| {i.fit}).sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bar` [INFO] [stdout] --> src/utils.rs:1733:18 [INFO] [stdout] | [INFO] [stdout] 1733 | for i in (max_pos + 1)..scale { [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 [INFO] [stdout] | [INFO] [stdout] 1733 - for i in (max_pos + 1)..scale { [INFO] [stdout] 1733 + for in bar.iter_mut().take(scale).skip((max_pos + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/utils.rs:1753:52 [INFO] [stdout] | [INFO] [stdout] 1753 | if param.ga.forced_diversity_pct != 0.0 && epoch % param.ga.forced_diversity_epochs == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.forced_diversity_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/utils.rs:1756:50 [INFO] [stdout] | [INFO] [stdout] 1756 | if param.ga.random_sampling_pct > 0.0 && epoch % param.ga.random_sampling_epochs == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.random_sampling_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/utils.rs:1759:20 [INFO] [stdout] | [INFO] [stdout] 1759 | && epoch % param.cv.resampling_inner_folds_epochs == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.cv.resampling_inner_folds_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/utils.rs:1764:44 [INFO] [stdout] | [INFO] [stdout] 1764 | let analysis_tag = if param.tag != "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/utils.rs:1877:5 [INFO] [stdout] | [INFO] [stdout] 1877 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:1997:9 [INFO] [stdout] | [INFO] [stdout] 1997 | return "0".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1997 - return "0".to_string(); [INFO] [stdout] 1997 + "0".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:1999:9 [INFO] [stdout] | [INFO] [stdout] 1999 | return format!("{:.1e}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1999 - return format!("{:.1e}", value); [INFO] [stdout] 1999 + format!("{:.1e}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2001:9 [INFO] [stdout] | [INFO] [stdout] 2001 | return format!("{:.4}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2001 - return format!("{:.4}", value); [INFO] [stdout] 2001 + format!("{:.4}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2003:9 [INFO] [stdout] | [INFO] [stdout] 2003 | return format!("{:.3}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2003 - return format!("{:.3}", value); [INFO] [stdout] 2003 + format!("{:.3}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2005:9 [INFO] [stdout] | [INFO] [stdout] 2005 | return format!("{:.2}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2005 - return format!("{:.2}", value); [INFO] [stdout] 2005 + format!("{:.2}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2008:13 [INFO] [stdout] | [INFO] [stdout] 2008 | return format!("{:.0}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2008 - return format!("{:.0}", value); [INFO] [stdout] 2008 + format!("{:.0}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2010:13 [INFO] [stdout] | [INFO] [stdout] 2010 | return format!("{:.1}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2010 - return format!("{:.1}", value); [INFO] [stdout] 2010 + format!("{:.1}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2014:13 [INFO] [stdout] | [INFO] [stdout] 2014 | return format!("{:.0}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2014 - return format!("{:.0}", value); [INFO] [stdout] 2014 + format!("{:.0}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:2016:13 [INFO] [stdout] | [INFO] [stdout] 2016 | return format!("{:.1}", value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2016 - return format!("{:.1}", value); [INFO] [stdout] 2016 + format!("{:.1}", value) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/utils.rs:2006:32 [INFO] [stdout] | [INFO] [stdout] 2006 | } else if abs_value < 10.0 { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 2007 | | if (value - value.round()).abs() < 1e-10 { [INFO] [stdout] 2008 | | return format!("{:.0}", value); [INFO] [stdout] 2009 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 2012 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/utils.rs:2012:12 [INFO] [stdout] | [INFO] [stdout] 2012 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 2013 | | if (value - value.round()).abs() < 1e-10 { [INFO] [stdout] 2014 | | return format!("{:.0}", value); [INFO] [stdout] 2015 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 2018 | | } [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: manual `!Range::contains` implementation [INFO] [stdout] --> src/utils.rs:1998:15 [INFO] [stdout] | [INFO] [stdout] 1998 | } else if abs_value < 0.001 || abs_value >= 10000.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.001..10000.0).contains(&abs_value)` [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/utils.rs:2621:13 [INFO] [stdout] | [INFO] [stdout] 2621 | auc >= 0.0 && auc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/utils.rs:2743:17 [INFO] [stdout] | [INFO] [stdout] 2743 | assert!(auc >= 0.0 && auc <= 1.0, "AUC should be between 0 and 1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/utils.rs:2745:13 [INFO] [stdout] | [INFO] [stdout] 2745 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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/utils.rs:2749:13 [INFO] [stdout] | [INFO] [stdout] 2749 | sensitivity >= 0.0 && sensitivity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sensitivity)` [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/utils.rs:2753:13 [INFO] [stdout] | [INFO] [stdout] 2753 | specificity >= 0.0 && specificity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&specificity)` [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: the loop variable `i` is only used to index `sample` [INFO] [stdout] --> src/utils.rs:3868:18 [INFO] [stdout] | [INFO] [stdout] 3868 | for i in 0..n_pos { [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] 3868 - for i in 0..n_pos { [INFO] [stdout] 3868 + for in sample.iter().take(n_pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sample` [INFO] [stdout] --> src/utils.rs:3877:18 [INFO] [stdout] | [INFO] [stdout] 3877 | for i in n_pos..sample.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 3877 - for i in n_pos..sample.len() { [INFO] [stdout] 3877 + for in sample.iter().skip(n_pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/utils.rs:4545:17 [INFO] [stdout] | [INFO] [stdout] 4545 | assert!(acc >= 0.0 && acc <= 1.0, "Accuracy in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&acc)` [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/utils.rs:4546:17 [INFO] [stdout] | [INFO] [stdout] 4546 | assert!(se >= 0.0 && se <= 1.0, "Sensitivity in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&se)` [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/utils.rs:4547:17 [INFO] [stdout] | [INFO] [stdout] 4547 | assert!(sp >= 0.0 && sp <= 1.0, "Specificity in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sp)` [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/utils.rs:4730:17 [INFO] [stdout] | [INFO] [stdout] 4730 | assert!(obj >= 0.0 && obj <= 1.0, "Objective should be in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&obj)` [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/utils.rs:4755:13 [INFO] [stdout] | [INFO] [stdout] 4755 | acc >= 0.0 && acc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&acc)` [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/utils.rs:4812:13 [INFO] [stdout] | [INFO] [stdout] 4812 | auc >= 0.5 && auc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.5..=1.0).contains(&auc)` [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/utils.rs:4853:17 [INFO] [stdout] | [INFO] [stdout] 4853 | se >= 0.0 && se <= 1.0 || se.is_nan(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&se)` [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/utils.rs:4893:17 [INFO] [stdout] | [INFO] [stdout] 4893 | assert!(se >= 0.0 && se <= 1.0, "Sensitivity should be in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&se)` [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/utils.rs:4894:17 [INFO] [stdout] | [INFO] [stdout] 4894 | assert!(sp >= 0.0 && sp <= 1.0, "Specificity should be in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sp)` [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/utils.rs:4901:13 [INFO] [stdout] | [INFO] [stdout] 4901 | center >= 0.0 && center <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(¢er)` [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/utils.rs:5038:17 [INFO] [stdout] | [INFO] [stdout] 5038 | assert!(acc >= 0.0 && acc <= 1.0, "Accuracy should be in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&acc)` [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/utils.rs:5039:17 [INFO] [stdout] | [INFO] [stdout] 5039 | assert!(se >= 0.0 && se <= 1.0, "Sensitivity should be in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&se)` [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/utils.rs:5040:17 [INFO] [stdout] | [INFO] [stdout] 5040 | assert!(sp >= 0.0 && sp <= 1.0, "Specificity should be in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sp)` [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/utils.rs:5043:13 [INFO] [stdout] | [INFO] [stdout] 5043 | acc_check >= 0.0 && acc_check <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&acc_check)` [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/utils.rs:5047:13 [INFO] [stdout] | [INFO] [stdout] 5047 | se_check >= 0.0 && se_check <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&se_check)` [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/utils.rs:5051:13 [INFO] [stdout] | [INFO] [stdout] 5051 | sp_check >= 0.0 && sp_check <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sp_check)` [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/utils.rs:5099:17 [INFO] [stdout] | [INFO] [stdout] 5099 | assert!(auc >= 0.0 && auc <= 1.0, "AUC in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/utils.rs:5100:17 [INFO] [stdout] | [INFO] [stdout] 5100 | assert!(acc >= 0.0 && acc <= 1.0, "Accuracy in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&acc)` [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/utils.rs:5101:17 [INFO] [stdout] | [INFO] [stdout] 5101 | assert!(se >= 0.0 && se <= 1.0, "Sensitivity in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&se)` [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/utils.rs:5102:17 [INFO] [stdout] | [INFO] [stdout] 5102 | assert!(rej >= 0.0 && rej <= 1.0, "Rejection rate in [0,1]"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rej)` [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/utils.rs:5296:17 [INFO] [stdout] | [INFO] [stdout] 5296 | assert!(auc >= 0.0 && auc <= 1.0, "AUC should be between 0 and 1"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/utils.rs:5396:17 [INFO] [stdout] | [INFO] [stdout] 5396 | assert!(auc >= 0.0 && auc <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/utils.rs:5397:17 [INFO] [stdout] | [INFO] [stdout] 5397 | assert!(obj >= -1.0 && obj <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1.0..=1.0).contains(&obj)` [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/utils.rs:5494:17 [INFO] [stdout] | [INFO] [stdout] 5494 | assert!(auc >= 0.0 && auc <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/utils.rs:5566:17 [INFO] [stdout] | [INFO] [stdout] 5566 | assert!(auc >= 0.0 && auc <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/cv.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | .zip(indices_class1_folds.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] 54 - .zip(indices_class1_folds.into_iter()) [INFO] [stdout] 54 + .zip(indices_class1_folds) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `validation_folds` [INFO] [stdout] --> src/cv.rs:63:22 [INFO] [stdout] | [INFO] [stdout] 63 | for j in 0..folds { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 63 - for j in 0..folds { [INFO] [stdout] 63 + for (j, ) in validation_folds.iter().enumerate().take(folds) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cv.rs:117:14 [INFO] [stdout] | [INFO] [stdout] 117 | .expect(&format!( [INFO] [stdout] | ______________^ [INFO] [stdout] 118 | | "Stratification column '{}' not found in sample annotations", [INFO] [stdout] 119 | | stratify_by [INFO] [stdout] 120 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 117 ~ .unwrap_or_else(|| panic!("Stratification column '{}' not found in sample annotations", [INFO] [stdout] 118 ~ stratify_by)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/cv.rs:152:18 [INFO] [stdout] | [INFO] [stdout] 152 | .zip(indices_class1_folds.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] 152 - .zip(indices_class1_folds.into_iter()) [INFO] [stdout] 152 + .zip(indices_class1_folds) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `validation_folds` [INFO] [stdout] --> src/cv.rs:161:22 [INFO] [stdout] | [INFO] [stdout] 161 | for j in 0..folds { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 161 - for j in 0..folds { [INFO] [stdout] 161 + for (j, ) in validation_folds.iter().enumerate().take(folds) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:191:12 [INFO] [stdout] | [INFO] [stdout] 191 | if param.cv.stratify_by.len() > 0 && data.sample_annotations.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.cv.stratify_by.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:231:28 [INFO] [stdout] | [INFO] [stdout] 231 | if collection.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!collection.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:234:32 [INFO] [stdout] | [INFO] [stdout] 234 | ... if final_population.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!final_population.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:297:13 [INFO] [stdout] | [INFO] [stdout] 297 | self.fold_collections.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.fold_collections.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:320:16 [INFO] [stdout] | [INFO] [stdout] 320 | if fold_last_fbm.individuals.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `fold_last_fbm.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/cv.rs:451:17 [INFO] [stdout] | [INFO] [stdout] 451 | param.beam.max_nb_of_models as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:503:16 [INFO] [stdout] | [INFO] [stdout] 503 | if self.fold_collections[fold_idx].len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.fold_collections[fold_idx].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:504:20 [INFO] [stdout] | [INFO] [stdout] 504 | && self.fold_collections[fold_idx] [INFO] [stdout] | ____________________^ [INFO] [stdout] 505 | | .last() [INFO] [stdout] 506 | | .unwrap() [INFO] [stdout] 507 | | .individuals [INFO] [stdout] 508 | | .len() [INFO] [stdout] 509 | | > 0 [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] help: using `!is_empty` is clearer and more explicit [INFO] [stdout] | [INFO] [stdout] 504 ~ && !self.fold_collections[fold_idx] [INFO] [stdout] 505 + .last() [INFO] [stdout] 506 + .unwrap() [INFO] [stdout] 507 + .individuals.is_empty() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cv.rs:511:59 [INFO] [stdout] | [INFO] [stdout] 511 | let fbm = self.extract_fold_fbm(fold_idx, ¶m); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cv.rs:524:25 [INFO] [stdout] | [INFO] [stdout] 524 | ¶m [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/cv.rs:702:29 [INFO] [stdout] | [INFO] [stdout] 702 | let expected_size = (data.y.len() + outer_folds - 1) / outer_folds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `data.y.len().div_ceil(outer_folds)` [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: length comparison to zero [INFO] [stdout] --> src/cv.rs:866:17 [INFO] [stdout] | [INFO] [stdout] 866 | assert!(cv.fold_collections.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cv.fold_collections.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:885:17 [INFO] [stdout] | [INFO] [stdout] 885 | assert!(cv.fold_collections.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cv.fold_collections.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:913:17 [INFO] [stdout] | [INFO] [stdout] 913 | assert!(cv.fold_collections.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cv.fold_collections.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cv.rs:1482:17 [INFO] [stdout] | [INFO] [stdout] 1482 | assert!(cv.fold_collections.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cv.fold_collections.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/cv.rs:1628:35 [INFO] [stdout] | [INFO] [stdout] 1628 | let expected_class0 = (original_class0 + outer_folds - 1) / outer_folds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `original_class0.div_ceil(outer_folds)` [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/cv.rs:1629:35 [INFO] [stdout] | [INFO] [stdout] 1629 | let expected_class1 = (original_class1 + outer_folds - 1) / outer_folds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `original_class1.div_ceil(outer_folds)` [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 used to index `values` [INFO] [stdout] --> src/cv.rs:1672:18 [INFO] [stdout] | [INFO] [stdout] 1672 | for i in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1672 - for i in 0..sample_len { [INFO] [stdout] 1672 + for (i, ) in values.iter().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Data` [INFO] [stdout] --> src/data.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / pub fn new() -> Data { [INFO] [stdout] 97 | | Data { [INFO] [stdout] 98 | | X: HashMap::new(), [INFO] [stdout] 99 | | y: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 111 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 90 + impl Default for Data { [INFO] [stdout] 91 + fn default() -> Self { [INFO] [stdout] 92 + Self::new() [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `ranks` [INFO] [stdout] --> src/data.rs:904:22 [INFO] [stdout] | [INFO] [stdout] 904 | for j in start..=i { [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] 904 - for j in start..=i { [INFO] [stdout] 904 + for in ranks.iter_mut().take(i + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/data.rs:1040:10 [INFO] [stdout] | [INFO] [stdout] 1040 | ) -> (Vec<(usize, u8, f64)>, Vec<(usize, u8, f64)>) { [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: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/data.rs:1048:25 [INFO] [stdout] | [INFO] [stdout] 1048 | param.data.feature_minimal_prevalence_pct as f64 / 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.data.feature_minimal_prevalence_pct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/data.rs:1054:25 [INFO] [stdout] | [INFO] [stdout] 1054 | param.data.feature_minimal_prevalence_pct as f64 / 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.data.feature_minimal_prevalence_pct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/data.rs:1060:25 [INFO] [stdout] | [INFO] [stdout] 1060 | param.data.feature_minimal_prevalence_pct as f64 / 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.data.feature_minimal_prevalence_pct` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/data.rs:1142:20 [INFO] [stdout] | [INFO] [stdout] 1142 | .chain(class_1_features.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:510: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] 1142 - .chain(class_1_features.into_iter()) [INFO] [stdout] 1142 + .chain(class_1_features) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/data.rs:1149:18 [INFO] [stdout] | [INFO] [stdout] 1149 | ...!( self.feature_selection.len()>0, "No feature has been selected, please lower your selection criteria or improve the quality o... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.feature_selection.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/data.rs:1193:13 [INFO] [stdout] | [INFO] [stdout] 1193 | fdr_alpha >= 0.0 && fdr_alpha <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&fdr_alpha)` [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: function call inside of `expect` [INFO] [stdout] --> src/data.rs:1499:14 [INFO] [stdout] | [INFO] [stdout] 1499 | .expect(&format!( [INFO] [stdout] | ______________^ [INFO] [stdout] 1500 | | "Stratification column '{}' not found in sample annotations", [INFO] [stdout] 1501 | | stratify_col [INFO] [stdout] 1502 | | )); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1499 ~ .unwrap_or_else(|| panic!("Stratification column '{}' not found in sample annotations", [INFO] [stdout] 1500 ~ stratify_col)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/data.rs:1541:22 [INFO] [stdout] | [INFO] [stdout] 1541 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/data.rs:2563:9 [INFO] [stdout] | [INFO] [stdout] 2563 | assert_eq!(param.data.features_in_rows, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 2563 - assert_eq!(param.data.features_in_rows, true); [INFO] [stdout] 2563 + assert!(param.data.features_in_rows); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/data.rs:2637:17 [INFO] [stdout] | [INFO] [stdout] 2637 | assert!(corrected.len() >= 1, "Should keep at least top features"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!corrected.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `values` [INFO] [stdout] --> src/data.rs:3479:18 [INFO] [stdout] | [INFO] [stdout] 3479 | for i in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 3479 - for i in 0..sample_len { [INFO] [stdout] 3479 + for (i, ) in values.iter().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ImportanceCollection` [INFO] [stdout] --> src/experiment.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / pub fn new() -> ImportanceCollection { [INFO] [stdout] 115 | | ImportanceCollection { [INFO] [stdout] 116 | | importances: Vec::new(), [INFO] [stdout] 117 | | } [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 112 + impl Default for ImportanceCollection { [INFO] [stdout] 113 + fn default() -> Self { [INFO] [stdout] 114 + Self::new() [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/experiment.rs:191:31 [INFO] [stdout] | [INFO] [stdout] 191 | let type_ok = imp_type [INFO] [stdout] | _______________________________^ [INFO] [stdout] 192 | | .as_ref() [INFO] [stdout] 193 | | .map_or(true, |t| imp.importance_type == *t); [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 193 - .map_or(true, |t| imp.importance_type == *t); [INFO] [stdout] 193 + .is_none_or(|t| imp.importance_type == *t); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/experiment.rs:297:1 [INFO] [stdout] | [INFO] [stdout] 297 | / pub enum ExperimentMetadata { [INFO] [stdout] 298 | | /// Bayesian MCMC trace to analyze posterior distributions [INFO] [stdout] 299 | | / MCMC { [INFO] [stdout] 300 | | | /// Complete MCMC analysis trace [INFO] [stdout] 301 | | | trace: MCMCAnalysisTrace, [INFO] [stdout] 302 | | | }, [INFO] [stdout] | | |_____- the largest variant contains at least 1176 bytes [INFO] [stdout] 303 | | /// Voting Jury results [INFO] [stdout] 304 | | / Jury { [INFO] [stdout] 305 | | | /// Jury population [INFO] [stdout] 306 | | | jury: Jury, [INFO] [stdout] 307 | | | }, [INFO] [stdout] | | |_____- the second-largest variant contains at least 240 bytes [INFO] [stdout] 308 | | } [INFO] [stdout] | |___^ the entire enum is at least 1176 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 301 - trace: MCMCAnalysisTrace, [INFO] [stdout] 301 + trace: Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/experiment.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | if matches!(self.cv_folds_ids, None) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.cv_folds_ids.is_none()` [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: useless use of `format!` [INFO] [stdout] --> src/experiment.rs:442:24 [INFO] [stdout] | [INFO] [stdout] 442 | text.push_str(&format!("Experiment results:\n\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Experiment results:\n\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/experiment.rs:522:13 [INFO] [stdout] | [INFO] [stdout] 522 | / match metadata { [INFO] [stdout] 523 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 524 | | text.push_str(&format!( [INFO] [stdout] 525 | | "{}\n", [INFO] [stdout] ... | [INFO] [stdout] 529 | | _ => {} [INFO] [stdout] 530 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/experiment.rs:521:21 [INFO] [stdout] | [INFO] [stdout] 521 | if let Some(ref metadata) = self.others { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 522 | match metadata { [INFO] [stdout] 523 | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/experiment.rs:522:13 [INFO] [stdout] | [INFO] [stdout] 522 | / match metadata { [INFO] [stdout] 523 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 524 | | text.push_str(&format!( [INFO] [stdout] 525 | | "{}\n", [INFO] [stdout] ... | [INFO] [stdout] 529 | | _ => {} [INFO] [stdout] 530 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 522 ~ if let ExperimentMetadata::Jury { jury } = metadata { [INFO] [stdout] 523 + text.push_str(&format!( [INFO] [stdout] 524 + "{}\n", [INFO] [stdout] 525 + jury.display(&self.train_data, self.test_data.as_ref(), &self.parameters) [INFO] [stdout] 526 + )); [INFO] [stdout] 527 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/experiment.rs:574:12 [INFO] [stdout] | [INFO] [stdout] 574 | if self.train_data.check_compatibility(&new_data) == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.train_data.check_compatibility(&new_data)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `if let` [INFO] [stdout] --> src/experiment.rs:587:13 [INFO] [stdout] | [INFO] [stdout] 587 | / match metadata { [INFO] [stdout] 588 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 589 | | cinfo!( [INFO] [stdout] 590 | | self.parameters.general.display_colorful, [INFO] [stdout] ... | [INFO] [stdout] 595 | | _ => {} [INFO] [stdout] 596 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/experiment.rs:586:21 [INFO] [stdout] | [INFO] [stdout] 586 | if let Some(ref mut metadata) = self.others { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 587 | match metadata { [INFO] [stdout] 588 | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [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/experiment.rs:587:13 [INFO] [stdout] | [INFO] [stdout] 587 | / match metadata { [INFO] [stdout] 588 | | ExperimentMetadata::Jury { jury } => { [INFO] [stdout] 589 | | cinfo!( [INFO] [stdout] 590 | | self.parameters.general.display_colorful, [INFO] [stdout] ... | [INFO] [stdout] 595 | | _ => {} [INFO] [stdout] 596 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 587 ~ if let ExperimentMetadata::Jury { jury } = metadata { [INFO] [stdout] 588 + cinfo!( [INFO] [stdout] 589 + self.parameters.general.display_colorful, [INFO] [stdout] 590 + "{}", [INFO] [stdout] 591 + jury.display(&self.train_data, Some(&new_data), &self.parameters) [INFO] [stdout] 592 + ); [INFO] [stdout] 593 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/experiment.rs:1086:39 [INFO] [stdout] | [INFO] [stdout] 1086 | original_exp.save_messagepack(&file_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = 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/experiment.rs:1087:55 [INFO] [stdout] | [INFO] [stdout] 1087 | let loaded_exp = Experiment::load_messagepack(&file_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/experiment.rs:1099:35 [INFO] [stdout] | [INFO] [stdout] 1099 | original_exp.save_bincode(&file_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/experiment.rs:1100:51 [INFO] [stdout] | [INFO] [stdout] 1100 | let loaded_exp = Experiment::load_bincode(&file_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/param.rs:763:5 [INFO] [stdout] | [INFO] [stdout] 763 | let _ = validate(&mut config)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 763 - let _ = validate(&mut config)?; [INFO] [stdout] 763 + validate(&mut config)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/param.rs:790:8 [INFO] [stdout] | [INFO] [stdout] 790 | if param.general.log_base.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!param.general.log_base.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/param.rs:794:53 [INFO] [stdout] | [INFO] [stdout] 794 | if param.cv.fit_on_valid && param.data.Xtest == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/param.rs:820:20 [INFO] [stdout] | [INFO] [stdout] 820 | return Err(format!("Both Xtest and ytest must be provided together.",)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Both Xtest and ytest must be provided together.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/param.rs:911:30 [INFO] [stdout] | [INFO] [stdout] 911 | if param.general.algo == "ga".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `"ga"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/param.rs:915:20 [INFO] [stdout] | [INFO] [stdout] 915 | ...rr(format!("Randomized samples and overfit penalty cannot be used together. If you want to resample the folds of the cross-validation used to penalise overfitting, you can use the parameter random_sampling_epochs.")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Randomized samples and overfit penalty cannot be used together. If you want to resample the folds of the cross-validation used to penalise overfitting, you can use the parameter random_sampling_epochs.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/individual.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / impl Default for AdditionalMetrics { [INFO] [stdout] 52 | | fn default() -> Self { [INFO] [stdout] 53 | | AdditionalMetrics { [INFO] [stdout] 54 | | mcc: None, [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [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] 37 + #[derive(Default)] [INFO] [stdout] 38 | pub struct AdditionalMetrics { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Individual` [INFO] [stdout] --> src/individual.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | / pub fn new() -> Individual { [INFO] [stdout] 189 | | Individual { [INFO] [stdout] 190 | | features: HashMap::new(), [INFO] [stdout] 191 | | auc: 0.0, [INFO] [stdout] ... | [INFO] [stdout] 214 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 178 + impl Default for Individual { [INFO] [stdout] 179 + fn default() -> Self { [INFO] [stdout] 180 + Self::new() [INFO] [stdout] 181 + } [INFO] [stdout] 182 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:274:25 [INFO] [stdout] | [INFO] [stdout] 270 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] ... [INFO] [stdout] 274 | self.metrics.mcc.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:282:25 [INFO] [stdout] | [INFO] [stdout] 278 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] ... [INFO] [stdout] 282 | self.metrics.f1_score.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 286 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] ... [INFO] [stdout] 290 | self.metrics.npv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:298:25 [INFO] [stdout] | [INFO] [stdout] 294 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] ... [INFO] [stdout] 298 | self.metrics.ppv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:306:25 [INFO] [stdout] | [INFO] [stdout] 302 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] ... [INFO] [stdout] 306 | self.metrics.g_mean.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:321:55 [INFO] [stdout] | [INFO] [stdout] 320 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] 321 | m = format!("{} | MCC {:.3} ", m, self.metrics.mcc.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:324:60 [INFO] [stdout] | [INFO] [stdout] 323 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] 324 | m = format!("{} | F1-score {:.3} ", m, self.metrics.f1_score.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:327:55 [INFO] [stdout] | [INFO] [stdout] 326 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] 327 | m = format!("{} | NPV {:.3} ", m, self.metrics.npv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:330:55 [INFO] [stdout] | [INFO] [stdout] 329 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] 330 | m = format!("{} | PPV {:.3} ", m, self.metrics.ppv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/individual.rs:333:58 [INFO] [stdout] | [INFO] [stdout] 332 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] 333 | m = format!("{} | G-mean {:.3} ", m, self.metrics.g_mean.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/individual.rs:245:15 [INFO] [stdout] | [INFO] [stdout] 245 | algo: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 245 ~ algo: &str, [INFO] [stdout] 246 | ci_alpha: f64, [INFO] [stdout] 247 | ) -> String { [INFO] [stdout] 248 ~ let algo_str = match algo { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/individual.rs:357:13 [INFO] [stdout] | [INFO] [stdout] 357 | .enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 357 ~ [INFO] [stdout] 358 ~ .map(|&&(index, coef)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:364:50 [INFO] [stdout] | [INFO] [stdout] 364 | if self.language == POW2_LANG && !(*coef == 1_i8) && self.data_type != LOG_TYPE { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*coef != 1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:367:24 [INFO] [stdout] | [INFO] [stdout] 367 | && !(*coef == 1_i8) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(*coef != 1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/individual.rs:379:13 [INFO] [stdout] | [INFO] [stdout] 379 | .enumerate() [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 379 ~ [INFO] [stdout] 380 ~ .map(|&&(index, coef)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:386:50 [INFO] [stdout] | [INFO] [stdout] 386 | if self.language == POW2_LANG && !(*coef == -1_i8) && self.data_type != LOG_TYPE { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*coef != -1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/individual.rs:389:24 [INFO] [stdout] | [INFO] [stdout] 389 | && !(*coef == -1_i8) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(*coef != -1_i8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `data.classes.get(0)` [INFO] [stdout] --> src/individual.rs:405:22 [INFO] [stdout] | [INFO] [stdout] 405 | let class0 = data.classes.get(0).map(|s| s.as_str()).unwrap_or("0"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `data.classes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/individual.rs:601:46 [INFO] [stdout] | [INFO] [stdout] 601 | TERNARY_LANG | RATIO_LANG => value >= -1 && value <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&value)` [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: the loop variable `sample` is used to index `r` [INFO] [stdout] --> src/individual.rs:839:31 [INFO] [stdout] | [INFO] [stdout] 839 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 839 - for sample in 0..sample_len { [INFO] [stdout] 839 + for (sample, ) in r.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/individual.rs:866:22 [INFO] [stdout] | [INFO] [stdout] 866 | .zip(neg_sums.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] 866 - .zip(neg_sums.into_iter()) [INFO] [stdout] 866 + .zip(neg_sums) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `score` [INFO] [stdout] --> src/individual.rs:875:31 [INFO] [stdout] | [INFO] [stdout] 875 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 875 - for sample in 0..sample_len { [INFO] [stdout] 875 + for (sample, ) in score.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `r` [INFO] [stdout] --> src/individual.rs:911:31 [INFO] [stdout] | [INFO] [stdout] 911 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 911 - for sample in 0..sample_len { [INFO] [stdout] 911 + for (sample, ) in r.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/individual.rs:947:22 [INFO] [stdout] | [INFO] [stdout] 947 | .zip(neg_sums.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] 947 - .zip(neg_sums.into_iter()) [INFO] [stdout] 947 + .zip(neg_sums) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `score` [INFO] [stdout] --> src/individual.rs:956:31 [INFO] [stdout] | [INFO] [stdout] 956 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 956 - for sample in 0..sample_len { [INFO] [stdout] 956 + for (sample, ) in score.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `r` [INFO] [stdout] --> src/individual.rs:999:31 [INFO] [stdout] | [INFO] [stdout] 999 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 999 - for sample in 0..sample_len { [INFO] [stdout] 999 + for (sample, ) in r.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/individual.rs:1029:22 [INFO] [stdout] | [INFO] [stdout] 1029 | .zip(neg_sums.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] 1029 - .zip(neg_sums.into_iter()) [INFO] [stdout] 1029 + .zip(neg_sums) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `sample` is used to index `score` [INFO] [stdout] --> src/individual.rs:1038:31 [INFO] [stdout] | [INFO] [stdout] 1038 | for sample in 0..sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1038 - for sample in 0..sample_len { [INFO] [stdout] 1038 + for (sample, ) in score.iter_mut().enumerate().take(sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/individual.rs:1311:5 [INFO] [stdout] | [INFO] [stdout] 1311 | / pub fn random_select( [INFO] [stdout] 1312 | | k_min: usize, [INFO] [stdout] 1313 | | k_max: usize, [INFO] [stdout] 1314 | | feature_selection: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 1321 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1322 | | ) -> Individual { [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/individual.rs:1391:5 [INFO] [stdout] | [INFO] [stdout] 1391 | / pub fn random_select_k( [INFO] [stdout] 1392 | | k_min: usize, [INFO] [stdout] 1393 | | k_max: usize, [INFO] [stdout] 1394 | | feature_selection: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 1400 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1401 | | ) -> Individual { [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/individual.rs:1511:5 [INFO] [stdout] | [INFO] [stdout] 1511 | / pub fn random_select_weighted( [INFO] [stdout] 1512 | | k_min: usize, [INFO] [stdout] 1513 | | k_max: usize, [INFO] [stdout] 1514 | | feature_selection: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 1521 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 1522 | | ) -> Individual { [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 loop variable `i` is only used to index `combined` [INFO] [stdout] --> src/individual.rs:1712:18 [INFO] [stdout] | [INFO] [stdout] 1712 | for i in 0..combined.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 1712 - for i in 0..combined.len() { [INFO] [stdout] 1712 + for in &combined { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/individual.rs:2083:26 [INFO] [stdout] | [INFO] [stdout] 2083 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/individual.rs:2090:13 [INFO] [stdout] | [INFO] [stdout] 2090 | positions.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2090 - positions.sort_by(|a, b| b.0.cmp(&a.0)); [INFO] [stdout] 2090 + positions.sort_by_key(|b| std::cmp::Reverse(b.0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/individual.rs:2114:38 [INFO] [stdout] | [INFO] [stdout] 2114 | ... .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i8` -> `i8`) [INFO] [stdout] --> src/individual.rs:2302:37 [INFO] [stdout] | [INFO] [stdout] 2302 | .map(|(id, coef)| (*id, coef.signum() as i8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `coef.signum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i8` -> `i8`) [INFO] [stdout] --> src/individual.rs:2308:37 [INFO] [stdout] | [INFO] [stdout] 2308 | .map(|(id, coef)| (*id, coef.signum() as i8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `coef.signum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/individual.rs:2489:12 [INFO] [stdout] | [INFO] [stdout] 2489 | if desc.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!desc.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:2920:30 [INFO] [stdout] | [INFO] [stdout] 2920 | vec![2.0 * 1.0 + 3.0 * -1.0, 4.0 * 1.0 + 5.0 * -1.0], [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-3.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:2920:54 [INFO] [stdout] | [INFO] [stdout] 2920 | vec![2.0 * 1.0 + 3.0 * -1.0, 4.0 * 1.0 + 5.0 * -1.0], [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-5.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:2968:41 [INFO] [stdout] | [INFO] [stdout] 2968 | vec![2.0 * 1.0, 4.0 * 1.0 + 5.0 * (-1.0)], [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using: `-5.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:3043:41 [INFO] [stdout] | [INFO] [stdout] 3043 | vec![1.0 * 1.0, 1.0 * 1.0 + 1.0 * (-1.0)], [INFO] [stdout] | ^^^^^^^^^^^^ help: consider using: `-1.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:3074:54 [INFO] [stdout] | [INFO] [stdout] 3074 | (0.1_f64 / ind.epsilon).ln() * 1.0 + (0.75_f64 / ind.epsilon).ln() * -1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(0.75_f64 / ind.epsilon).ln()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:3075:54 [INFO] [stdout] | [INFO] [stdout] 3075 | (0.3_f64 / ind.epsilon).ln() * 1.0 + (0.9_f64 / ind.epsilon).ln() * -1.0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(0.9_f64 / ind.epsilon).ln()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/individual.rs:3133:54 [INFO] [stdout] | [INFO] [stdout] 3133 | (0.3_f64 / ind.epsilon).ln() * 1.0 + (0.9_f64 / ind.epsilon).ln() * -1.0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(0.9_f64 / ind.epsilon).ln()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/individual.rs:3770:13 [INFO] [stdout] | [INFO] [stdout] 3770 | assert_eq!(importance.is_scaled, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3770 - assert_eq!(importance.is_scaled, false); [INFO] [stdout] 3770 + assert!(!importance.is_scaled); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/individual.rs:4467:21 [INFO] [stdout] | [INFO] [stdout] 4467 | data.y[3] = 2 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/individual.rs:4468:21 [INFO] [stdout] | [INFO] [stdout] 4468 | data.y[4] = 2 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/individual.rs:4469:26 [INFO] [stdout] | [INFO] [stdout] 4469 | data_test.y[7] = 2 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/individual.rs:5278:13 [INFO] [stdout] | [INFO] [stdout] 5278 | rejection_rate >= 0.0 && rejection_rate <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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: the loop variable `i` is used to index `classes` [INFO] [stdout] --> src/individual.rs:5342:18 [INFO] [stdout] | [INFO] [stdout] 5342 | for i in 0..classes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 5342 - for i in 0..classes.len() { [INFO] [stdout] 5342 + for (i, ) in classes.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/individual.rs:5460:13 [INFO] [stdout] | [INFO] [stdout] 5460 | mcc >= -1.0 && mcc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1.0..=1.0).contains(&mcc)` [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/individual.rs:5483:13 [INFO] [stdout] | [INFO] [stdout] 5483 | f1 >= 0.0 && f1 <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&f1)` [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/individual.rs:5506:13 [INFO] [stdout] | [INFO] [stdout] 5506 | npv >= 0.0 && npv <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&npv)` [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/individual.rs:5529:13 [INFO] [stdout] | [INFO] [stdout] 5529 | ppv >= 0.0 && ppv <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&ppv)` [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/individual.rs:5552:13 [INFO] [stdout] | [INFO] [stdout] 5552 | g_mean >= 0.0 && g_mean <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&g_mean)` [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/individual.rs:5933:13 [INFO] [stdout] | [INFO] [stdout] 5933 | rejection_rate >= 0.0 && rejection_rate <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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: casting the result of `i8::abs()` to u8 [INFO] [stdout] --> src/individual.rs:6501:28 [INFO] [stdout] | [INFO] [stdout] 6501 | let abs_coef = coef.abs() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `coef.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/individual.rs:6612:17 [INFO] [stdout] | [INFO] [stdout] 6612 | mcc >= -1.0 && mcc <= 1.0 || mcc.is_nan(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1.0..=1.0).contains(&mcc)` [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/individual.rs:6633:13 [INFO] [stdout] | [INFO] [stdout] 6633 | specificity >= 0.0 && specificity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&specificity)` [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/individual.rs:6643:17 [INFO] [stdout] | [INFO] [stdout] 6643 | npv >= 0.0 && npv <= 1.0 || npv.is_nan(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&npv)` [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/individual.rs:6664:13 [INFO] [stdout] | [INFO] [stdout] 6664 | sensitivity >= 0.0 && sensitivity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sensitivity)` [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/individual.rs:6674:17 [INFO] [stdout] | [INFO] [stdout] 6674 | ppv >= 0.0 && ppv <= 1.0 || ppv.is_nan(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&ppv)` [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/individual.rs:6764:13 [INFO] [stdout] | [INFO] [stdout] 6764 | rejection_rate >= 0.0 && rejection_rate <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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: you should consider adding a `Default` implementation for `Population` [INFO] [stdout] --> src/population.rs:255:5 [INFO] [stdout] | [INFO] [stdout] 255 | / pub fn new() -> Population { [INFO] [stdout] 256 | | Population { [INFO] [stdout] 257 | | individuals: Vec::new(), [INFO] [stdout] 258 | | } [INFO] [stdout] 259 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 35 + impl Default for Population { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:141:55 [INFO] [stdout] | [INFO] [stdout] 141 | ) = self.bayesian_compute_roc_and_metrics(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/population.rs:145:51 [INFO] [stdout] | [INFO] [stdout] 145 | self.bayesian_compute_metrics(&data_to_test, train_best_threshold); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `data_to_test` [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: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:367:13 [INFO] [stdout] | [INFO] [stdout] 367 | i.fit = i.fit - i.k as f64 * param.general.k_penalty; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= i.k as f64 * param.general.k_penalty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:370:17 [INFO] [stdout] | [INFO] [stdout] 370 | i.fit = i.fit - (param.general.threshold_ci_penalty * threshold_ci.rejection_rate); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= (param.general.threshold_ci_penalty * threshold_ci.rejection_rate)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:375:21 [INFO] [stdout] | [INFO] [stdout] 375 | i.fit = i.fit - (1.0 - i.sensitivity) * param.general.bias_penalty [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= (1.0 - i.sensitivity) * param.general.bias_penalty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/population.rs:378:21 [INFO] [stdout] | [INFO] [stdout] 378 | i.fit = i.fit - (1.0 - i.specificity) * param.general.bias_penalty [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.fit -= (1.0 - i.specificity) * param.general.bias_penalty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:494:37 [INFO] [stdout] | [INFO] [stdout] 494 | ... &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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/population.rs:527:37 [INFO] [stdout] | [INFO] [stdout] 527 | ... &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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/population.rs:550:33 [INFO] [stdout] | [INFO] [stdout] 550 | ... &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/population.rs:657:21 [INFO] [stdout] | [INFO] [stdout] 657 | gpu_assays: &Vec<(Option, Option)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 657 - gpu_assays: &Vec<(Option, Option)>, [INFO] [stdout] 657 + gpu_assays: &[(Option, Option)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `fit_without_penalty` doesn't need a mutable reference [INFO] [stdout] --> src/population.rs:669:38 [INFO] [stdout] | [INFO] [stdout] 669 | self.fit_without_penalty(&mut fold_data, &mut None, val_gpu_assay, &None, param); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 669 - self.fit_without_penalty(&mut fold_data, &mut None, val_gpu_assay, &None, param); [INFO] [stdout] 669 + self.fit_without_penalty(&fold_data, &mut None, val_gpu_assay, &None, param); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `fit_without_penalty` doesn't need a mutable reference [INFO] [stdout] --> src/population.rs:674:38 [INFO] [stdout] | [INFO] [stdout] 674 | self.fit_without_penalty(&mut train_data, &mut None, train_gpu_assay, &None, param); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 674 - self.fit_without_penalty(&mut train_data, &mut None, train_gpu_assay, &None, param); [INFO] [stdout] 674 + self.fit_without_penalty(&train_data, &mut None, train_gpu_assay, &None, param); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/population.rs:734:12 [INFO] [stdout] | [INFO] [stdout] 734 | if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 734 - if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] 734 + if eval[0] > 1.0 || &eval[0] < &0.0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/population.rs:734:31 [INFO] [stdout] | [INFO] [stdout] 734 | if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 734 - if &eval[0] > &1.0 || &eval[0] < &0.0 { [INFO] [stdout] 734 + if &eval[0] > &1.0 || eval[0] < 0.0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/population.rs:823:5 [INFO] [stdout] | [INFO] [stdout] 823 | / pub fn generate( [INFO] [stdout] 824 | | &mut self, [INFO] [stdout] 825 | | population_size: u32, [INFO] [stdout] 826 | | k_min: usize, [INFO] [stdout] ... | [INFO] [stdout] 834 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 835 | | ) { [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: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/population.rs:892:30 [INFO] [stdout] | [INFO] [stdout] 892 | individuals: self.individuals.iter().take(n).map(|i| i.clone()).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.individuals.iter().take(n).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ind.threshold_ci` after checking its variant with `is_some` [INFO] [stdout] --> src/population.rs:959:36 [INFO] [stdout] | [INFO] [stdout] 957 | if ind.threshold_ci.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = &mut ind.threshold_ci` [INFO] [stdout] 958 | let scores = ind.evaluate(data); [INFO] [stdout] 959 | let threshold_ci = ind.threshold_ci.as_mut().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:973:21 [INFO] [stdout] | [INFO] [stdout] 973 | &precomputed_bootstrap.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `precomputed_bootstrap.as_ref().unwrap()` [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 (8/7) [INFO] [stdout] --> src/population.rs:1057:5 [INFO] [stdout] | [INFO] [stdout] 1057 | / pub fn compute_pop_mda_feature_importance( [INFO] [stdout] 1058 | | &self, [INFO] [stdout] 1059 | | data: &Data, [INFO] [stdout] 1060 | | permutations: usize, [INFO] [stdout] ... | [INFO] [stdout] 1065 | | population_id: Option, [INFO] [stdout] 1066 | | ) -> ImportanceCollection { [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/population.rs:1121:20 [INFO] [stdout] | [INFO] [stdout] 1121 | if done % step == 0 || done == n_individuals { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `done.is_multiple_of(step)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/population.rs:1143:22 [INFO] [stdout] | [INFO] [stdout] 1143 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/population.rs:1163:61 [INFO] [stdout] | [INFO] [stdout] 1163 | ImportanceAggregation::mean => mean_and_std(&values), [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [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/population.rs:1242:44 [INFO] [stdout] | [INFO] [stdout] 1242 | let sample_prob = ind.evaluate(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/population.rs:1306:59 [INFO] [stdout] | [INFO] [stdout] 1306 | compute_auc_from_value(&self.bayesian_predict(&data), &data.y), [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/population.rs:1364:41 [INFO] [stdout] | [INFO] [stdout] 1364 | niches.entry(niche_key).or_insert_with(Vec::new).push(idx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/population.rs:1464:9 [INFO] [stdout] | [INFO] [stdout] 1464 | freq_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1464 - freq_vec.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 1464 + freq_vec.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/population.rs:1490:9 [INFO] [stdout] | [INFO] [stdout] 1490 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/population.rs:1569:13 [INFO] [stdout] | [INFO] [stdout] 1569 | result.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/population.rs:1581:26 [INFO] [stdout] | [INFO] [stdout] 1581 | result.push_str(&format!( [INFO] [stdout] | __________________________^ [INFO] [stdout] 1582 | | "\x1b[1;96mBlue\x1b[0m = Always positively associated (+1) | " [INFO] [stdout] 1583 | | )); [INFO] [stdout] | |_________^ help: consider using `.to_string()`: `"\x1b[1;96mBlue\x1b[0m = Always positively associated (+1) | ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/population.rs:1584:26 [INFO] [stdout] | [INFO] [stdout] 1584 | result.push_str(&format!( [INFO] [stdout] | __________________________^ [INFO] [stdout] 1585 | | "\x1b[1;95mMagenta\x1b[0m = Always negatively associated (-1) | " [INFO] [stdout] 1586 | | )); [INFO] [stdout] | |_________^ help: consider using `.to_string()`: `"\x1b[1;95mMagenta\x1b[0m = Always negatively associated (-1) | ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing a legacy numeric constant [INFO] [stdout] --> src/population.rs:1671:37 [INFO] [stdout] | [INFO] [stdout] 1671 | use std::{collections::HashMap, f64::MAX}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import and use the associated constant `f64::MAX` from the primitive type instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/population.rs:1837:32 [INFO] [stdout] | [INFO] [stdout] 1837 | let mut previous_fit = MAX as f64; [INFO] [stdout] | ^^^^^^^^^^ help: try: `MAX` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/population.rs:1837:32 [INFO] [stdout] | [INFO] [stdout] 1837 | let mut previous_fit = MAX as f64; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 1837 | let mut previous_fit = f64::MAX as f64; [INFO] [stdout] | +++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `ind_vec` [INFO] [stdout] --> src/population.rs:2212:18 [INFO] [stdout] | [INFO] [stdout] 2212 | for i in 0..1 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 2212 - for i in 0..1 { [INFO] [stdout] 2212 + for (i, ) in ind_vec.iter().enumerate().take(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/population.rs:3216:21 [INFO] [stdout] | [INFO] [stdout] 3216 | gpu_assays: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3216 - gpu_assays: &Vec>, [INFO] [stdout] 3216 + gpu_assays: &[Option], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:135:12 [INFO] [stdout] | [INFO] [stdout] 135 | if voting_threshold < &0.0 || voting_threshold > &1.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(&0.0..=&1.0).contains(&voting_threshold)` [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/voting.rs:140:12 [INFO] [stdout] | [INFO] [stdout] 140 | if threshold_window < &0.0 || threshold_window > &100.0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(&0.0..=&100.0).contains(&threshold_window)` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/voting.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | / match weighting_method { [INFO] [stdout] 149 | | WeightingMethod::Specialized { [INFO] [stdout] 150 | | sensitivity_threshold, [INFO] [stdout] 151 | | specificity_threshold, [INFO] [stdout] ... | [INFO] [stdout] 161 | | _ => (), [INFO] [stdout] 162 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ if let WeightingMethod::Specialized { [INFO] [stdout] 149 + sensitivity_threshold, [INFO] [stdout] 150 + specificity_threshold, [INFO] [stdout] 151 + } = weighting_method { [INFO] [stdout] 152 + warn!("Specialized voting mode is experimental"); [INFO] [stdout] 153 + if *sensitivity_threshold < 0.0 || *sensitivity_threshold > 1.0 { [INFO] [stdout] 154 + panic!("Sensitivity threshold must be in [0,1]"); [INFO] [stdout] 155 + } [INFO] [stdout] 156 + if *specificity_threshold < 0.0 || *specificity_threshold > 1.0 { [INFO] [stdout] 157 + panic!("Specificity threshold must be in [0,1]"); [INFO] [stdout] 158 + } [INFO] [stdout] 159 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:346:20 [INFO] [stdout] | [INFO] [stdout] 346 | if score >= 0.0 && score <= 1.0 && pred_class != 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&score)` [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/voting.rs:441:17 [INFO] [stdout] | [INFO] [stdout] 441 | &self.weights.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.weights.as_ref().unwrap()` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:452:24 [INFO] [stdout] | [INFO] [stdout] 452 | if score >= 0.0 && score <= 1.0 && pred_class != 2 && true_class != 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&score)` [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/voting.rs:907:17 [INFO] [stdout] | [INFO] [stdout] 907 | &self.predicted_classes.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.predicted_classes.as_ref().unwrap()` [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/voting.rs:951:42 [INFO] [stdout] | [INFO] [stdout] 951 | self.experts.clone().display(&data, test_data, param) [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: called `unwrap` on `test_data` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1057:42 [INFO] [stdout] | [INFO] [stdout] 1049 | if test_data.is_some() { [INFO] [stdout] | ---------------------- help: try: `if let Some() = test_data` [INFO] [stdout] ... [INFO] [stdout] 1057 | ) = self.compute_new_metrics(test_data.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1072:21 [INFO] [stdout] | [INFO] [stdout] 1068 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] ... [INFO] [stdout] 1072 | self.metrics.mcc.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1080:21 [INFO] [stdout] | [INFO] [stdout] 1076 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] ... [INFO] [stdout] 1080 | self.metrics.f1_score.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1088:21 [INFO] [stdout] | [INFO] [stdout] 1084 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] ... [INFO] [stdout] 1088 | self.metrics.npv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1096:21 [INFO] [stdout] | [INFO] [stdout] 1092 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] ... [INFO] [stdout] 1096 | self.metrics.ppv.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1104:21 [INFO] [stdout] | [INFO] [stdout] 1100 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] ... [INFO] [stdout] 1104 | self.metrics.g_mean.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1121:70 [INFO] [stdout] | [INFO] [stdout] 1120 | if self.metrics.mcc.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.mcc` [INFO] [stdout] 1121 | summary_str = format!("{} | MCC {:.3}", summary_str, self.metrics.mcc.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.f1_score` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1127:21 [INFO] [stdout] | [INFO] [stdout] 1123 | if self.metrics.f1_score.is_some() { [INFO] [stdout] | ---------------------------------- help: try: `if let Some() = self.metrics.f1_score` [INFO] [stdout] ... [INFO] [stdout] 1127 | self.metrics.f1_score.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.npv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1131:70 [INFO] [stdout] | [INFO] [stdout] 1130 | if self.metrics.npv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.npv` [INFO] [stdout] 1131 | summary_str = format!("{} | NPV {:.3}", summary_str, self.metrics.npv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.ppv` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1134:70 [INFO] [stdout] | [INFO] [stdout] 1133 | if self.metrics.ppv.is_some() { [INFO] [stdout] | ----------------------------- help: try: `if let Some() = self.metrics.ppv` [INFO] [stdout] 1134 | summary_str = format!("{} | PPV {:.3}", summary_str, self.metrics.ppv.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.metrics.g_mean` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:1140:21 [INFO] [stdout] | [INFO] [stdout] 1136 | if self.metrics.g_mean.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = self.metrics.g_mean` [INFO] [stdout] ... [INFO] [stdout] 1140 | self.metrics.g_mean.unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/voting.rs:1224:29 [INFO] [stdout] | [INFO] [stdout] 1224 | let max_errors = if errors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!errors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/voting.rs:1229:34 [INFO] [stdout] | [INFO] [stdout] 1229 | let max_abstentions = if abstentions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!abstentions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/voting.rs:1425:10 [INFO] [stdout] | [INFO] [stdout] 1425 | ) -> (Vec, Vec, Vec, Vec<(usize, f64)>) { [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `predictions` [INFO] [stdout] --> src/voting.rs:1434:18 [INFO] [stdout] | [INFO] [stdout] 1434 | for i in 0..data.sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1434 - for i in 0..data.sample_len { [INFO] [stdout] 1434 + for (i, ) in predictions.iter().enumerate().take(data.sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/voting.rs:1576:59 [INFO] [stdout] | [INFO] [stdout] 1576 | for (_, expert) in self.experts.individuals.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 1576 - for (_, expert) in self.experts.individuals.iter().enumerate() { [INFO] [stdout] 1576 + for expert in self.experts.individuals.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:1991:17 [INFO] [stdout] | [INFO] [stdout] 1991 | assert!(rejection_rate >= 0.0 && rejection_rate <= 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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/voting.rs:3045:13 [INFO] [stdout] | [INFO] [stdout] 3045 | test_auc >= 0.0 && test_auc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&test_auc)` [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/voting.rs:3050:13 [INFO] [stdout] | [INFO] [stdout] 3050 | test_acc >= 0.0 && test_acc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&test_acc)` [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/voting.rs:3055:13 [INFO] [stdout] | [INFO] [stdout] 3055 | test_sens >= 0.0 && test_sens <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&test_sens)` [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/voting.rs:3060:13 [INFO] [stdout] | [INFO] [stdout] 3060 | test_spec >= 0.0 && test_spec <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&test_spec)` [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/voting.rs:3270:13 [INFO] [stdout] | [INFO] [stdout] 3270 | auc >= 0.0 && auc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/voting.rs:3274:13 [INFO] [stdout] | [INFO] [stdout] 3274 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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/voting.rs:3278:13 [INFO] [stdout] | [INFO] [stdout] 3278 | sensitivity >= 0.0 && sensitivity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sensitivity)` [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/voting.rs:3282:13 [INFO] [stdout] | [INFO] [stdout] 3282 | specificity >= 0.0 && specificity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&specificity)` [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/voting.rs:3286:13 [INFO] [stdout] | [INFO] [stdout] 3286 | rejection_rate >= 0.0 && rejection_rate <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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/voting.rs:3330:13 [INFO] [stdout] | [INFO] [stdout] 3330 | auc >= 0.0 && auc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/voting.rs:3334:13 [INFO] [stdout] | [INFO] [stdout] 3334 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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/voting.rs:3338:13 [INFO] [stdout] | [INFO] [stdout] 3338 | sensitivity >= 0.0 && sensitivity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sensitivity)` [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/voting.rs:3342:13 [INFO] [stdout] | [INFO] [stdout] 3342 | specificity >= 0.0 && specificity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&specificity)` [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/voting.rs:3346:13 [INFO] [stdout] | [INFO] [stdout] 3346 | rejection_rate >= 0.0 && rejection_rate <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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/voting.rs:3450:13 [INFO] [stdout] | [INFO] [stdout] 3450 | auc >= 0.0 && auc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&auc)` [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/voting.rs:3454:13 [INFO] [stdout] | [INFO] [stdout] 3454 | accuracy >= 0.0 && accuracy <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&accuracy)` [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/voting.rs:3458:13 [INFO] [stdout] | [INFO] [stdout] 3458 | sensitivity >= 0.0 && sensitivity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&sensitivity)` [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/voting.rs:3462:13 [INFO] [stdout] | [INFO] [stdout] 3462 | specificity >= 0.0 && specificity <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&specificity)` [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/voting.rs:3466:13 [INFO] [stdout] | [INFO] [stdout] 3466 | rejection_rate >= 0.0 && rejection_rate <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&rejection_rate)` [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/voting.rs:3682:38 [INFO] [stdout] | [INFO] [stdout] 3682 | train_mcc.is_finite() && train_mcc >= -1.0 && train_mcc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1.0..=1.0).contains(&train_mcc)` [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/voting.rs:3686:37 [INFO] [stdout] | [INFO] [stdout] 3686 | train_f1.is_finite() && train_f1 >= 0.0 && train_f1 <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&train_f1)` [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: called `unwrap` on `additional.mcc` after checking its variant with `is_some` [INFO] [stdout] --> src/voting.rs:3870:17 [INFO] [stdout] | [INFO] [stdout] 3868 | if additional.mcc.is_some() { [INFO] [stdout] | --------------------------- help: try: `if let Some() = additional.mcc` [INFO] [stdout] 3869 | assert!( [INFO] [stdout] 3870 | additional.mcc.unwrap().is_finite(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/voting.rs:4328:13 [INFO] [stdout] | [INFO] [stdout] 4328 | optimized_threshold >= 0.0 && optimized_threshold <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&optimized_threshold)` [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/voting.rs:4456:17 [INFO] [stdout] | [INFO] [stdout] 4456 | score >= -1.0 && score <= 1.0 || score == 0.5, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1.0..=1.0).contains(&score)` [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/voting.rs:4537:17 [INFO] [stdout] | [INFO] [stdout] 4537 | mcc >= -1.0 && mcc <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1.0..=1.0).contains(&mcc)` [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/voting.rs:4549:17 [INFO] [stdout] | [INFO] [stdout] 4549 | f1 >= 0.0 && f1 <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&f1)` [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/voting.rs:4561:17 [INFO] [stdout] | [INFO] [stdout] 4561 | npv >= 0.0 && npv <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&npv)` [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/voting.rs:4573:17 [INFO] [stdout] | [INFO] [stdout] 4573 | ppv >= 0.0 && ppv <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&ppv)` [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/voting.rs:4585:17 [INFO] [stdout] | [INFO] [stdout] 4585 | g_mean >= 0.0 && g_mean <= 1.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&g_mean)` [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/csv_report.rs:590:20 [INFO] [stdout] | [INFO] [stdout] 590 | if score >= 0.0 && score <= 1.0 && pred_class != 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0.0..=1.0).contains(&score)` [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: the loop variable `i_sample` is used to index `z_new` [INFO] [stdout] --> src/bayesian_mcmc.rs:380:25 [INFO] [stdout] | [INFO] [stdout] 380 | for i_sample in 0..self.data.sample_len { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 380 - for i_sample in 0..self.data.sample_len { [INFO] [stdout] 380 + for (i_sample, ) in z_new.iter_mut().enumerate().take(self.data.sample_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bayesian_mcmc.rs:406:50 [INFO] [stdout] | [INFO] [stdout] 406 | fn log_posterior(&self, ind: &Individual, z: &Vec<[f64; 3]>) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 406 - fn log_posterior(&self, ind: &Individual, z: &Vec<[f64; 3]>) -> f64 { [INFO] [stdout] 406 + fn log_posterior(&self, ind: &Individual, z: &[[f64; 3]]) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bayesian_mcmc.rs:441:52 [INFO] [stdout] | [INFO] [stdout] 441 | fn compute_sigma_i(&self, ind: &Individual, z: &Vec<[f64; 3]>, i: usize) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 441 - fn compute_sigma_i(&self, ind: &Individual, z: &Vec<[f64; 3]>, i: usize) -> f64 { [INFO] [stdout] 441 + fn compute_sigma_i(&self, ind: &Individual, z: &[[f64; 3]], i: usize) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/bayesian_mcmc.rs:445:46 [INFO] [stdout] | [INFO] [stdout] 445 | for (_i_sample, z_sample) in z.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 445 - for (_i_sample, z_sample) in z.iter().enumerate() { [INFO] [stdout] 445 + for z_sample in z.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/bayesian_mcmc.rs:656:26 [INFO] [stdout] | [INFO] [stdout] 656 | for (_, stat) in &mut self.model_stats { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 656 - for (_, stat) in &mut self.model_stats { [INFO] [stdout] 656 + for stat in self.model_stats.values_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/bayesian_mcmc.rs:662:26 [INFO] [stdout] | [INFO] [stdout] 662 | for (_, prob) in &mut self.feature_prob { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 662 - for (_, prob) in &mut self.feature_prob { [INFO] [stdout] 662 + for prob in self.feature_prob.values_mut() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bayesian_mcmc.rs:938:30 [INFO] [stdout] | [INFO] [stdout] 938 | feature_to_drop.push(idx.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting float literal to `f64` is unnecessary [INFO] [stdout] --> src/bayesian_mcmc.rs:957:21 [INFO] [stdout] | [INFO] [stdout] 957 | let n_classes = 3.0 as f64; [INFO] [stdout] | ^^^^^^^^^^ help: try: `3.0_f64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/bayesian_mcmc.rs:1003:25 [INFO] [stdout] | [INFO] [stdout] 1003 | if let &coef @ (-1 | 0 | 1) = [1, 0, -1].choose(rng).unwrap() { [INFO] [stdout] | ^^^^^^^^^^ help: try: `-1..=1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/bayesian_mcmc.rs:1028:17 [INFO] [stdout] | [INFO] [stdout] 1028 | (n as f64 / param.mcmc.n_iter as f64) as f64 * 100.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(n as f64 / param.mcmc.n_iter as f64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `update_feature_groups` doesn't need a mutable reference [INFO] [stdout] --> src/bayesian_mcmc.rs:1072:54 [INFO] [stdout] | [INFO] [stdout] 1072 | let z_new = bp.update_feature_groups(&z, &mut ind, feature_idx, new_coef); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 1072 - let z_new = bp.update_feature_groups(&z, &mut ind, feature_idx, new_coef); [INFO] [stdout] 1072 + let z_new = bp.update_feature_groups(&z, &ind, feature_idx, new_coef); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bayesian_mcmc.rs:1164:58 [INFO] [stdout] | [INFO] [stdout] 1164 | mcmc_result = get_best_mcmc_sbs(&data, &results, ¶m); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bayesian_mcmc.rs:1231:37 [INFO] [stdout] | [INFO] [stdout] 1231 | .map(|(_, _, _, _, idx, _)| idx.clone()) [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*idx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/beam.rs:53:36 [INFO] [stdout] | [INFO] [stdout] 53 | fn generate_combinations(features: &Vec, k: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 53 - fn generate_combinations(features: &Vec, k: usize) -> Vec> { [INFO] [stdout] 53 + fn generate_combinations(features: &[usize], k: usize) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/beam.rs:314:21 [INFO] [stdout] | [INFO] [stdout] 314 | / tmp_ind.features = tmp_ind [INFO] [stdout] 315 | | .features [INFO] [stdout] 316 | | .into_iter() [INFO] [stdout] 317 | | .filter(|(_, coeff)| *coeff > 0) [INFO] [stdout] 318 | | .collect(); [INFO] [stdout] | |__________________________________^ help: consider calling `.retain()` instead: `tmp_ind.features.retain(|_, &mut coeff| *coeff > 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/beam.rs:393:21 [INFO] [stdout] | [INFO] [stdout] 393 | features.extend(unique_features.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/collect.rs:416:17 [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] 393 - features.extend(unique_features.into_iter()); [INFO] [stdout] 393 + features.extend(unique_features); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/beam.rs:595:25 [INFO] [stdout] | [INFO] [stdout] 595 | all_features.extend(selected_negative.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/collect.rs:416:17 [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] 595 - all_features.extend(selected_negative.into_iter()); [INFO] [stdout] 595 + all_features.extend(selected_negative); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/beam.rs:742:51 [INFO] [stdout] | [INFO] [stdout] 742 | let populations = iterative_growth(&base_pop, &data, &gpu_assay, param, running, &mut rng); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/beam.rs:773:43 [INFO] [stdout] | [INFO] [stdout] 773 | let pattern_ind = generate_individual(&data, TERNARY_LANG, RAW_TYPE, ¶m); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/beam.rs:773:74 [INFO] [stdout] | [INFO] [stdout] 773 | let pattern_ind = generate_individual(&data, TERNARY_LANG, RAW_TYPE, ¶m); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:821:38 [INFO] [stdout] | [INFO] [stdout] 821 | cv = Some(CV::new_from_param(&data, param, &mut data_rng, folds_nb)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/beam.rs:834:46 [INFO] [stdout] | [INFO] [stdout] 834 | create_gpu_assays_for_folds_beam(cv, ¶m) [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:842:30 [INFO] [stdout] | [INFO] [stdout] 842 | pop.fit_on_folds(cv, ¶m, &gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:862:16 [INFO] [stdout] | [INFO] [stdout] 862 | if last_pop.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/beam.rs:935:12 [INFO] [stdout] | [INFO] [stdout] 935 | if pop.individuals.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/beam.rs:945:16 [INFO] [stdout] | [INFO] [stdout] 945 | if pop.individuals.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/beam.rs:1034:34 [INFO] [stdout] | [INFO] [stdout] 1034 | new_pop.fit_on_folds(cv, ¶m, gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/beam.rs:1037:21 [INFO] [stdout] | [INFO] [stdout] 1037 | new_pop.fit(&data, &mut None, gpu_assay, &None, param); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: unneeded late initialization [INFO] [stdout] --> src/beam.rs:1283:5 [INFO] [stdout] | [INFO] [stdout] 1283 | let best_n_pop; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `best_n_pop` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 1283 ~ [INFO] [stdout] 1284 ~ let best_n_pop = if all_models.individuals.len() > n as usize && n as usize != 0 { [INFO] [stdout] 1285 ~ Population { [INFO] [stdout] 1286 | individuals: all_models.individuals.clone()[..n as usize].to_vec(), [INFO] [stdout] 1287 | } [INFO] [stdout] 1288 | } else { [INFO] [stdout] 1289 ~ all_models [INFO] [stdout] 1290 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1284:39 [INFO] [stdout] | [INFO] [stdout] 1284 | if all_models.individuals.len() > n as usize && n as usize != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1284:53 [INFO] [stdout] | [INFO] [stdout] 1284 | if all_models.individuals.len() > n as usize && n as usize != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1286:59 [INFO] [stdout] | [INFO] [stdout] 1286 | individuals: all_models.individuals.clone()[..n as usize].to_vec(), [INFO] [stdout] | ^^^^^^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1323:19 [INFO] [stdout] | [INFO] [stdout] 1323 | } else if (param.beam.max_nb_of_models as usize) * lang_data_combinations [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1331:14 [INFO] [stdout] | [INFO] [stdout] 1331 | ((param.beam.max_nb_of_models*lang_data_combinations) as usize * data.sample_len * std::mem::size_of::()) as f64 ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(param.beam.max_nb_of_models*lang_data_combinations)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1334:26 [INFO] [stdout] | [INFO] [stdout] 1334 | let max_nb = (param.beam.max_nb_of_models as usize) * lang_data_combinations; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1386:19 [INFO] [stdout] | [INFO] [stdout] 1386 | } else if (param.beam.max_nb_of_models as usize) * lang_data_combinations > gpu_max_nb_models_val { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1388:75 [INFO] [stdout] | [INFO] [stdout] 1388 | idx, gpu_max_nb_models_val, param.beam.max_nb_of_models * lang_data_combinations as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lang_data_combinations` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1391:26 [INFO] [stdout] | [INFO] [stdout] 1391 | let max_nb = (param.beam.max_nb_of_models as usize) * lang_data_combinations; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1401:19 [INFO] [stdout] | [INFO] [stdout] 1401 | } else if (param.beam.max_nb_of_models as usize) * lang_data_combinations > gpu_max_nb_models_train { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1403:77 [INFO] [stdout] | [INFO] [stdout] 1403 | idx, gpu_max_nb_models_train, param.beam.max_nb_of_models * lang_data_combinations as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lang_data_combinations` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/beam.rs:1406:26 [INFO] [stdout] | [INFO] [stdout] 1406 | let max_nb = (param.beam.max_nb_of_models as usize) * lang_data_combinations; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/beam.rs:1641:31 [INFO] [stdout] | [INFO] [stdout] 1641 | for (_, coeff) in &individual.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1641 - for (_, coeff) in &individual.features { [INFO] [stdout] 1641 + for coeff in individual.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/beam.rs:1696:35 [INFO] [stdout] | [INFO] [stdout] 1696 | for (_, coeff) in &individual.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1696 - for (_, coeff) in &individual.features { [INFO] [stdout] 1696 + for coeff in individual.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/beam.rs:1744:31 [INFO] [stdout] | [INFO] [stdout] 1744 | for (_, coeff) in &individual.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1744 - for (_, coeff) in &individual.features { [INFO] [stdout] 1744 + for coeff in individual.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:270:38 [INFO] [stdout] | [INFO] [stdout] 270 | cv = Some(CV::new_from_param(&data, param, &mut data_rng, folds_nb)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/ga.rs:291:30 [INFO] [stdout] | [INFO] [stdout] 291 | pop.fit_on_folds(cv, ¶m, &gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ga.rs:305:50 [INFO] [stdout] | [INFO] [stdout] 305 | if param.ga.random_sampling_pct > 0.0 && epoch % param.ga.random_sampling_epochs == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.random_sampling_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:311:45 [INFO] [stdout] | [INFO] [stdout] 311 | pop.fit(&epoch_data, &mut None, &gpu_assay, &None, param); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `gpu_assay` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ga.rs:318:16 [INFO] [stdout] | [INFO] [stdout] 318 | && epoch % param.cv.resampling_inner_folds_epochs == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.cv.resampling_inner_folds_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:326:42 [INFO] [stdout] | [INFO] [stdout] 326 | cv = Some(CV::new_from_param(&data, param, &mut data_rng, folds_nb)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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/ga.rs:331:38 [INFO] [stdout] | [INFO] [stdout] 331 | pop.fit_on_folds(cv, ¶m, &gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ga.rs:358:9 [INFO] [stdout] | [INFO] [stdout] 358 | / if epoch >= param.ga.min_epochs { [INFO] [stdout] 359 | | if epoch - best_model.epoch + 1 > param.ga.max_age_best_model { [INFO] [stdout] 360 | | info!("Best model has reached limit age..."); [INFO] [stdout] 361 | | need_to_break = true; [INFO] [stdout] 362 | | } [INFO] [stdout] 363 | | } [INFO] [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] 358 ~ if epoch >= param.ga.min_epochs [INFO] [stdout] 359 ~ && epoch - best_model.epoch + 1 > param.ga.max_age_best_model { [INFO] [stdout] 360 | info!("Best model has reached limit age..."); [INFO] [stdout] 361 | need_to_break = true; [INFO] [stdout] 362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ga.rs:380:16 [INFO] [stdout] | [INFO] [stdout] 380 | if populations.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `populations.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:390:53 [INFO] [stdout] | [INFO] [stdout] 390 | last_population.compute_all_metrics(&data, ¶m.general.fit); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 (8/7) [INFO] [stdout] --> src/ga.rs:418:1 [INFO] [stdout] | [INFO] [stdout] 418 | / pub fn evolve( [INFO] [stdout] 419 | | pop: Population, [INFO] [stdout] 420 | | data: &Data, [INFO] [stdout] 421 | | cv: &mut Option, [INFO] [stdout] ... | [INFO] [stdout] 426 | | rng: &mut ChaCha8Rng, [INFO] [stdout] 427 | | ) -> Population { [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ga.rs:433:48 [INFO] [stdout] | [INFO] [stdout] 433 | if param.ga.forced_diversity_pct != 0.0 && epoch % param.ga.forced_diversity_epochs == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `epoch.is_multiple_of(param.ga.forced_diversity_epochs)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:476:35 [INFO] [stdout] | [INFO] [stdout] 476 | children.fit_on_folds(cv, ¶m, gpu_assays_per_fold); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/ga.rs:479:22 [INFO] [stdout] | [INFO] [stdout] 479 | children.fit(&data, &mut None, gpu_assay, &None, param); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/ga.rs:512:9 [INFO] [stdout] | [INFO] [stdout] 512 | / if !individual_by_types.contains_key(&i_type) { [INFO] [stdout] 513 | | individual_by_types.insert(i_type, vec![individual]); [INFO] [stdout] 514 | | } else { [INFO] [stdout] 515 | | individual_by_types [INFO] [stdout] ... | [INFO] [stdout] 518 | | .push(individual); [INFO] [stdout] 519 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 512 ~ if let std::collections::hash_map::Entry::Vacant(e) = individual_by_types.entry(i_type) { [INFO] [stdout] 513 + e.insert(vec![individual]); [INFO] [stdout] 514 + } else { [INFO] [stdout] 515 + individual_by_types [INFO] [stdout] 516 + .get_mut(&i_type) [INFO] [stdout] 517 + .unwrap() [INFO] [stdout] 518 + .push(individual); [INFO] [stdout] 519 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ga.rs:650:24 [INFO] [stdout] | [INFO] [stdout] 650 | feature_selection: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 650 - feature_selection: &Vec, [INFO] [stdout] 650 + feature_selection: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ga.rs:818:45 [INFO] [stdout] | [INFO] [stdout] 818 | if individual.features.contains_key(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:820:40 [INFO] [stdout] | [INFO] [stdout] 820 | individual.features.remove(&i); [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:853:45 [INFO] [stdout] | [INFO] [stdout] 853 | if individual.features.contains_key(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:855:40 [INFO] [stdout] | [INFO] [stdout] 855 | individual.features.remove(&i); [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:887:57 [INFO] [stdout] | [INFO] [stdout] 887 | let value = if individual.features.contains_key(&i) { [INFO] [stdout] | ^^ help: change this to: `i` [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/ga.rs:889:40 [INFO] [stdout] | [INFO] [stdout] 889 | individual.features.remove(&i).unwrap() [INFO] [stdout] | ^^ help: change this to: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ga.rs:903:17 [INFO] [stdout] | [INFO] [stdout] 903 | / if value != 0 { [INFO] [stdout] 904 | | individual [INFO] [stdout] 905 | | .features [INFO] [stdout] 906 | | .insert(*i, if value.abs() < 64 { 2 * value } else { value }); [INFO] [stdout] 907 | | individual.k += 1; [INFO] [stdout] 908 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 902 ~ r if r < p3 [INFO] [stdout] 903 ~ && value != 0 => { [INFO] [stdout] 904 | individual [INFO] [stdout] ... [INFO] [stdout] 907 | individual.k += 1; [INFO] [stdout] 908 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ga.rs:911:17 [INFO] [stdout] | [INFO] [stdout] 911 | / if value != 0 { [INFO] [stdout] 912 | | individual [INFO] [stdout] 913 | | .features [INFO] [stdout] 914 | | .insert(*i, if value.abs() == 1 { value } else { value / 2 }); [INFO] [stdout] 915 | | individual.k += 1; [INFO] [stdout] 916 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 910 ~ r if r < p4 [INFO] [stdout] 911 ~ && value != 0 => { [INFO] [stdout] 912 | individual [INFO] [stdout] ... [INFO] [stdout] 915 | individual.k += 1; [INFO] [stdout] 916 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_features` [INFO] [stdout] --> src/ga.rs:1217:18 [INFO] [stdout] | [INFO] [stdout] 1217 | for i in 0..pop.individuals.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1217 - for i in 0..pop.individuals.len() { [INFO] [stdout] 1217 + for (i, ) in original_features.iter().enumerate().take(pop.individuals.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:1244:26 [INFO] [stdout] | [INFO] [stdout] 1244 | for (_, &val) in &pop.individuals[0].features { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1244 - for (_, &val) in &pop.individuals[0].features { [INFO] [stdout] 1244 + for &val in pop.individuals[0].features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:1246:17 [INFO] [stdout] | [INFO] [stdout] 1246 | val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:1276:30 [INFO] [stdout] | [INFO] [stdout] 1276 | for (_, &val) in &ind.features { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1276 - for (_, &val) in &ind.features { [INFO] [stdout] 1276 + for &val in ind.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:1307:30 [INFO] [stdout] | [INFO] [stdout] 1307 | for (_, &val) in &ind.features { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1307 - for (_, &val) in &ind.features { [INFO] [stdout] 1307 + for &val in ind.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_features` [INFO] [stdout] --> src/ga.rs:1551:18 [INFO] [stdout] | [INFO] [stdout] 1551 | for i in 0..pop.individuals.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 1551 - for i in 0..pop.individuals.len() { [INFO] [stdout] 1551 + for (i, ) in original_features.iter().enumerate().take(pop.individuals.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:1593:30 [INFO] [stdout] | [INFO] [stdout] 1593 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1593 - for (_, &val) in &child.features { [INFO] [stdout] 1593 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:1595:21 [INFO] [stdout] | [INFO] [stdout] 1595 | val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: length comparison to zero [INFO] [stdout] --> src/ga.rs:1704:13 [INFO] [stdout] | [INFO] [stdout] 1704 | new_pop.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:1830:30 [INFO] [stdout] | [INFO] [stdout] 1830 | for (_, &val) in &ind.features { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1830 - for (_, &val) in &ind.features { [INFO] [stdout] 1830 + for &val in ind.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:1871:26 [INFO] [stdout] | [INFO] [stdout] 1871 | for (_, &val) in &pop.individuals[0].features { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 1871 - for (_, &val) in &pop.individuals[0].features { [INFO] [stdout] 1871 + for &val in pop.individuals[0].features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2037:26 [INFO] [stdout] | [INFO] [stdout] 2037 | for (_, &val) in &pop.individuals[0].features { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2037 - for (_, &val) in &pop.individuals[0].features { [INFO] [stdout] 2037 + for &val in pop.individuals[0].features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:2039:17 [INFO] [stdout] | [INFO] [stdout] 2039 | val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2084:34 [INFO] [stdout] | [INFO] [stdout] 2084 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2084 - for (_, &val) in &child.features { [INFO] [stdout] 2084 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:2086:25 [INFO] [stdout] | [INFO] [stdout] 2086 | val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2091:34 [INFO] [stdout] | [INFO] [stdout] 2091 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2091 - for (_, &val) in &child.features { [INFO] [stdout] 2091 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_features` [INFO] [stdout] --> src/ga.rs:2119:18 [INFO] [stdout] | [INFO] [stdout] 2119 | for i in 0..pop.individuals.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 2119 - for i in 0..pop.individuals.len() { [INFO] [stdout] 2119 + for (i, ) in original_features.iter().enumerate().take(pop.individuals.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2418:30 [INFO] [stdout] | [INFO] [stdout] 2418 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2418 - for (_, &val) in &child.features { [INFO] [stdout] 2418 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:2420:21 [INFO] [stdout] | [INFO] [stdout] 2420 | val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: the loop variable `i` is used to index `original_features` [INFO] [stdout] --> src/ga.rs:2448:18 [INFO] [stdout] | [INFO] [stdout] 2448 | for i in 0..pop.individuals.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 2448 - for i in 0..pop.individuals.len() { [INFO] [stdout] 2448 + for (i, ) in original_features.iter().enumerate().take(pop.individuals.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2840:38 [INFO] [stdout] | [INFO] [stdout] 2840 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2840 - for (_, &val) in &child.features { [INFO] [stdout] 2840 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:2842:29 [INFO] [stdout] | [INFO] [stdout] 2842 | ... val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2849:38 [INFO] [stdout] | [INFO] [stdout] 2849 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2849 - for (_, &val) in &child.features { [INFO] [stdout] 2849 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:2864:38 [INFO] [stdout] | [INFO] [stdout] 2864 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 2864 - for (_, &val) in &child.features { [INFO] [stdout] 2864 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:3051:26 [INFO] [stdout] | [INFO] [stdout] 3051 | for (_, &val) in &ind.features { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 3051 - for (_, &val) in &ind.features { [INFO] [stdout] 3051 + for &val in ind.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_features` [INFO] [stdout] --> src/ga.rs:3222:18 [INFO] [stdout] | [INFO] [stdout] 3222 | for i in 0..pop_empty.individuals.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 3222 - for i in 0..pop_empty.individuals.len() { [INFO] [stdout] 3222 + for (i, ) in original_features.iter().enumerate().take(pop_empty.individuals.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/ga.rs:3303:30 [INFO] [stdout] | [INFO] [stdout] 3303 | for (_, &val) in &child.features { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 3303 - for (_, &val) in &child.features { [INFO] [stdout] 3303 + for &val in child.features.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ga.rs:3305:21 [INFO] [stdout] | [INFO] [stdout] 3305 | val >= -1 && val <= 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: use: `(-1..=1).contains(&val)` [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: length comparison to zero [INFO] [stdout] --> src/ga.rs:3371:17 [INFO] [stdout] | [INFO] [stdout] 3371 | children.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!children.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ga.rs:3439:13 [INFO] [stdout] | [INFO] [stdout] 3439 | parents_with_filter.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parents_with_filter.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ind.parents` after checking its variant with `is_some` [INFO] [stdout] --> src/ga.rs:3587:35 [INFO] [stdout] | [INFO] [stdout] 3586 | if ind.parents.is_some() { [INFO] [stdout] | ------------------------ help: try: `if let Some() = &ind.parents` [INFO] [stdout] 3587 | let parents = ind.parents.as_ref().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ga.rs:3641:13 [INFO] [stdout] | [INFO] [stdout] 3641 | new_pop.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ga.rs:4090:13 [INFO] [stdout] | [INFO] [stdout] 4090 | final_pop.individuals.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!final_pop.individuals.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:186:32 [INFO] [stdout] | [INFO] [stdout] 186 | run_cv_training(&data, ¶m, running) [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:189:48 [INFO] [stdout] | [INFO] [stdout] 189 | run_training(&mut data, &mut None, ¶m, running); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:346:32 [INFO] [stdout] | [INFO] [stdout] 346 | run_cv_training(&data, ¶m, running) [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:349:48 [INFO] [stdout] | [INFO] [stdout] 349 | run_training(&mut data, &mut None, ¶m, running); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:499:50 [INFO] [stdout] | [INFO] [stdout] 499 | run_training(&mut data, initial_pop, ¶m, running); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:600:68 [INFO] [stdout] | [INFO] [stdout] 600 | (collection, meta) = (ga(data, &mut None, initial_pop, ¶m, running), None); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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/lib.rs:608:70 [INFO] [stdout] | [INFO] [stdout] 608 | (collection, meta) = (beam(data, &mut None, initial_pop, ¶m, running), None); [INFO] [stdout] | ^^^^^^ help: change this to: `param` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:611:17 [INFO] [stdout] | [INFO] [stdout] 611 | param.beam.max_nb_of_models as usize, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `param.beam.max_nb_of_models` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:648:6 [INFO] [stdout] | [INFO] [stdout] 648 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 649 | | Vec>, [INFO] [stdout] 650 | | Population, [INFO] [stdout] 651 | | Option, Vec)>>, [INFO] [stdout] 652 | | Option, [INFO] [stdout] 653 | | ) { [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:656:40 [INFO] [stdout] | [INFO] [stdout] 656 | let mut folds = CV::new_from_param(&data, param, &mut rng, param.cv.outer_folds); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: unneeded late initialization [INFO] [stdout] --> src/lib.rs:659:5 [INFO] [stdout] | [INFO] [stdout] 659 | let collections; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 685 | collections = folds.fold_collections; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `collections` here [INFO] [stdout] | [INFO] [stdout] 659 ~ [INFO] [stdout] 660 | let mut final_population; [INFO] [stdout] ... [INFO] [stdout] 684 | [INFO] [stdout] 685 ~ let collections = folds.fold_collections; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:682:26 [INFO] [stdout] | [INFO] [stdout] 682 | final_population.fit(&data, &mut None, &None, &None, &run_param); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: useless use of `vec!` [INFO] [stdout] --> src/gpu.rs:1400:31 [INFO] [stdout] | [INFO] [stdout] 1400 | let expected_model1 = vec![1.0f32, 0.5f32, 0.8f32]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1.0f32, 0.5f32, 0.8f32]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/gpu.rs:1414:31 [INFO] [stdout] | [INFO] [stdout] 1414 | let expected_model2 = vec![0.5f32, 1.0f32, 0.2f32]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[0.5f32, 1.0f32, 0.2f32]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/data.rs:3597:36 [INFO] [stdout] | [INFO] [stdout] 3597 | let expected_annotations = vec![ [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 3598 | | vec!["Batch_0", "Center_0", "Cohort_0"], // old index 0 -> new index 0 [INFO] [stdout] 3599 | | vec!["Batch_0", "Center_2", "Cohort_0"], // old index 2 -> new index 1 [INFO] [stdout] 3600 | | vec!["Batch_1", "Center_2", "Cohort_1"], // old index 5 -> new index 2 [INFO] [stdout] 3601 | | vec!["Batch_1", "Center_1", "Cohort_1"], // old index 7 -> new index 3 [INFO] [stdout] 3602 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 3597 ~ let expected_annotations = [vec!["Batch_0", "Center_0", "Cohort_0"], // old index 0 -> new index 0 [INFO] [stdout] 3598 + vec!["Batch_0", "Center_2", "Cohort_0"], // old index 2 -> new index 1 [INFO] [stdout] 3599 + vec!["Batch_1", "Center_2", "Cohort_1"], // old index 5 -> new index 2 [INFO] [stdout] 3600 ~ vec!["Batch_1", "Center_1", "Cohort_1"]]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3163:17 [INFO] [stdout] | [INFO] [stdout] 3163 | &vec![0.0_f64, 0.0_f64, 0.0_f64, 0.0_f64, 1.0_f64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0.0_f64, 0.0_f64, 0.0_f64, 0.0_f64, 1.0_f64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3171:17 [INFO] [stdout] | [INFO] [stdout] 3171 | &vec![0.0_f64, 0.0_f64, 0.0_f64, 0.0_f64, 1.0_f64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0.0_f64, 0.0_f64, 0.0_f64, 0.0_f64, 1.0_f64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3179:17 [INFO] [stdout] | [INFO] [stdout] 3179 | &vec![0.0_f64, 0.0_f64, 0.0_f64, 0.0_f64, 1.0_f64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0.0_f64, 0.0_f64, 0.0_f64, 0.0_f64, 1.0_f64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3188:17 [INFO] [stdout] | [INFO] [stdout] 3188 | &vec![0.1_f64, 0.2_f64, 0.3_f64, 0.4_f64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0.1_f64, 0.2_f64, 0.3_f64, 0.4_f64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3193:48 [INFO] [stdout] | [INFO] [stdout] 3193 | assert_eq!(0.5, compute_auc_from_value(&vec![0.5_f64, 0.6_f64, 0.7_f64, 0.8_f64], &vec![1_u8, 1_u8, 1_u8, 1_u8]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0.5_f64, 0.6_f64, 0.7_f64, 0.8_f64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3198:17 [INFO] [stdout] | [INFO] [stdout] 3198 | &vec![0.5_f64, 0.6_f64, 0.3_f64, 0.1_f64, 0.9_f64, 0.1_f64], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[0.5_f64, 0.6_f64, 0.3_f64, 0.1_f64, 0.9_f64, 0.1_f64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3371:48 [INFO] [stdout] | [INFO] [stdout] 3371 | ind_bin.features.values().all(|&v| vec![0, 1].contains(&v)), [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3375:48 [INFO] [stdout] | [INFO] [stdout] 3375 | ind_ter.features.values().all(|&v| vec![-1, 1].contains(&v)), [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `[-1, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3382:27 [INFO] [stdout] | [INFO] [stdout] 3382 | .all(|&v| vec![-1, 1].contains(&v)), [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `[-1, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/individual.rs:3389:27 [INFO] [stdout] | [INFO] [stdout] 3389 | .all(|&v| vec![-4, 4].contains(&v)), [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `[-4, 4]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/ga.rs:3097:21 [INFO] [stdout] | [INFO] [stdout] 3097 | for seed in vec![42, 123, 999] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[42, 123, 999]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 54s [INFO] running `Command { std: "docker" "inspect" "420c9ec1222fbce03745e4f9c29fe73437c3cf8d3ca85a322a4a7db5f4b5826f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "420c9ec1222fbce03745e4f9c29fe73437c3cf8d3ca85a322a4a7db5f4b5826f", kill_on_drop: false }` [INFO] [stdout] 420c9ec1222fbce03745e4f9c29fe73437c3cf8d3ca85a322a4a7db5f4b5826f