[INFO] cloning repository https://github.com/Arnav-Bista/genetic_algorithms [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Arnav-Bista/genetic_algorithms" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FArnav-Bista%2Fgenetic_algorithms", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FArnav-Bista%2Fgenetic_algorithms'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f2de3f1ce247ce9e7ea6c8c1eec412026d23fdea [INFO] linting Arnav-Bista/genetic_algorithms against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FArnav-Bista%2Fgenetic_algorithms" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Arnav-Bista/genetic_algorithms [INFO] finished tweaking git repo https://github.com/Arnav-Bista/genetic_algorithms [INFO] tweaked toml for git repo https://github.com/Arnav-Bista/genetic_algorithms written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Arnav-Bista/genetic_algorithms 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/Arnav-Bista/genetic_algorithms 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 egui_plot v0.28.1 [INFO] [stderr] Downloaded type-map v0.5.0 [INFO] [stderr] Downloaded wayland-cursor v0.31.5 [INFO] [stderr] Downloaded wayland-sys v0.31.4 [INFO] [stderr] Downloaded bytemuck_derive v1.7.1 [INFO] [stderr] Downloaded unicode-xid v0.2.5 [INFO] [stderr] Downloaded async-once-cell v0.5.3 [INFO] [stderr] Downloaded wayland-protocols-wlr v0.3.3 [INFO] [stderr] Downloaded wayland-scanner v0.31.4 [INFO] [stderr] Downloaded async-io v2.3.4 [INFO] [stderr] Downloaded bytemuck v1.17.1 [INFO] [stderr] Downloaded wayland-client v0.31.5 [INFO] [stderr] Downloaded wayland-backend v0.3.6 [INFO] [stderr] Downloaded xml-rs v0.8.21 [INFO] [stderr] Downloaded indexmap v2.5.0 [INFO] [stderr] Downloaded cc v1.1.16 [INFO] [stderr] Downloaded wayland-protocols v0.32.3 [INFO] [stderr] Downloaded ttf-parser v0.24.1 [INFO] [stderr] Downloaded image v0.25.2 [INFO] [stderr] Downloaded syn v2.0.91 [INFO] [stderr] Downloaded rustix v0.38.35 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] f51781abb65e476bae156b409c57c4dac141c19eb62327875ae8fde0870ad79a [INFO] running `Command { std: "docker" "start" "-a" "f51781abb65e476bae156b409c57c4dac141c19eb62327875ae8fde0870ad79a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f51781abb65e476bae156b409c57c4dac141c19eb62327875ae8fde0870ad79a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f51781abb65e476bae156b409c57c4dac141c19eb62327875ae8fde0870ad79a", kill_on_drop: false }` [INFO] [stdout] f51781abb65e476bae156b409c57c4dac141c19eb62327875ae8fde0870ad79a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 5e04a84b23704cd93ead2a351212e8a4865bfee75abc5a2605fe3dadf41c325e [INFO] running `Command { std: "docker" "start" "-a" "5e04a84b23704cd93ead2a351212e8a4865bfee75abc5a2605fe3dadf41c325e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.158 [INFO] [stderr] Compiling rustix v0.38.35 [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling wayland-sys v0.31.4 [INFO] [stderr] Compiling quick-xml v0.34.0 [INFO] [stderr] Compiling crossbeam-utils v0.8.20 [INFO] [stderr] Compiling wayland-client v0.31.5 [INFO] [stderr] Compiling cc v1.1.16 [INFO] [stderr] Compiling log v0.4.22 [INFO] [stderr] Checking parking v2.2.0 [INFO] [stderr] Compiling indexmap v2.5.0 [INFO] [stderr] Compiling serde v1.0.216 [INFO] [stderr] Checking futures-io v0.3.30 [INFO] [stderr] Checking futures-lite v2.3.0 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Compiling polling v2.8.0 [INFO] [stderr] Compiling memoffset v0.7.1 [INFO] [stderr] Compiling rustix v0.37.27 [INFO] [stderr] Checking ttf-parser v0.24.1 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Checking piper v0.2.4 [INFO] [stderr] Compiling async-fs v1.6.0 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Compiling async-io v1.13.0 [INFO] [stderr] Checking cursor-icon v1.1.0 [INFO] [stderr] Compiling xml-rs v0.8.21 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking async-broadcast v0.5.1 [INFO] [stderr] Checking ordered-stream v0.2.0 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling regex-automata v0.4.7 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Compiling smithay-client-toolkit v0.18.1 [INFO] [stderr] Checking arrayref v0.3.8 [INFO] [stderr] Compiling syn v2.0.91 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Checking event-listener v5.3.1 [INFO] [stderr] Checking async-executor v1.13.0 [INFO] [stderr] Compiling wayland-scanner v0.31.4 [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Checking accesskit v0.12.3 [INFO] [stderr] Compiling winit v0.29.15 [INFO] [stderr] Checking event-listener-strategy v0.5.2 [INFO] [stderr] Checking raw-window-handle v0.5.2 [INFO] [stderr] Checking async-channel v2.3.1 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling glutin v0.31.3 [INFO] [stderr] Checking blocking v1.6.1 [INFO] [stderr] Checking accesskit_consumer v0.16.1 [INFO] [stderr] Checking async-once-cell v0.5.3 [INFO] [stderr] Checking miniz_oxide v0.7.4 [INFO] [stderr] Compiling glutin_egl_sys v0.6.0 [INFO] [stderr] Compiling glutin_glx_sys v0.5.0 [INFO] [stderr] Checking fdeflate v0.3.4 [INFO] [stderr] Compiling wayland-backend v0.3.6 [INFO] [stderr] Compiling glutin-winit v0.4.2 [INFO] [stderr] Checking webbrowser v1.0.1 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking io-lifetimes v1.0.11 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Checking xdg-home v1.3.0 [INFO] [stderr] Checking owned_ttf_parser v0.24.0 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking memmap2 v0.9.4 [INFO] [stderr] Checking ab_glyph v0.2.28 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking png v0.17.13 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Checking mio v1.0.2 [INFO] [stderr] Checking web-time v0.2.4 [INFO] [stderr] Checking colored v2.1.0 [INFO] [stderr] Checking signal-hook v0.3.17 [INFO] [stderr] Checking getopts v0.2.21 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Compiling regex v1.10.6 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.99 [INFO] [stderr] Checking x11rb v0.13.1 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling bytemuck_derive v1.7.1 [INFO] [stderr] Compiling serde_derive v1.0.216 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Compiling enumflags2_derive v0.7.10 [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Compiling async-trait v0.1.82 [INFO] [stderr] Compiling serde_repr v0.1.19 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Compiling zvariant_utils v1.0.1 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking thiserror v1.0.63 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.99 [INFO] [stderr] Checking polling v3.7.3 [INFO] [stderr] Checking bytemuck v1.17.1 [INFO] [stderr] Checking calloop v0.12.4 [INFO] [stderr] Checking calloop v0.13.0 [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] Compiling zvariant_derive v3.15.2 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Compiling zbus_macros v3.15.2 [INFO] [stderr] Checking emath v0.28.1 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking image v0.25.2 [INFO] [stderr] Checking ecolor v0.28.1 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.99 [INFO] [stderr] Checking epaint v0.28.1 [INFO] [stderr] Checking wasm-bindgen v0.2.99 [INFO] [stderr] Checking wayland-protocols v0.31.2 [INFO] [stderr] Checking wayland-cursor v0.31.5 [INFO] [stderr] Checking calloop-wayland-source v0.2.0 [INFO] [stderr] Checking wayland-protocols v0.32.3 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking rand_distr v0.4.3 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking arboard v3.4.0 [INFO] [stderr] Checking js-sys v0.3.70 [INFO] [stderr] Checking egui v0.28.1 [INFO] [stderr] Checking wayland-protocols-wlr v0.2.0 [INFO] [stderr] Checking wayland-protocols-plasma v0.2.0 [INFO] [stderr] Checking egui_glow v0.28.1 [INFO] [stderr] Checking egui_plot v0.28.1 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.3 [INFO] [stderr] Checking enumflags2 v0.7.10 [INFO] [stderr] Checking serde-wasm-bindgen v0.6.5 [INFO] [stderr] Checking zvariant v3.15.2 [INFO] [stderr] Checking smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking zbus_names v2.6.1 [INFO] [stderr] Checking smithay-clipboard v0.7.2 [INFO] [stderr] Checking zbus v3.15.2 [INFO] [stderr] Checking sctk-adwaita v0.8.3 [INFO] [stderr] Checking atspi-common v0.3.0 [INFO] [stderr] Checking atspi-proxies v0.3.0 [INFO] [stderr] Checking atspi-connection v0.3.0 [INFO] [stderr] Checking atspi v0.19.0 [INFO] [stderr] Checking accesskit_unix v0.6.2 [INFO] [stderr] Checking accesskit_winit v0.16.1 [INFO] [stderr] Checking egui-winit v0.28.1 [INFO] [stderr] Checking eframe v0.28.1 [INFO] [stderr] Checking genetic_algorithm v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: associated function `new_shuffle` is never used [INFO] [stdout] --> src/candidate.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Candidate { [INFO] [stdout] | --------- associated function in this trait [INFO] [stdout] 2 | fn new(chromosomes: U) -> Self; [INFO] [stdout] 3 | fn new_shuffle(chromosomes: U) -> Self; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_population_size` is never used [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:149:12 [INFO] [stdout] | [INFO] [stdout] 21 | / impl GA [INFO] [stdout] 22 | | where [INFO] [stdout] 23 | | T: Candidate + GaCandidate + Clone, [INFO] [stdout] | |__________________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 149 | pub fn set_population_size(&mut self, population_size: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Tournament` is never constructed [INFO] [stdout] --> src/genetic_algorithm/selection.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub enum SelectionMethod { [INFO] [stdout] | --------------- variant in this enum [INFO] [stdout] 9 | Tournament(usize), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimulatedAnnealing` is never constructed [INFO] [stdout] --> src/simualted_annealing/simulated_annealing.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct SimulatedAnnealing { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `run`, and `step` are never used [INFO] [stdout] --> src/simualted_annealing/simulated_annealing.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 14 | / impl SimulatedAnnealing [INFO] [stdout] 15 | | where [INFO] [stdout] 16 | | T: Candidate + SaCandidate + Clone, [INFO] [stdout] | |__________________________________________- associated items in this implementation [INFO] [stdout] 17 | { [INFO] [stdout] 18 | pub fn new(temperature: f64, cooling_rate: f64) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn run(&mut self, initial: T, iterations: usize) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn step(&mut self, current: T) -> T { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `SaCandidate` is never used [INFO] [stdout] --> src/simualted_annealing/simulated_annealing_candidate.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait SaCandidate { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/genetic_algorithm/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod genetic_algorithm; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sorted_parents` [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 0..self.elitism_target { [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] 90 - for i in 0..self.elitism_target { [INFO] [stdout] 90 + for in sorted_parents.iter().take(self.elitism_target) { [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/genetic_algorithm/selection.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | population: &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] 21 ~ population: &[T], [INFO] [stdout] 22 | best_pick_probability: f64, [INFO] [stdout] ... [INFO] [stdout] 31 | // Elitism [INFO] [stdout] 32 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:34:14 [INFO] [stdout] | [INFO] [stdout] 34 | for i in 0..elitism_count { [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] 34 - for i in 0..elitism_count { [INFO] [stdout] 34 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `tournament` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | for i in 0..tournament.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 51 - for i in 0..tournament.len() { [INFO] [stdout] 51 + for (i, ) in tournament.iter_mut().enumerate() { [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/genetic_algorithm/selection.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | population: &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] 75 ~ population: &[T], [INFO] [stdout] 76 | elitism_count: usize, [INFO] [stdout] ... [INFO] [stdout] 84 | // Elitism [INFO] [stdout] 85 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 0..elitism_count { [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] 87 - for i in 0..elitism_count { [INFO] [stdout] 87 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/tsp.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | / for i in start..end { [INFO] [stdout] 112 | | child_chromosome[i] = self.chromosomes[i]; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `child_chromosome[start..end].copy_from_slice(&self.chromosomes[start..end]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_shuffle` is never used [INFO] [stdout] --> src/candidate.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Candidate { [INFO] [stdout] | --------- associated function in this trait [INFO] [stdout] 2 | fn new(chromosomes: U) -> Self; [INFO] [stdout] 3 | fn new_shuffle(chromosomes: U) -> Self; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_population_size` is never used [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:149:12 [INFO] [stdout] | [INFO] [stdout] 21 | / impl GA [INFO] [stdout] 22 | | where [INFO] [stdout] 23 | | T: Candidate + GaCandidate + Clone, [INFO] [stdout] | |__________________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 149 | pub fn set_population_size(&mut self, population_size: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Tournament` is never constructed [INFO] [stdout] --> src/genetic_algorithm/selection.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub enum SelectionMethod { [INFO] [stdout] | --------------- variant in this enum [INFO] [stdout] 9 | Tournament(usize), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SimulatedAnnealing` is never constructed [INFO] [stdout] --> src/simualted_annealing/simulated_annealing.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct SimulatedAnnealing { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `run`, and `step` are never used [INFO] [stdout] --> src/simualted_annealing/simulated_annealing.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 14 | / impl SimulatedAnnealing [INFO] [stdout] 15 | | where [INFO] [stdout] 16 | | T: Candidate + SaCandidate + Clone, [INFO] [stdout] | |__________________________________________- associated items in this implementation [INFO] [stdout] 17 | { [INFO] [stdout] 18 | pub fn new(temperature: f64, cooling_rate: f64) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn run(&mut self, initial: T, iterations: usize) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn step(&mut self, current: T) -> T { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `SaCandidate` is never used [INFO] [stdout] --> src/simualted_annealing/simulated_annealing_candidate.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait SaCandidate { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/genetic_algorithm/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod genetic_algorithm; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sorted_parents` [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 0..self.elitism_target { [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] 90 - for i in 0..self.elitism_target { [INFO] [stdout] 90 + for in sorted_parents.iter().take(self.elitism_target) { [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/genetic_algorithm/selection.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | population: &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] 21 ~ population: &[T], [INFO] [stdout] 22 | best_pick_probability: f64, [INFO] [stdout] ... [INFO] [stdout] 31 | // Elitism [INFO] [stdout] 32 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:34:14 [INFO] [stdout] | [INFO] [stdout] 34 | for i in 0..elitism_count { [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] 34 - for i in 0..elitism_count { [INFO] [stdout] 34 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `tournament` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | for i in 0..tournament.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 51 - for i in 0..tournament.len() { [INFO] [stdout] 51 + for (i, ) in tournament.iter_mut().enumerate() { [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/genetic_algorithm/selection.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | population: &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] 75 ~ population: &[T], [INFO] [stdout] 76 | elitism_count: usize, [INFO] [stdout] ... [INFO] [stdout] 84 | // Elitism [INFO] [stdout] 85 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 0..elitism_count { [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] 87 - for i in 0..elitism_count { [INFO] [stdout] 87 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/tsp.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | / for i in start..end { [INFO] [stdout] 112 | | child_chromosome[i] = self.chromosomes[i]; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `child_chromosome[start..end].copy_from_slice(&self.chromosomes[start..end]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Style` and `Visuals` [INFO] [stdout] --> src/visualisation/plotting.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use egui::{Style, Visuals}; [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 imports: `thread::sleep` and `time::Duration` [INFO] [stdout] --> src/visualisation/egui_struct.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{thread::sleep, time::Duration}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Style` and `Visuals` [INFO] [stdout] --> src/visualisation/plotting.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use egui::{Style, Visuals}; [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 imports: `thread::sleep` and `time::Duration` [INFO] [stdout] --> src/visualisation/egui_struct.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{thread::sleep, time::Duration}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PlotItem` [INFO] [stdout] --> src/visualisation/egui_struct.rs:4:45 [INFO] [stdout] | [INFO] [stdout] 4 | use egui_plot::{Corner, Legend, Line, Plot, PlotItem, PlotPoints}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> src/visualisation/plotting.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | Box::new(|cc| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PlotItem` [INFO] [stdout] --> src/visualisation/egui_struct.rs:4:45 [INFO] [stdout] | [INFO] [stdout] 4 | use egui_plot::{Corner, Legend, Line, Plot, PlotItem, PlotPoints}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `frame` [INFO] [stdout] --> src/visualisation/egui_struct.rs:44:47 [INFO] [stdout] | [INFO] [stdout] 44 | fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `frame` [INFO] [stdout] --> src/visualisation/egui_struct.rs:151:47 [INFO] [stdout] | [INFO] [stdout] 151 | fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/candidate.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Candidate { [INFO] [stdout] | --------- associated function in this trait [INFO] [stdout] 2 | fn new(chromosomes: U) -> Self; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_elitism_target`, `set_population_size`, `set_mutation_rate`, and `set_selection_target` are never used [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:145:12 [INFO] [stdout] | [INFO] [stdout] 21 | / impl GA [INFO] [stdout] 22 | | where [INFO] [stdout] 23 | | T: Candidate + GaCandidate + Clone, [INFO] [stdout] | |__________________________________________- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 145 | pub fn set_elitism_target(&mut self, elitism_target: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | pub fn set_population_size(&mut self, population_size: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub fn set_mutation_rate(&mut self, mutation_rate: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 157 | pub fn set_selection_target(&mut self, selection_target: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run` is never used [INFO] [stdout] --> src/simualted_annealing/simulated_annealing.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 14 | / impl SimulatedAnnealing [INFO] [stdout] 15 | | where [INFO] [stdout] 16 | | T: Candidate + SaCandidate + Clone, [INFO] [stdout] | |__________________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn run(&mut self, initial: T, iterations: usize) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `selection_method` is never read [INFO] [stdout] --> src/visualisation/egui_struct.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct RealTimePlotTSP { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 18 | selection_method: SelectionMethod, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `iterations` is never read [INFO] [stdout] --> src/visualisation/egui_struct.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct RealTimePlotSA { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 121 | sa: SimulatedAnnealing>, [INFO] [stdout] 122 | iterations: usize, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/city_writer.rs:29:75 [INFO] [stdout] | [INFO] [stdout] 29 | println!("Error while writing to file. Aborting.\n{}", err.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/city_writer.rs:42:62 [INFO] [stdout] | [INFO] [stdout] 42 | println!("Error opening file. Aborting.\n{}", err.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/genetic_algorithm/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod genetic_algorithm; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sorted_parents` [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 0..self.elitism_target { [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] 90 - for i in 0..self.elitism_target { [INFO] [stdout] 90 + for in sorted_parents.iter().take(self.elitism_target) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> src/visualisation/plotting.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | Box::new(|cc| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/genetic_algorithm/selection.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | population: &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] 21 ~ population: &[T], [INFO] [stdout] 22 | best_pick_probability: f64, [INFO] [stdout] ... [INFO] [stdout] 31 | // Elitism [INFO] [stdout] 32 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:34:14 [INFO] [stdout] | [INFO] [stdout] 34 | for i in 0..elitism_count { [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] 34 - for i in 0..elitism_count { [INFO] [stdout] 34 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `tournament` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | for i in 0..tournament.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 51 - for i in 0..tournament.len() { [INFO] [stdout] 51 + for (i, ) in tournament.iter_mut().enumerate() { [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/genetic_algorithm/selection.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | population: &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] 75 ~ population: &[T], [INFO] [stdout] 76 | elitism_count: usize, [INFO] [stdout] ... [INFO] [stdout] 84 | // Elitism [INFO] [stdout] 85 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 0..elitism_count { [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] 87 - for i in 0..elitism_count { [INFO] [stdout] 87 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `frame` [INFO] [stdout] --> src/visualisation/egui_struct.rs:44:47 [INFO] [stdout] | [INFO] [stdout] 44 | fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `frame` [INFO] [stdout] --> src/visualisation/egui_struct.rs:151:47 [INFO] [stdout] | [INFO] [stdout] 151 | fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/tsp.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | / for i in start..end { [INFO] [stdout] 112 | | child_chromosome[i] = self.chromosomes[i]; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `child_chromosome[start..end].copy_from_slice(&self.chromosomes[start..end]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/visualisation/egui_struct.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | if !(self.last_iteration >= self.iterations) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.last_iteration < self.iterations)` [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: associated function `new` is never used [INFO] [stdout] --> src/candidate.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Candidate { [INFO] [stdout] | --------- associated function in this trait [INFO] [stdout] 2 | fn new(chromosomes: U) -> Self; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_elitism_target`, `set_population_size`, `set_mutation_rate`, and `set_selection_target` are never used [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:145:12 [INFO] [stdout] | [INFO] [stdout] 21 | / impl GA [INFO] [stdout] 22 | | where [INFO] [stdout] 23 | | T: Candidate + GaCandidate + Clone, [INFO] [stdout] | |__________________________________________- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 145 | pub fn set_elitism_target(&mut self, elitism_target: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 149 | pub fn set_population_size(&mut self, population_size: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub fn set_mutation_rate(&mut self, mutation_rate: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 157 | pub fn set_selection_target(&mut self, selection_target: f64) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run` is never used [INFO] [stdout] --> src/simualted_annealing/simulated_annealing.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 14 | / impl SimulatedAnnealing [INFO] [stdout] 15 | | where [INFO] [stdout] 16 | | T: Candidate + SaCandidate + Clone, [INFO] [stdout] | |__________________________________________- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn run(&mut self, initial: T, iterations: usize) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `selection_method` is never read [INFO] [stdout] --> src/visualisation/egui_struct.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct RealTimePlotTSP { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 18 | selection_method: SelectionMethod, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `iterations` is never read [INFO] [stdout] --> src/visualisation/egui_struct.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 120 | pub struct RealTimePlotSA { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] 121 | sa: SimulatedAnnealing>, [INFO] [stdout] 122 | iterations: usize, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/city_writer.rs:29:75 [INFO] [stdout] | [INFO] [stdout] 29 | println!("Error while writing to file. Aborting.\n{}", err.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/city_writer.rs:42:62 [INFO] [stdout] | [INFO] [stdout] 42 | println!("Error opening file. Aborting.\n{}", err.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/interactive_cli.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | println!("{}", "Welcome to Constraints"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 13 - println!("{}", "Welcome to Constraints"); [INFO] [stdout] 13 + println!("Welcome to Constraints"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/genetic_algorithm/mod.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod genetic_algorithm; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interactive_cli.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | / match input.parse::() { [INFO] [stdout] 199 | | Ok(number) => { [INFO] [stdout] 200 | | if number > 0 && number <= options.len() { [INFO] [stdout] 201 | | return number - 1; [INFO] [stdout] ... | [INFO] [stdout] 204 | | Err(_) => {} [INFO] [stdout] 205 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 198 ~ if let Ok(number) = input.parse::() { [INFO] [stdout] 199 + if number > 0 && number <= options.len() { [INFO] [stdout] 200 + return number - 1; [INFO] [stdout] 201 + } [INFO] [stdout] 202 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sorted_parents` [INFO] [stdout] --> src/genetic_algorithm/genetic_algorithm.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 0..self.elitism_target { [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] 90 - for i in 0..self.elitism_target { [INFO] [stdout] 90 + for in sorted_parents.iter().take(self.elitism_target) { [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/genetic_algorithm/selection.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | population: &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] 21 ~ population: &[T], [INFO] [stdout] 22 | best_pick_probability: f64, [INFO] [stdout] ... [INFO] [stdout] 31 | // Elitism [INFO] [stdout] 32 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:34:14 [INFO] [stdout] | [INFO] [stdout] 34 | for i in 0..elitism_count { [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] 34 - for i in 0..elitism_count { [INFO] [stdout] 34 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `tournament` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | for i in 0..tournament.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 51 - for i in 0..tournament.len() { [INFO] [stdout] 51 + for (i, ) in tournament.iter_mut().enumerate() { [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/genetic_algorithm/selection.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | population: &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] 75 ~ population: &[T], [INFO] [stdout] 76 | elitism_count: usize, [INFO] [stdout] ... [INFO] [stdout] 84 | // Elitism [INFO] [stdout] 85 ~ let mut population = population.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `population` [INFO] [stdout] --> src/genetic_algorithm/selection.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 0..elitism_count { [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] 87 - for i in 0..elitism_count { [INFO] [stdout] 87 + for in population.iter().take(elitism_count) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/tsp.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | / for i in start..end { [INFO] [stdout] 112 | | child_chromosome[i] = self.chromosomes[i]; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `child_chromosome[start..end].copy_from_slice(&self.chromosomes[start..end]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/visualisation/egui_struct.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | if !(self.last_iteration >= self.iterations) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.last_iteration < self.iterations)` [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: literal with an empty format string [INFO] [stdout] --> src/interactive_cli.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | println!("{}", "Welcome to Constraints"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 13 - println!("{}", "Welcome to Constraints"); [INFO] [stdout] 13 + println!("Welcome to Constraints"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interactive_cli.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | / match input.parse::() { [INFO] [stdout] 199 | | Ok(number) => { [INFO] [stdout] 200 | | if number > 0 && number <= options.len() { [INFO] [stdout] 201 | | return number - 1; [INFO] [stdout] ... | [INFO] [stdout] 204 | | Err(_) => {} [INFO] [stdout] 205 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 198 ~ if let Ok(number) = input.parse::() { [INFO] [stdout] 199 + if number > 0 && number <= options.len() { [INFO] [stdout] 200 + return number - 1; [INFO] [stdout] 201 + } [INFO] [stdout] 202 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 08s [INFO] running `Command { std: "docker" "inspect" "5e04a84b23704cd93ead2a351212e8a4865bfee75abc5a2605fe3dadf41c325e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5e04a84b23704cd93ead2a351212e8a4865bfee75abc5a2605fe3dadf41c325e", kill_on_drop: false }` [INFO] [stdout] 5e04a84b23704cd93ead2a351212e8a4865bfee75abc5a2605fe3dadf41c325e