[INFO] cloning repository https://github.com/marcusbuffett/ripper [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/marcusbuffett/ripper" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmarcusbuffett%2Fripper", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmarcusbuffett%2Fripper'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9e47cb89567b5484a576404331d5f3c11d22d7b8 [INFO] linting marcusbuffett/ripper against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmarcusbuffett%2Fripper" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/marcusbuffett/ripper [INFO] finished tweaking git repo https://github.com/marcusbuffett/ripper [INFO] tweaked toml for git repo https://github.com/marcusbuffett/ripper written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/marcusbuffett/ripper 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/marcusbuffett/ripper 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d3f46a504b924ee737e5734feb22ccaf59e1507720f2133c97116a8d388a74c5 [INFO] running `Command { std: "docker" "start" "-a" "d3f46a504b924ee737e5734feb22ccaf59e1507720f2133c97116a8d388a74c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d3f46a504b924ee737e5734feb22ccaf59e1507720f2133c97116a8d388a74c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d3f46a504b924ee737e5734feb22ccaf59e1507720f2133c97116a8d388a74c5", kill_on_drop: false }` [INFO] [stdout] d3f46a504b924ee737e5734feb22ccaf59e1507720f2133c97116a8d388a74c5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5475c808c958a90927fad43298b59c816a1da75f627bd6def721993dfbe051fd [INFO] running `Command { std: "docker" "start" "-a" "5475c808c958a90927fad43298b59c816a1da75f627bd6def721993dfbe051fd", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.79 [INFO] [stderr] Compiling libc v0.2.159 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking sharded-slab v0.1.7 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking regex-automata v0.4.8 [INFO] [stderr] Checking csv v1.3.0 [INFO] [stderr] Checking regex v1.11.0 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking tracing-subscriber v0.3.18 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking ripper v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Rng` [INFO] [stdout] --> src/lib.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::{Rng, SeedableRng}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> src/lib.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | use std::{cell::RefCell, collections::HashMap}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/instance.rs:3:34 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::{BTreeMap, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/instance.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/instance.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/instance.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | attributes: attributes, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `attributes` [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: unused import: `Rng` [INFO] [stdout] --> src/lib.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::{Rng, SeedableRng}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/rule_stats.rs:593:9 [INFO] [stdout] | [INFO] [stdout] 593 | self: &Self, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 593 - self: &Self, [INFO] [stdout] 593 + &self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::HashMap` [INFO] [stdout] --> src/lib.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | use std::{cell::RefCell, collections::HashMap}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/instance.rs:3:34 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::{BTreeMap, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `antd::NominalAntd` [INFO] [stdout] --> src/lib.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use antd::NominalAntd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/instance.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/instance.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/instance.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | attributes: attributes, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `attributes` [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: unnecessary parentheses around closure body [INFO] [stdout] --> src/lib.rs:107:34 [INFO] [stdout] | [INFO] [stdout] 107 | .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 107 - .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] 107 + .map(|(i, inst)| i * inst.borrow().class_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/lib.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 116 - .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] 116 + .map(|(i, inst)| i * inst.borrow().class_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/rule_stats.rs:593:9 [INFO] [stdout] | [INFO] [stdout] 593 | self: &Self, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 593 - self: &Self, [INFO] [stdout] 593 + &self, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `antd::NominalAntd` [INFO] [stdout] --> src/lib.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use antd::NominalAntd; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `attribute::Attribute` [INFO] [stdout] --> src/lib.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | use attribute::Attribute; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/lib.rs:107:34 [INFO] [stdout] | [INFO] [stdout] 107 | .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 107 - .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] 107 + .map(|(i, inst)| i * inst.borrow().class_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/lib.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 116 - .map(|(i, inst)| (i * inst.borrow().class_value())) [INFO] [stdout] 116 + .map(|(i, inst)| i * inst.borrow().class_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/lib.rs:456:24 [INFO] [stdout] | [INFO] [stdout] 456 | let accuracy = (num_correct as f64 / num_total as f64); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 456 - let accuracy = (num_correct as f64 / num_total as f64); [INFO] [stdout] 456 + let accuracy = num_correct as f64 / num_total as f64; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sync::Arc` [INFO] [stdout] --> src/lib.rs:483:30 [INFO] [stdout] | [INFO] [stdout] 483 | use std::{cell::RefCell, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `HashSet` [INFO] [stdout] --> src/lib.rs:490:38 [INFO] [stdout] | [INFO] [stdout] 490 | use std::collections::{BTreeSet, HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/lib.rs:456:24 [INFO] [stdout] | [INFO] [stdout] 456 | let accuracy = (num_correct as f64 / num_total as f64); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 456 - let accuracy = (num_correct as f64 / num_total as f64); [INFO] [stdout] 456 + let accuracy = num_correct as f64 / num_total as f64; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/instance.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | let mut dataset = self [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/rule.rs:207:32 [INFO] [stdout] | [INFO] [stdout] 207 | pub fn clean_up(&mut self, data: &Instances) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/rule_stats.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | index: usize, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `uncovered` [INFO] [stdout] --> src/rule_stats.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | uncovered: &Instances, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_uncovered` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `prev_rule_stats` [INFO] [stdout] --> src/rule_stats.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | prev_rule_stats: &[Vec], [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_prev_rule_stats` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exp_fp_rate` [INFO] [stdout] --> src/rule_stats.rs:528:31 [INFO] [stdout] | [INFO] [stdout] 528 | pub fn combined_dl(&self, exp_fp_rate: f64, predicted: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_exp_fp_rate` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `predicted` [INFO] [stdout] --> src/rule_stats.rs:528:49 [INFO] [stdout] | [INFO] [stdout] 528 | pub fn combined_dl(&self, exp_fp_rate: f64, predicted: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_predicted` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | let mut class_dist = normalize(&class_dist); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class` [INFO] [stdout] --> src/lib.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | for (class_index, (class, count)) in class_frequencies.iter().enumerate() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_class` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/lib.rs:164:14 [INFO] [stdout] | [INFO] [stdout] 164 | for (z, one_class) in self.ruleset_stats.iter_mut().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `xyz` [INFO] [stdout] --> src/lib.rs:169:18 [INFO] [stdout] | [INFO] [stdout] 169 | for (xyz, class_dist) in one_class [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_xyz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/instance.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | let mut dataset = self [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/rule.rs:207:32 [INFO] [stdout] | [INFO] [stdout] 207 | pub fn clean_up(&mut self, data: &Instances) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/rule_stats.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | index: usize, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `uncovered` [INFO] [stdout] --> src/rule_stats.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | uncovered: &Instances, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_uncovered` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `prev_rule_stats` [INFO] [stdout] --> src/rule_stats.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | prev_rule_stats: &[Vec], [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_prev_rule_stats` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 205 | let mut has_positive = true; [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `last_grow_data` is assigned to, but never used [INFO] [stdout] --> src/lib.rs:202:13 [INFO] [stdout] | [INFO] [stdout] 202 | let mut last_grow_data: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_last_grow_data` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `last_prune_data` is assigned to, but never used [INFO] [stdout] --> src/lib.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | let mut last_prune_data: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_last_prune_data` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `has_positive` [INFO] [stdout] --> src/lib.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 205 | let mut has_positive = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_has_positive` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `last_grow_data` is never read [INFO] [stdout] --> src/lib.rs:210:13 [INFO] [stdout] | [INFO] [stdout] 210 | last_grow_data = Some(grow_data.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `last_prune_data` is never read [INFO] [stdout] --> src/lib.rs:211:13 [INFO] [stdout] | [INFO] [stdout] 211 | last_prune_data = Some(prune_data.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `exp_fp_rate` [INFO] [stdout] --> src/rule_stats.rs:528:31 [INFO] [stdout] | [INFO] [stdout] 528 | pub fn combined_dl(&self, exp_fp_rate: f64, predicted: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_exp_fp_rate` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `predicted` [INFO] [stdout] --> src/rule_stats.rs:528:49 [INFO] [stdout] | [INFO] [stdout] 528 | pub fn combined_dl(&self, exp_fp_rate: f64, predicted: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_predicted` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/attribute.rs:26:58 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) fn force_add_value(&mut self, value: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if !(sum_of_weights > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(sum_of_weights <= 0)` [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: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | let mut class_dist = normalize(&class_dist); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class` [INFO] [stdout] --> src/lib.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | for (class_index, (class, count)) in class_frequencies.iter().enumerate() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_class` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/lib.rs:164:14 [INFO] [stdout] | [INFO] [stdout] 164 | for (z, one_class) in self.ruleset_stats.iter_mut().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `xyz` [INFO] [stdout] --> src/lib.rs:169:18 [INFO] [stdout] | [INFO] [stdout] 169 | for (xyz, class_dist) in one_class [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_xyz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/rule.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | while grow_data.instances.len() > 0 && (num_unused > 0) && (def_ac_rt < 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!grow_data.instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:132:12 [INFO] [stdout] | [INFO] [stdout] 132 | if !(total > 0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(total <= 0)` [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: unneeded `return` statement [INFO] [stdout] --> src/rule.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | / return instances [INFO] [stdout] 233 | | .get(antd.value) [INFO] [stdout] 234 | | .expect("Should have this instance") [INFO] [stdout] 235 | | .clone(); [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] 232 ~ instances [INFO] [stdout] 233 + .get(antd.value) [INFO] [stdout] 234 + .expect("Should have this instance") [INFO] [stdout] 235 ~ .clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rule_stats.rs:49:51 [INFO] [stdout] | [INFO] [stdout] 49 | self.total = Self::num_all_conditions(&self.data.as_ref().unwrap()) as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.data.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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.filtered_instances` after checking its variant with `is_none` [INFO] [stdout] --> src/rule_stats.rs:148:38 [INFO] [stdout] | [INFO] [stdout] 145 | let data: Instances = if self.filtered_instances.is_none() { [INFO] [stdout] | ------------------------------------ help: try: `if let Some() = &self.filtered_instances` [INFO] [stdout] ... [INFO] [stdout] 148 | let filtered_instances = self.filtered_instances.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `simple_stats` [INFO] [stdout] --> src/rule_stats.rs:281:18 [INFO] [stdout] | [INFO] [stdout] 281 | for j in 0..index { [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] 281 - for j in 0..index { [INFO] [stdout] 281 + for in simple_stats.iter().take(index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rule_stats.rs:393:9 [INFO] [stdout] | [INFO] [stdout] 393 | / return self.min_data_dl_if_exists(index, exp_fp_rate) + self.theory_dl(index) [INFO] [stdout] 394 | | - self.min_data_dl_if_deleted(index, exp_fp_rate); [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] 393 ~ self.min_data_dl_if_exists(index, exp_fp_rate) + self.theory_dl(index) [INFO] [stdout] 394 ~ - self.min_data_dl_if_deleted(index, exp_fp_rate) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rule_stats.rs:425:80 [INFO] [stdout] | [INFO] [stdout] 425 | let if_deleted = self.potential(k, exp_fp_rate, &mut ruleset_stat, &rule_stat); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `rule_stat` [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: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 205 | let mut has_positive = true; [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `last_grow_data` is assigned to, but never used [INFO] [stdout] --> src/lib.rs:202:13 [INFO] [stdout] | [INFO] [stdout] 202 | let mut last_grow_data: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_last_grow_data` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `last_prune_data` is assigned to, but never used [INFO] [stdout] --> src/lib.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | let mut last_prune_data: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_last_prune_data` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `has_positive` [INFO] [stdout] --> src/lib.rs:205:13 [INFO] [stdout] | [INFO] [stdout] 205 | let mut has_positive = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_has_positive` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `last_grow_data` is never read [INFO] [stdout] --> src/lib.rs:210:13 [INFO] [stdout] | [INFO] [stdout] 210 | last_grow_data = Some(grow_data.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `last_prune_data` is never read [INFO] [stdout] --> src/lib.rs:211:13 [INFO] [stdout] | [INFO] [stdout] 211 | last_prune_data = Some(prune_data.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/rule_stats.rs:616:28 [INFO] [stdout] | [INFO] [stdout] 616 | (dist)[datum.borrow().class_value() as usize] += 1.; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `datum.borrow().class_value()` [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: the loop variable `i` is used to index `prev_rule_stats` [INFO] [stdout] --> src/rule_stats.rs:663:18 [INFO] [stdout] | [INFO] [stdout] 663 | for i in 0..index { [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] 663 - for i in 0..index { [INFO] [stdout] 663 + for (i, ) in prev_rule_stats.iter().enumerate().take(index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Rip` [INFO] [stdout] --> src/lib.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / pub fn new() -> Self { [INFO] [stdout] 56 | | Rip { [INFO] [stdout] 57 | | class: None, [INFO] [stdout] 58 | | ruleset: RuleSet::new(), [INFO] [stdout] ... | [INFO] [stdout] 66 | | } [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] 54 + impl Default for Rip { [INFO] [stdout] 55 + fn default() -> Self { [INFO] [stdout] 56 + Self::new() [INFO] [stdout] 57 + } [INFO] [stdout] 58 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:526:13 [INFO] [stdout] | [INFO] [stdout] 526 | let mut dataset = Rc::new(RefCell::new(Instances::new(Rc::new(RefCell::new( [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lib.rs:574:13 [INFO] [stdout] | [INFO] [stdout] 574 | for i in 0..10 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | class_weight as f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `class_weight` [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: items after a test module [INFO] [stdout] --> src/lib.rs:481:1 [INFO] [stdout] | [INFO] [stdout] 481 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 690 | fn normalize(vec: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:176:48 [INFO] [stdout] | [INFO] [stdout] 176 | let mut class_dist = normalize(&class_dist); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `class_dist` [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/lib.rs:213:35 [INFO] [stdout] | [INFO] [stdout] 213 | one_rule.consequent = class_index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `class_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/attribute.rs:26:58 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) fn force_add_value(&mut self, value: &str) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if !(sum_of_weights > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(sum_of_weights <= 0)` [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: length comparison to zero [INFO] [stdout] --> src/rule.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | while grow_data.instances.len() > 0 && (num_unused > 0) && (def_ac_rt < 1.0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!grow_data.instances.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rule.rs:132:12 [INFO] [stdout] | [INFO] [stdout] 132 | if !(total > 0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(total <= 0)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:347:25 [INFO] [stdout] | [INFO] [stdout] 347 | &prev_rule_stats.as_slice(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `prev_rule_stats.as_slice()` [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 `return` statement [INFO] [stdout] --> src/rule.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | / return instances [INFO] [stdout] 233 | | .get(antd.value) [INFO] [stdout] 234 | | .expect("Should have this instance") [INFO] [stdout] 235 | | .clone(); [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] 232 ~ instances [INFO] [stdout] 233 + .get(antd.value) [INFO] [stdout] 234 + .expect("Should have this instance") [INFO] [stdout] 235 ~ .clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rule_stats.rs:49:51 [INFO] [stdout] | [INFO] [stdout] 49 | self.total = Self::num_all_conditions(&self.data.as_ref().unwrap()) as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.data.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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `ruleset` [INFO] [stdout] --> src/lib.rs:417:26 [INFO] [stdout] | [INFO] [stdout] 417 | for k in ((position + 1) as usize)..ruleset.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] 417 - for k in ((position + 1) as usize)..ruleset.len() { [INFO] [stdout] 417 + for in ruleset.iter().skip(((position + 1) as usize)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `self.filtered_instances` after checking its variant with `is_none` [INFO] [stdout] --> src/rule_stats.rs:148:38 [INFO] [stdout] | [INFO] [stdout] 145 | let data: Instances = if self.filtered_instances.is_none() { [INFO] [stdout] | ------------------------------------ help: try: `if let Some() = &self.filtered_instances` [INFO] [stdout] ... [INFO] [stdout] 148 | let filtered_instances = self.filtered_instances.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:439:16 [INFO] [stdout] | [INFO] [stdout] 439 | if ruleset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ruleset.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: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:458:9 [INFO] [stdout] | [INFO] [stdout] 458 | return accuracy; [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] 458 - return accuracy; [INFO] [stdout] 458 + accuracy [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `simple_stats` [INFO] [stdout] --> src/rule_stats.rs:281:18 [INFO] [stdout] | [INFO] [stdout] 281 | for j in 0..index { [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] 281 - for j in 0..index { [INFO] [stdout] 281 + for in simple_stats.iter().take(index) { [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/lib.rs:690:19 [INFO] [stdout] | [INFO] [stdout] 690 | fn normalize(vec: &Vec) -> 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] 690 ~ fn normalize(vec: &[f64]) -> Vec { [INFO] [stdout] 691 | let magnitude: f64 = vec.iter().map(|&x| x * x).sum::().sqrt(); [INFO] [stdout] 692 | if magnitude == 0.0 { [INFO] [stdout] 693 ~ vec.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rule_stats.rs:393:9 [INFO] [stdout] | [INFO] [stdout] 393 | / return self.min_data_dl_if_exists(index, exp_fp_rate) + self.theory_dl(index) [INFO] [stdout] 394 | | - self.min_data_dl_if_deleted(index, exp_fp_rate); [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] 393 ~ self.min_data_dl_if_exists(index, exp_fp_rate) + self.theory_dl(index) [INFO] [stdout] 394 ~ - self.min_data_dl_if_deleted(index, exp_fp_rate) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/rule_stats.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | drop(ruleset); [INFO] [stdout] | ^^^^^-------^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut std::vec::Vec` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 158 - drop(ruleset); [INFO] [stdout] 158 + let _ = ruleset; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rule_stats.rs:425:80 [INFO] [stdout] | [INFO] [stdout] 425 | let if_deleted = self.potential(k, exp_fp_rate, &mut ruleset_stat, &rule_stat); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `rule_stat` [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: feature `type_alias_impl_trait` is declared but not used [INFO] [stdout] --> src/lib.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(type_alias_impl_trait)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/rule_stats.rs:616:28 [INFO] [stdout] | [INFO] [stdout] 616 | (dist)[datum.borrow().class_value() as usize] += 1.; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `datum.borrow().class_value()` [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: the loop variable `i` is used to index `prev_rule_stats` [INFO] [stdout] --> src/rule_stats.rs:663:18 [INFO] [stdout] | [INFO] [stdout] 663 | for i in 0..index { [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] 663 - for i in 0..index { [INFO] [stdout] 663 + for (i, ) in prev_rule_stats.iter().enumerate().take(index) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Rip` [INFO] [stdout] --> src/lib.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / pub fn new() -> Self { [INFO] [stdout] 56 | | Rip { [INFO] [stdout] 57 | | class: None, [INFO] [stdout] 58 | | ruleset: RuleSet::new(), [INFO] [stdout] ... | [INFO] [stdout] 66 | | } [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] 54 + impl Default for Rip { [INFO] [stdout] 55 + fn default() -> Self { [INFO] [stdout] 56 + Self::new() [INFO] [stdout] 57 + } [INFO] [stdout] 58 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/lib.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | class_weight as f64, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `class_weight` [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/lib.rs:176:48 [INFO] [stdout] | [INFO] [stdout] 176 | let mut class_dist = normalize(&class_dist); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `class_dist` [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/lib.rs:213:35 [INFO] [stdout] | [INFO] [stdout] 213 | one_rule.consequent = class_index.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `class_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` 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/lib.rs:347:25 [INFO] [stdout] | [INFO] [stdout] 347 | &prev_rule_stats.as_slice(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `prev_rule_stats.as_slice()` [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 loop variable `k` is only used to index `ruleset` [INFO] [stdout] --> src/lib.rs:417:26 [INFO] [stdout] | [INFO] [stdout] 417 | for k in ((position + 1) as usize)..ruleset.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] 417 - for k in ((position + 1) as usize)..ruleset.len() { [INFO] [stdout] 417 + for in ruleset.iter().skip(((position + 1) as usize)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:439:16 [INFO] [stdout] | [INFO] [stdout] 439 | if ruleset.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ruleset.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: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:458:9 [INFO] [stdout] | [INFO] [stdout] 458 | return accuracy; [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] 458 - return accuracy; [INFO] [stdout] 458 + accuracy [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/lib.rs:690:19 [INFO] [stdout] | [INFO] [stdout] 690 | fn normalize(vec: &Vec) -> 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] 690 ~ fn normalize(vec: &[f64]) -> Vec { [INFO] [stdout] 691 | let magnitude: f64 = vec.iter().map(|&x| x * x).sum::().sqrt(); [INFO] [stdout] 692 | if magnitude == 0.0 { [INFO] [stdout] 693 ~ vec.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/rule_stats.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | drop(ruleset); [INFO] [stdout] | ^^^^^-------^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut std::vec::Vec` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 158 - drop(ruleset); [INFO] [stdout] 158 + let _ = ruleset; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `type_alias_impl_trait` is declared but not used [INFO] [stdout] --> src/lib.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(type_alias_impl_trait)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.08s [INFO] running `Command { std: "docker" "inspect" "5475c808c958a90927fad43298b59c816a1da75f627bd6def721993dfbe051fd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5475c808c958a90927fad43298b59c816a1da75f627bd6def721993dfbe051fd", kill_on_drop: false }` [INFO] [stdout] 5475c808c958a90927fad43298b59c816a1da75f627bd6def721993dfbe051fd