[INFO] cloning repository https://github.com/Pacifica123/l2_sa_pcversion [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Pacifica123/l2_sa_pcversion" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPacifica123%2Fl2_sa_pcversion", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPacifica123%2Fl2_sa_pcversion'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1cc7a612c4a578481b6eded04308a342d26384ad [INFO] linting Pacifica123/l2_sa_pcversion against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPacifica123%2Fl2_sa_pcversion" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Pacifica123/l2_sa_pcversion [INFO] finished tweaking git repo https://github.com/Pacifica123/l2_sa_pcversion [INFO] tweaked toml for git repo https://github.com/Pacifica123/l2_sa_pcversion written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Pacifica123/l2_sa_pcversion 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/Pacifica123/l2_sa_pcversion 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] Downloading crates ... [INFO] [stderr] Downloaded itoa v1.0.11 [INFO] [stderr] Downloaded serde_derive v1.0.210 [INFO] [stderr] Downloaded unicode-ident v1.0.13 [INFO] [stderr] Downloaded serde v1.0.210 [INFO] [stderr] Downloaded syn v2.0.79 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 6f2a60bce8e31db6f912957d078f4d993d66a050119fe46e640e2202880d3eec [INFO] running `Command { std: "docker" "start" "-a" "6f2a60bce8e31db6f912957d078f4d993d66a050119fe46e640e2202880d3eec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6f2a60bce8e31db6f912957d078f4d993d66a050119fe46e640e2202880d3eec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6f2a60bce8e31db6f912957d078f4d993d66a050119fe46e640e2202880d3eec", kill_on_drop: false }` [INFO] [stdout] 6f2a60bce8e31db6f912957d078f4d993d66a050119fe46e640e2202880d3eec [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 123f1064d87485a7e0c6515cd8c872c498ffcaeed8a9220e53c12d5d3ce64635 [INFO] running `Command { std: "docker" "start" "-a" "123f1064d87485a7e0c6515cd8c872c498ffcaeed8a9220e53c12d5d3ce64635", kill_on_drop: false }` [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking itoa v1.0.11 [INFO] [stderr] Checking ryu v1.0.18 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Checking csv v1.3.0 [INFO] [stderr] Checking l2_sa_pcversion v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `serde::Deserialize` [INFO] [stdout] --> src/clinning.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use serde::Deserialize; [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: `std::path::Path` [INFO] [stdout] --> src/clinning.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::path::Path; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `serde::Deserialize` [INFO] [stdout] --> src/clinning.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use serde::Deserialize; [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: `std::path::Path` [INFO] [stdout] --> src/clinning.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::path::Path; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target` [INFO] [stdout] --> src/calculate.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | target: &str, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_target` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target_name` [INFO] [stdout] --> src/calculate.rs:157:20 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn calculate_a(target_name: &str, target_corr_i: f64, inner_corr: f64, target_corr_another: f64){ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_target_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_fund` [INFO] [stdout] --> src/calculate.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | let a_fund = (target_corr_i - inner_corr*target_corr_another) / (1.0 - inner_corr.powi(2)); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_a_fund` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `coeff_student_by_original` [INFO] [stdout] --> src/main.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | let coeff_student_by_original = calculate_student_t_for_correlations(&corr_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_coeff_student_by_original` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `rows.get(0)` [INFO] [stdout] --> src/clinning.rs:93:30 [INFO] [stdout] | [INFO] [stdout] 93 | if let Some(first_row) = rows.get(0) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `rows.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: accessing first element with `csv_model.rows.get(0)` [INFO] [stdout] --> src/clinning.rs:106:30 [INFO] [stdout] | [INFO] [stdout] 106 | if let Some(first_row) = csv_model.rows.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `csv_model.rows.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target` [INFO] [stdout] --> src/calculate.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | target: &str, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_target` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `target_name` [INFO] [stdout] --> src/calculate.rs:157:20 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn calculate_a(target_name: &str, target_corr_i: f64, inner_corr: f64, target_corr_another: f64){ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_target_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_fund` [INFO] [stdout] --> src/calculate.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | let a_fund = (target_corr_i - inner_corr*target_corr_another) / (1.0 - inner_corr.powi(2)); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_a_fund` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/calculate.rs:59:16 [INFO] [stdout] | [INFO] [stdout] 59 | corr_data: &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] 59 - corr_data: &Vec, [INFO] [stdout] 59 + corr_data: &[CorrelationResult], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/calculate.rs:99:36 [INFO] [stdout] | [INFO] [stdout] 99 | let is_same_corr = (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_x) [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 100 | | || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_y) [INFO] [stdout] 101 | | || (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_y) [INFO] [stdout] 102 | | || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_x); [INFO] [stdout] | |_________________________________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 99 - let is_same_corr = (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_x) [INFO] [stdout] 100 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_y) [INFO] [stdout] 101 - || (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_y) [INFO] [stdout] 102 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_x); [INFO] [stdout] 99 + let is_same_corr = !(corr.column_x != factor_a.column_x && corr.column_x != factor_a.column_y || corr.column_y != factor_b.column_x && corr.column_y != factor_b.column_y); [INFO] [stdout] | [INFO] [stdout] 99 - let is_same_corr = (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_x) [INFO] [stdout] 100 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_y) [INFO] [stdout] 101 - || (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_y) [INFO] [stdout] 102 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_x); [INFO] [stdout] 99 + let is_same_corr = (corr.column_y == factor_b.column_y || corr.column_y == factor_b.column_x) && (corr.column_x == factor_a.column_y || corr.column_x == factor_a.column_x); [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/calculate.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | relevant_corr: &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] 80 ~ relevant_corr: &[CorrelationResult], [INFO] [stdout] 81 | all_corr_data: &Vec, [INFO] [stdout] ... [INFO] [stdout] 84 | ) -> Vec { [INFO] [stdout] 85 ~ let mut final_factors = relevant_corr.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/calculate.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / if is_same_corr { [INFO] [stdout] 105 | | if corr.correlation.abs() > mutual_threshold { [INFO] [stdout] 106 | | if factor_a.correlation.abs() < factor_b.correlation.abs() { [INFO] [stdout] 107 | | println!("Помечаем фактор {} -- {} на удаление", factor_a.column_x, factor_a.column_y); [INFO] [stdout] ... | [INFO] [stdout] 122 | | } [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] 104 ~ if is_same_corr [INFO] [stdout] 105 ~ && corr.correlation.abs() > mutual_threshold { [INFO] [stdout] 106 | if factor_a.correlation.abs() < factor_b.correlation.abs() { [INFO] [stdout] ... [INFO] [stdout] 120 | } [INFO] [stdout] 121 ~ } [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/calculate.rs:147:59 [INFO] [stdout] | [INFO] [stdout] 147 | pub fn calculate_student_t_for_correlations(correlations: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 147 - pub fn calculate_student_t_for_correlations(correlations: &Vec) -> Vec { [INFO] [stdout] 147 + pub fn calculate_student_t_for_correlations(correlations: &[CorrelationResult]) -> 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/utils.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn mean(values: &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] 1 - pub fn mean(values: &Vec) -> f64{ [INFO] [stdout] 1 + pub fn mean(values: &[f64]) -> f64{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `coeff_student_by_original` [INFO] [stdout] --> src/main.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | let coeff_student_by_original = calculate_student_t_for_correlations(&corr_data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_coeff_student_by_original` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:25:23 [INFO] [stdout] | [INFO] [stdout] 25 | let x_mean = mean(&x_values); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `x_values` [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/utils.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | let y_mean = mean(&y_values); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `y_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: accessing first element with `rows.get(0)` [INFO] [stdout] --> src/clinning.rs:93:30 [INFO] [stdout] | [INFO] [stdout] 93 | if let Some(first_row) = rows.get(0) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `rows.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: accessing first element with `csv_model.rows.get(0)` [INFO] [stdout] --> src/clinning.rs:106:30 [INFO] [stdout] | [INFO] [stdout] 106 | if let Some(first_row) = csv_model.rows.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `csv_model.rows.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/graphix.rs:39:49 [INFO] [stdout] | [INFO] [stdout] 39 | None => write!(file, "{},", "-")?, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 - None => write!(file, "{},", "-")?, [INFO] [stdout] 39 + None => write!(file, "-,")?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/graphix.rs:42:37 [INFO] [stdout] | [INFO] [stdout] 42 | write!(file, "{},", "-")?; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 42 - write!(file, "{},", "-")?; [INFO] [stdout] 42 + write!(file, "-,")?; [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/graphix.rs:126:38 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn print_student_coeffs(results: &Vec, corrs_for_res: &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] 126 - pub fn print_student_coeffs(results: &Vec, corrs_for_res: &Vec){ [INFO] [stdout] 126 + pub fn print_student_coeffs(results: &[f64], corrs_for_res: &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/calculate.rs:59:16 [INFO] [stdout] | [INFO] [stdout] 59 | corr_data: &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] 59 - corr_data: &Vec, [INFO] [stdout] 59 + corr_data: &[CorrelationResult], [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/graphix.rs:126:64 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn print_student_coeffs(results: &Vec, corrs_for_res: &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] 126 - pub fn print_student_coeffs(results: &Vec, corrs_for_res: &Vec){ [INFO] [stdout] 126 + pub fn print_student_coeffs(results: &Vec, corrs_for_res: &[CorrelationResult]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/calculate.rs:99:36 [INFO] [stdout] | [INFO] [stdout] 99 | let is_same_corr = (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_x) [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 100 | | || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_y) [INFO] [stdout] 101 | | || (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_y) [INFO] [stdout] 102 | | || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_x); [INFO] [stdout] | |_________________________________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 99 - let is_same_corr = (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_x) [INFO] [stdout] 100 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_y) [INFO] [stdout] 101 - || (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_y) [INFO] [stdout] 102 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_x); [INFO] [stdout] 99 + let is_same_corr = !(corr.column_x != factor_a.column_x && corr.column_x != factor_a.column_y || corr.column_y != factor_b.column_x && corr.column_y != factor_b.column_y); [INFO] [stdout] | [INFO] [stdout] 99 - let is_same_corr = (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_x) [INFO] [stdout] 100 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_y) [INFO] [stdout] 101 - || (corr.column_x == factor_a.column_x && corr.column_y == factor_b.column_y) [INFO] [stdout] 102 - || (corr.column_x == factor_a.column_y && corr.column_y == factor_b.column_x); [INFO] [stdout] 99 + let is_same_corr = (corr.column_y == factor_b.column_y || corr.column_y == factor_b.column_x) && (corr.column_x == factor_a.column_y || corr.column_x == factor_a.column_x); [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/calculate.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | relevant_corr: &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] 80 ~ relevant_corr: &[CorrelationResult], [INFO] [stdout] 81 | all_corr_data: &Vec, [INFO] [stdout] ... [INFO] [stdout] 84 | ) -> Vec { [INFO] [stdout] 85 ~ let mut final_factors = relevant_corr.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:28:108 [INFO] [stdout] | [INFO] [stdout] 28 | ...tors(&calculate_filter_by_target(&corr_data, &target), &corr_data, &target, 0.8); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [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/main.rs:28:130 [INFO] [stdout] | [INFO] [stdout] 28 | ..._by_target(&corr_data, &target), &corr_data, &target, 0.8); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [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/calculate.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | / if is_same_corr { [INFO] [stdout] 105 | | if corr.correlation.abs() > mutual_threshold { [INFO] [stdout] 106 | | if factor_a.correlation.abs() < factor_b.correlation.abs() { [INFO] [stdout] 107 | | println!("Помечаем фактор {} -- {} на удаление", factor_a.column_x, factor_a.column_y); [INFO] [stdout] ... | [INFO] [stdout] 122 | | } [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] 104 ~ if is_same_corr [INFO] [stdout] 105 ~ && corr.correlation.abs() > mutual_threshold { [INFO] [stdout] 106 | if factor_a.correlation.abs() < factor_b.correlation.abs() { [INFO] [stdout] ... [INFO] [stdout] 120 | } [INFO] [stdout] 121 ~ } [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/calculate.rs:147:59 [INFO] [stdout] | [INFO] [stdout] 147 | pub fn calculate_student_t_for_correlations(correlations: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 147 - pub fn calculate_student_t_for_correlations(correlations: &Vec) -> Vec { [INFO] [stdout] 147 + pub fn calculate_student_t_for_correlations(correlations: &[CorrelationResult]) -> 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/utils.rs:1:21 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn mean(values: &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] 1 - pub fn mean(values: &Vec) -> f64{ [INFO] [stdout] 1 + pub fn mean(values: &[f64]) -> f64{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:25:23 [INFO] [stdout] | [INFO] [stdout] 25 | let x_mean = mean(&x_values); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `x_values` [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/utils.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | let y_mean = mean(&y_values); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `y_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: literal with an empty format string [INFO] [stdout] --> src/graphix.rs:39:49 [INFO] [stdout] | [INFO] [stdout] 39 | None => write!(file, "{},", "-")?, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] = note: `#[warn(clippy::write_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 - None => write!(file, "{},", "-")?, [INFO] [stdout] 39 + None => write!(file, "-,")?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/graphix.rs:42:37 [INFO] [stdout] | [INFO] [stdout] 42 | write!(file, "{},", "-")?; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 42 - write!(file, "{},", "-")?; [INFO] [stdout] 42 + write!(file, "-,")?; [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/graphix.rs:126:38 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn print_student_coeffs(results: &Vec, corrs_for_res: &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] 126 - pub fn print_student_coeffs(results: &Vec, corrs_for_res: &Vec){ [INFO] [stdout] 126 + pub fn print_student_coeffs(results: &[f64], corrs_for_res: &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/graphix.rs:126:64 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn print_student_coeffs(results: &Vec, corrs_for_res: &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] 126 - pub fn print_student_coeffs(results: &Vec, corrs_for_res: &Vec){ [INFO] [stdout] 126 + pub fn print_student_coeffs(results: &Vec, corrs_for_res: &[CorrelationResult]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:28:108 [INFO] [stdout] | [INFO] [stdout] 28 | ...tors(&calculate_filter_by_target(&corr_data, &target), &corr_data, &target, 0.8); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [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/main.rs:28:130 [INFO] [stdout] | [INFO] [stdout] 28 | ..._by_target(&corr_data, &target), &corr_data, &target, 0.8); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.25s [INFO] running `Command { std: "docker" "inspect" "123f1064d87485a7e0c6515cd8c872c498ffcaeed8a9220e53c12d5d3ce64635", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "123f1064d87485a7e0c6515cd8c872c498ffcaeed8a9220e53c12d5d3ce64635", kill_on_drop: false }` [INFO] [stdout] 123f1064d87485a7e0c6515cd8c872c498ffcaeed8a9220e53c12d5d3ce64635