[INFO] fetching crate rs-genetics 0.1.1... [INFO] linting rs-genetics-0.1.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate rs-genetics 0.1.1 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate rs-genetics 0.1.1 [INFO] removed 0 missing examples [INFO] finished tweaking crates.io crate rs-genetics 0.1.1 [INFO] tweaked toml for crates.io crate rs-genetics 0.1.1 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rs-genetics 0.1.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate rs-genetics 0.1.1 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 dwrote v0.11.2 [INFO] [stderr] Downloaded plotters-bitmap v0.3.7 [INFO] [stderr] Downloaded yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Downloaded core-text v20.1.0 [INFO] [stderr] Downloaded pathfinder_simd v0.5.4 [INFO] [stderr] Downloaded font-kit v0.14.2 [INFO] [stderr] Downloaded freetype-sys v0.20.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] b41a7a7c87130baedccc70090b935f7801c364b85533ba36b58d646ff3ae81ae [INFO] running `Command { std: "docker" "start" "-a" "b41a7a7c87130baedccc70090b935f7801c364b85533ba36b58d646ff3ae81ae", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b41a7a7c87130baedccc70090b935f7801c364b85533ba36b58d646ff3ae81ae", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b41a7a7c87130baedccc70090b935f7801c364b85533ba36b58d646ff3ae81ae", kill_on_drop: false }` [INFO] [stdout] b41a7a7c87130baedccc70090b935f7801c364b85533ba36b58d646ff3ae81ae [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 05f24a30c7db4322944f7cf7358da9f59d69e26db223b9b9b9228d06f228573c [INFO] running `Command { std: "docker" "start" "-a" "05f24a30c7db4322944f7cf7358da9f59d69e26db223b9b9b9228d06f228573c", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling libm v0.2.11 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking simd-adler32 v0.3.7 [INFO] [stderr] Compiling cc v1.2.13 [INFO] [stderr] Compiling yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Compiling pathfinder_simd v0.5.4 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking libloading v0.8.6 [INFO] [stderr] Checking miniz_oxide v0.8.3 [INFO] [stderr] Checking fdeflate v0.3.7 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Compiling font-kit v0.14.2 [INFO] [stderr] Checking gif v0.12.0 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Compiling syn v2.0.94 [INFO] [stderr] Checking chrono v0.4.39 [INFO] [stderr] Compiling freetype-sys v0.20.1 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking plotters-bitmap v0.3.7 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [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 rs-genetics v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/population.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | let mut individual:Vec = (0..81).map(|_|rng.gen_range(0..10)).collect(); [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: field `initialization` is never read [INFO] [stdout] --> src/population.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 74 | pub struct GA [INFO] [stdout] | -- field in this struct [INFO] [stdout] 75 | where F:Fn(Population)->f64{ [INFO] [stdout] 76 | initialization: InitializationStrategy, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/population.rs:120:93 [INFO] [stdout] | [INFO] [stdout] 120 | let mut evaluated_individuals:Vec<(Vec,f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [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] 120 - let mut evaluated_individuals:Vec<(Vec,f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [INFO] [stdout] 120 + let mut evaluated_individuals:Vec<(Vec,f64)> = vec.iter().cloned().zip(evals).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/population.rs:125:97 [INFO] [stdout] | [INFO] [stdout] 125 | let mut evaluated_individuals: Vec<(Vec, f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [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] 125 - let mut evaluated_individuals: Vec<(Vec, f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [INFO] [stdout] 125 + let mut evaluated_individuals: Vec<(Vec, f64)> = vec.iter().cloned().zip(evals).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `old_pop` [INFO] [stdout] --> src/population.rs:234:26 [INFO] [stdout] | [INFO] [stdout] 234 | for i in 0..old_pop.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] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 234 - for i in 0..old_pop.len(){ [INFO] [stdout] 234 + for in &mut old_pop{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/population.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | evals[0].clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `evals[0]` [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 boolean expression can be simplified [INFO] [stdout] --> src/population.rs:374:24 [INFO] [stdout] | [INFO] [stdout] 374 | if !child1[current_index1].is_some() && *count_child1 < count_occurrences(gene, &vec[parent2_index]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `child1[current_index1].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/population.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | if !child2[current_index2].is_some() && *count_child2 < count_occurrences(gene, &vec[parent1_index]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `child2[current_index2].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/population.rs:398:41 [INFO] [stdout] | [INFO] [stdout] 398 | fn count_occurrences(value: usize, vec: &Vec) -> usize { [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] 398 - fn count_occurrences(value: usize, vec: &Vec) -> usize { [INFO] [stdout] 398 + fn count_occurrences(value: usize, vec: &[usize]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/plot.rs:43:70 [INFO] [stdout] | [INFO] [stdout] 43 | .legend(|(x, y)| PathElement::new(vec![(x, y), (x + 20, y)], &RED)); [INFO] [stdout] | ^^^^ help: change this to: `RED` [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/plot.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | .background_style(&WHITE.mix(0.8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `WHITE.mix(0.8)` [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/plot.rs:48:23 [INFO] [stdout] | [INFO] [stdout] 48 | .border_style(&BLACK) [INFO] [stdout] | ^^^^^^ help: change this to: `BLACK` [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: variable does not need to be mutable [INFO] [stdout] --> src/population.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | let mut individual:Vec = (0..81).map(|_|rng.gen_range(0..10)).collect(); [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: field `initialization` is never read [INFO] [stdout] --> src/population.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 74 | pub struct GA [INFO] [stdout] | -- field in this struct [INFO] [stdout] 75 | where F:Fn(Population)->f64{ [INFO] [stdout] 76 | initialization: InitializationStrategy, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/population.rs:120:93 [INFO] [stdout] | [INFO] [stdout] 120 | let mut evaluated_individuals:Vec<(Vec,f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [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] 120 - let mut evaluated_individuals:Vec<(Vec,f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [INFO] [stdout] 120 + let mut evaluated_individuals:Vec<(Vec,f64)> = vec.iter().cloned().zip(evals).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/population.rs:125:97 [INFO] [stdout] | [INFO] [stdout] 125 | let mut evaluated_individuals: Vec<(Vec, f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [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] 125 - let mut evaluated_individuals: Vec<(Vec, f64)> = vec.iter().cloned().zip(evals.into_iter()).collect(); [INFO] [stdout] 125 + let mut evaluated_individuals: Vec<(Vec, f64)> = vec.iter().cloned().zip(evals).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `old_pop` [INFO] [stdout] --> src/population.rs:234:26 [INFO] [stdout] | [INFO] [stdout] 234 | for i in 0..old_pop.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] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 234 - for i in 0..old_pop.len(){ [INFO] [stdout] 234 + for in &mut old_pop{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `f64` which implements the `Copy` trait [INFO] [stdout] --> src/population.rs:268:9 [INFO] [stdout] | [INFO] [stdout] 268 | evals[0].clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `evals[0]` [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 boolean expression can be simplified [INFO] [stdout] --> src/population.rs:374:24 [INFO] [stdout] | [INFO] [stdout] 374 | if !child1[current_index1].is_some() && *count_child1 < count_occurrences(gene, &vec[parent2_index]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `child1[current_index1].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/population.rs:383:24 [INFO] [stdout] | [INFO] [stdout] 383 | if !child2[current_index2].is_some() && *count_child2 < count_occurrences(gene, &vec[parent1_index]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `child2[current_index2].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/population.rs:398:41 [INFO] [stdout] | [INFO] [stdout] 398 | fn count_occurrences(value: usize, vec: &Vec) -> usize { [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] 398 - fn count_occurrences(value: usize, vec: &Vec) -> usize { [INFO] [stdout] 398 + fn count_occurrences(value: usize, vec: &[usize]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/plot.rs:43:70 [INFO] [stdout] | [INFO] [stdout] 43 | .legend(|(x, y)| PathElement::new(vec![(x, y), (x + 20, y)], &RED)); [INFO] [stdout] | ^^^^ help: change this to: `RED` [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/plot.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | .background_style(&WHITE.mix(0.8)) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `WHITE.mix(0.8)` [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/plot.rs:48:23 [INFO] [stdout] | [INFO] [stdout] 48 | .border_style(&BLACK) [INFO] [stdout] | ^^^^^^ help: change this to: `BLACK` [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: unused import: `TSPInitialization` [INFO] [stdout] --> examples/sudoku.rs:2:67 [INFO] [stdout] | [INFO] [stdout] 2 | use rs_genetics::population::{Config, GA, InitializationStrategy, TSPInitialization, GetPopulation, Population, SudokuInitialization}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> examples/optimization.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | config.num_individuals = 1000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rs_genetics::population::Config { num_individuals: 1000, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> examples/optimization.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | let mut config = Config::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> examples/optimization.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 16 | let result = 1.0 / ((target - distance).abs()+0.000000001); [INFO] [stdout] | ----------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 17 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 16 ~ [INFO] [stdout] 17 ~ 1.0 / ((target - distance).abs()+0.000000001) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> examples/optimization.rs:8:22 [INFO] [stdout] | [INFO] [stdout] 8 | let inputs = vec![4.0, -2.0, 3.5, 5.0, -11.0, -4.7]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[4.0, -2.0, 3.5, 5.0, -11.0, -4.7]` [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] --> examples/optimization.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | let inputs = vec![4.0, -2.0, 3.5, 5.0, -11.0, -4.7]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[4.0, -2.0, 3.5, 5.0, -11.0, -4.7]` [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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> examples/sudoku.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | config.num_individuals=100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rs_genetics::population::Config { num_individuals: 100, num_genes: 81, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> examples/sudoku.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | let mut config = Config::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> examples/sudoku.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | if value < 1 || value > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=9).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] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> examples/n_queens.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | config.num_individuals=100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rs_genetics::population::Config { num_individuals: 100, num_genes: num_queens, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> examples/n_queens.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | let mut config = Config::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `vec.get(0)` [INFO] [stdout] --> examples/n_queens.rs:7:39 [INFO] [stdout] | [INFO] [stdout] 7 | if let Some(individual) = vec.get(0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `vec.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: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> examples/tsp.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | config.num_individuals=100; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `rs_genetics::population::Config { num_individuals: 100, num_genes: 6, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> examples/tsp.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | let mut config = Config::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> examples/tsp.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | ... = vec![City{x:41.9028,y:12.4964},City{x:48.8566,y:2.3522},City{x:37.9838,y:23.7275},City{x:52.5200,y:13.4050},City{x:51.5074,y:-0.1278},City{x:48.2082,y:16.3738}]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[City{x:41.9028,y:12.4964},City{x:48.8566,y:2.3522},City{x:37.9838,y:23.7275},City{x:52.5200,y:13.4050},City{x:51.5074,y:-0.1278},City{x:48.2082,y:16.3738}]` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 21.38s [INFO] running `Command { std: "docker" "inspect" "05f24a30c7db4322944f7cf7358da9f59d69e26db223b9b9b9228d06f228573c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "05f24a30c7db4322944f7cf7358da9f59d69e26db223b9b9b9228d06f228573c", kill_on_drop: false }` [INFO] [stdout] 05f24a30c7db4322944f7cf7358da9f59d69e26db223b9b9b9228d06f228573c