[INFO] cloning repository https://github.com/xsznix/keygen [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/xsznix/keygen" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fxsznix%2Fkeygen", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fxsznix%2Fkeygen'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 37ae949cc7464c9051ff42cdda57283237d2906e [INFO] linting xsznix/keygen against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fxsznix%2Fkeygen" "/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/xsznix/keygen [INFO] finished tweaking git repo https://github.com/xsznix/keygen [INFO] tweaked toml for git repo https://github.com/xsznix/keygen written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/xsznix/keygen 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/xsznix/keygen 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] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Locking 2 packages to latest compatible versions [INFO] [stderr] Updating getopts v0.2.14 -> v0.2.24 [INFO] [stderr] Adding unicode-width v0.2.2 [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rand v0.3.12 [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] 10acad1eeeaca4f91e853a116adc1868d3194b4c591ca0c70faff86af626bd7d [INFO] running `Command { std: "docker" "start" "-a" "10acad1eeeaca4f91e853a116adc1868d3194b4c591ca0c70faff86af626bd7d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "10acad1eeeaca4f91e853a116adc1868d3194b4c591ca0c70faff86af626bd7d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "10acad1eeeaca4f91e853a116adc1868d3194b4c591ca0c70faff86af626bd7d", kill_on_drop: false }` [INFO] [stdout] 10acad1eeeaca4f91e853a116adc1868d3194b4c591ca0c70faff86af626bd7d [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] 4cf9047d03e99fe6c639450fe34778233f548a8fa940f2ea47fd6683c3cbe8f5 [INFO] running `Command { std: "docker" "start" "-a" "4cf9047d03e99fe6c639450fe34778233f548a8fa940f2ea47fd6683c3cbe8f5", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling winapi-build v0.1.1 [INFO] [stderr] Checking winapi v0.2.5 [INFO] [stderr] Checking libc v0.2.4 [INFO] [stderr] Checking unicode-width v0.2.2 [INFO] [stderr] Compiling advapi32-sys v0.1.2 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking rand v0.3.12 [INFO] [stderr] Checking keygen v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/layout.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /// Data structures and methods for creating and shuffling keyboard layouts. [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | extern crate rand; [INFO] [stdout] | ----------------- the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /// Data structures and methods for creating and shuffling keyboard layouts. [INFO] [stdout] 1 + //! Data structures and methods for creating and shuffling keyboard layouts. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/penalty.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / /// corpus string. [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | use std::vec::Vec; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Methods for calculating the penalty of a keyboard layout given an input [INFO] [stdout] 2 ~ //! corpus string. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/annealing.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / /// This code is written to be generic and can be reused for other applications. [INFO] [stdout] 4 | | [INFO] [stdout] | |_^ [INFO] [stdout] 5 | extern crate rand; [INFO] [stdout] | ----------------- the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Stochaistic optimisation based on simulated annealing. [INFO] [stdout] 2 ~ //! Math is shamelessly taken from: http://mkweb.bcgsc.ca/carpalx/?simulated_annealing [INFO] [stdout] 3 ~ //! This code is written to be generic and can be reused for other applications. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/simulator.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /// Applies the math in annealing.rs to keyboard layouts. [INFO] [stdout] 2 | | [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | extern crate rand; [INFO] [stdout] | ----------------- the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /// Applies the math in annealing.rs to keyboard layouts. [INFO] [stdout] 1 + //! Applies the math in annealing.rs to keyboard layouts. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/simulator.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | layout: layout, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `layout` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/layout.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /// Data structures and methods for creating and shuffling keyboard layouts. [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | extern crate rand; [INFO] [stdout] | ----------------- the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /// Data structures and methods for creating and shuffling keyboard layouts. [INFO] [stdout] 1 + //! Data structures and methods for creating and shuffling keyboard layouts. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/penalty.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / /// corpus string. [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | use std::vec::Vec; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Methods for calculating the penalty of a keyboard layout given an input [INFO] [stdout] 2 ~ //! corpus string. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/annealing.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | / /// This code is written to be generic and can be reused for other applications. [INFO] [stdout] 4 | | [INFO] [stdout] | |_^ [INFO] [stdout] 5 | extern crate rand; [INFO] [stdout] | ----------------- the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Stochaistic optimisation based on simulated annealing. [INFO] [stdout] 2 ~ //! Math is shamelessly taken from: http://mkweb.bcgsc.ca/carpalx/?simulated_annealing [INFO] [stdout] 3 ~ //! This code is written to be generic and can be reused for other applications. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/simulator.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /// Applies the math in annealing.rs to keyboard layouts. [INFO] [stdout] 2 | | [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | extern crate rand; [INFO] [stdout] | ----------------- the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /// Applies the math in annealing.rs to keyboard layouts. [INFO] [stdout] 1 + //! Applies the math in annealing.rs to keyboard layouts. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/simulator.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | layout: layout, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `layout` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LayoutShuffleMask` is never constructed [INFO] [stdout] --> src/layout.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | pub struct LayoutShuffleMask(KeyMap); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `kc` is never read [INFO] [stdout] --> src/layout.rs:78:6 [INFO] [stdout] | [INFO] [stdout] 76 | pub struct KeyPress [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 77 | { [INFO] [stdout] 78 | pub kc: char, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `KeyPress` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `layer` manually [INFO] [stdout] --> src/layout.rs:293:3 [INFO] [stdout] | [INFO] [stdout] 293 | / let temp = layer[i]; [INFO] [stdout] 294 | | layer[i] = layer[j]; [INFO] [stdout] 295 | | layer[j] = temp; [INFO] [stdout] | |________________________^ help: try: `layer.swap(i, j);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` [INFO] [stdout] --> src/layout.rs:305:23 [INFO] [stdout] | [INFO] [stdout] 305 | for (i, c) in layer.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/layout.rs:341:4 [INFO] [stdout] | [INFO] [stdout] 341 | swaps.push(0); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![0;SIZE]` [INFO] [stdout] = help: or `swaps.extend(std::iter::repeat_n(0, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/layout.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 387 | let ref mut lower = ((layout.0).0).0; [INFO] [stdout] | ----^^^^^^^^^^^^^-------------------- help: try: `let lower = &mut ((layout.0).0).0;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/layout.rs:388:9 [INFO] [stdout] | [INFO] [stdout] 388 | let ref mut upper = ((layout.1).0).0; [INFO] [stdout] | ----^^^^^^^^^^^^^-------------------- help: try: `let upper = &mut ((layout.1).0).0;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/penalty.rs:48:2 [INFO] [stdout] | [INFO] [stdout] 48 | / let mut penalties = Vec::new(); [INFO] [stdout] 49 | | [INFO] [stdout] 50 | | // Base penalty. [INFO] [stdout] 51 | | penalties.push(KeyPenalty { [INFO] [stdout] ... | [INFO] [stdout] 122 | | name: "twist", [INFO] [stdout] 123 | | }); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let penalties = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LayoutShuffleMask` is never constructed [INFO] [stdout] --> src/layout.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | pub struct LayoutShuffleMask(KeyMap); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `kc` is never read [INFO] [stdout] --> src/layout.rs:78:6 [INFO] [stdout] | [INFO] [stdout] 76 | pub struct KeyPress [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 77 | { [INFO] [stdout] 78 | pub kc: char, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `KeyPress` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/penalty.rs:193:18 [INFO] [stdout] | [INFO] [stdout] 193 | let mut chars = string.chars().into_iter().rev(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `string.chars()` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/penalty.rs:200:14 [INFO] [stdout] | [INFO] [stdout] 200 | Some(c) => match position_map.get_key_position(c) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 201 | | &Some(ref kp) => kp, [INFO] [stdout] 202 | | &None => { return 0.0 } [INFO] [stdout] 203 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 200 ~ Some(c) => match *position_map.get_key_position(c) { [INFO] [stdout] 201 ~ Some(ref kp) => kp, [INFO] [stdout] 202 ~ None => { return 0.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/penalty.rs:201:4 [INFO] [stdout] | [INFO] [stdout] 201 | &Some(ref kp) => kp, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 201 - &Some(ref kp) => kp, [INFO] [stdout] 201 + Some(kp) => kp, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/penalty.rs:219:26 [INFO] [stdout] | [INFO] [stdout] 219 | penalize(string, count, &curr, old1, old2, old3, result, detailed) [INFO] [stdout] | ^^^^^ help: change this to: `curr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/penalty.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | fn penalize<'a, 'b>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 229 | result: &'b mut Vec>, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 222 ~ fn penalize<'a>( [INFO] [stdout] 223 | string: &'a str, [INFO] [stdout] ... [INFO] [stdout] 228 | old3: & Option, [INFO] [stdout] 229 ~ result: &mut Vec>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:313:6 [INFO] [stdout] | [INFO] [stdout] 313 | if (curr.finger == Finger::Ring && old1.finger == Finger::Pinky && [INFO] [stdout] | ____________^ [INFO] [stdout] 314 | | (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 | | curr.row == Row::Bottom && old1.row == Row::Top)) || [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] 313 - if (curr.finger == Finger::Ring && old1.finger == Finger::Pinky && [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 313 + if !(curr.finger != Finger::Ring || old1.finger != Finger::Pinky || old1.row != Row::Top || curr.row != Row::Home && curr.row != Row::Bottom) || [INFO] [stdout] | [INFO] [stdout] 313 - if (curr.finger == Finger::Ring && old1.finger == Finger::Pinky && [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 313 + if (curr.row == Row::Bottom || curr.row == Row::Home) && old1.row == Row::Top && old1.finger == Finger::Pinky && curr.finger == Finger::Ring || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:314:7 [INFO] [stdout] | [INFO] [stdout] 314 | / (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 | | curr.row == Row::Bottom && old1.row == Row::Top)) || [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] help: try [INFO] [stdout] | [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 314 + !(old1.row != Row::Top || curr.row != Row::Home && curr.row != Row::Bottom)) || [INFO] [stdout] | [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 314 + (curr.row == Row::Bottom || curr.row == Row::Home) && old1.row == Row::Top) || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:316:6 [INFO] [stdout] | [INFO] [stdout] 316 | / (curr.finger == Finger::Pinky && old1.finger == Finger::Ring && [INFO] [stdout] 317 | | (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 | | curr.row == Row::Top && old1.row == Row::Bottom)) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 316 - (curr.finger == Finger::Pinky && old1.finger == Finger::Ring && [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 316 + !(curr.finger != Finger::Pinky || old1.finger != Finger::Ring || curr.row != Row::Top || old1.row != Row::Home && old1.row != Row::Bottom) { [INFO] [stdout] | [INFO] [stdout] 316 - (curr.finger == Finger::Pinky && old1.finger == Finger::Ring && [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 316 + (old1.row == Row::Bottom || old1.row == Row::Home) && curr.row == Row::Top && old1.finger == Finger::Ring && curr.finger == Finger::Pinky { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:317:7 [INFO] [stdout] | [INFO] [stdout] 317 | / (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 | | curr.row == Row::Top && old1.row == Row::Bottom)) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 317 + !(curr.row != Row::Top || old1.row != Row::Home && old1.row != Row::Bottom)) { [INFO] [stdout] | [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 317 + (old1.row == Row::Bottom || old1.row == Row::Home) && curr.row == Row::Top) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/penalty.rs:222:1 [INFO] [stdout] | [INFO] [stdout] 222 | / fn penalize<'a, 'b>( [INFO] [stdout] 223 | | string: &'a str, [INFO] [stdout] 224 | | count: usize, [INFO] [stdout] 225 | | curr: & KeyPress, [INFO] [stdout] ... | [INFO] [stdout] 230 | | detailed: bool) [INFO] [stdout] 231 | | -> f64 [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/penalty.rs:229:10 [INFO] [stdout] | [INFO] [stdout] 229 | result: &'b mut 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] 229 - result: &'b mut Vec>, [INFO] [stdout] 229 + result: &'b mut [KeyPenaltyResult<'a>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/penalty.rs:281:3 [INFO] [stdout] | [INFO] [stdout] 281 | / if curr.hand == old1.hand && curr.finger == old1.finger { [INFO] [stdout] 282 | | if curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 283 | | curr.row == Row::Bottom && old1.row == Row::Top { [INFO] [stdout] 284 | | let penalty = 10.0 * count; [INFO] [stdout] ... | [INFO] [stdout] 291 | | } [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] 281 ~ if curr.hand == old1.hand && curr.finger == old1.finger [INFO] [stdout] 282 ~ && (curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 283 ~ curr.row == Row::Bottom && old1.row == Row::Top) { [INFO] [stdout] 284 | let penalty = 10.0 * count; [INFO] [stdout] ... [INFO] [stdout] 289 | total += penalty; [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/penalty.rs:294:3 [INFO] [stdout] | [INFO] [stdout] 294 | / if curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 295 | | curr.row == Row::Bottom && old1.row == Row::Top { [INFO] [stdout] 296 | | if curr.finger == Finger::Ring && old1.finger == Finger::Pinky || [INFO] [stdout] 297 | | curr.finger == Finger::Pinky && old1.finger == Finger::Ring || [INFO] [stdout] ... | [INFO] [stdout] 310 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 294 ~ if (curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 295 ~ curr.row == Row::Bottom && old1.row == Row::Top) { [INFO] [stdout] 296 ~ && (curr.finger == Finger::Ring && old1.finger == Finger::Pinky || [INFO] [stdout] 297 | curr.finger == Finger::Pinky && old1.finger == Finger::Ring || [INFO] [stdout] ... [INFO] [stdout] 301 | old1.finger == Finger::Ring) && [INFO] [stdout] 302 ~ curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 303 | let penalty = 5.0 * count; [INFO] [stdout] ... [INFO] [stdout] 308 | total += penalty; [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/penalty.rs:385:2 [INFO] [stdout] | [INFO] [stdout] 385 | / if curr.hand == old2.hand && curr.finger == old2.finger { [INFO] [stdout] 386 | | if curr.row == Row::Top && old2.row == Row::Bottom || [INFO] [stdout] 387 | | curr.row == Row::Bottom && old2.row == Row::Top { [INFO] [stdout] 388 | | let penalty = 3.0 * count; [INFO] [stdout] ... | [INFO] [stdout] 396 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if curr.hand == old2.hand && curr.finger == old2.finger [INFO] [stdout] 386 ~ && (curr.row == Row::Top && old2.row == Row::Bottom || [INFO] [stdout] 387 ~ curr.row == Row::Bottom && old2.row == Row::Top) { [INFO] [stdout] 388 | let penalty = 3.0 * count; [INFO] [stdout] ... [INFO] [stdout] 394 | total += penalty; [INFO] [stdout] 395 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/simulator.rs:41:43 [INFO] [stdout] | [INFO] [stdout] 41 | let penalty = penalty::calculate_penalty(&quartads, len, init_layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:60:44 [INFO] [stdout] | [INFO] [stdout] 60 | let penalty = penalty::calculate_penalty(&quartads, len, &curr_layout, penalties, false); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:89:44 [INFO] [stdout] | [INFO] [stdout] 89 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:90:3 [INFO] [stdout] | [INFO] [stdout] 90 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` 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/simulator.rs:104:43 [INFO] [stdout] | [INFO] [stdout] 104 | let penalty = penalty::calculate_penalty(&quartads, len, init_layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:117:45 [INFO] [stdout] | [INFO] [stdout] 117 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, false); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/simulator.rs:138:8 [INFO] [stdout] | [INFO] [stdout] 138 | let ref layout = entry.layout; [INFO] [stdout] | ----^^^^^^^^^^---------------- help: try: `let layout = &entry.layout;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/simulator.rs:139:45 [INFO] [stdout] | [INFO] [stdout] 139 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:139:61 [INFO] [stdout] | [INFO] [stdout] 139 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, true); [INFO] [stdout] | ^^^^^^^ help: change this to: `layout` [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: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/simulator.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | print_result(&layout, &penalty); [INFO] [stdout] | ^^^^^^^ help: change this to: `layout` [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: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:154:2 [INFO] [stdout] | [INFO] [stdout] 154 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:179:3 [INFO] [stdout] | [INFO] [stdout] 179 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `layer` manually [INFO] [stdout] --> src/layout.rs:293:3 [INFO] [stdout] | [INFO] [stdout] 293 | / let temp = layer[i]; [INFO] [stdout] 294 | | layer[i] = layer[j]; [INFO] [stdout] 295 | | layer[j] = temp; [INFO] [stdout] | |________________________^ help: try: `layer.swap(i, j);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `matches.free.get(0)` [INFO] [stdout] --> src/main.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | let corpus_filename = match matches.free.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `matches.free.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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` [INFO] [stdout] --> src/layout.rs:305:23 [INFO] [stdout] | [INFO] [stdout] 305 | for (i, c) in layer.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:125:2 [INFO] [stdout] | [INFO] [stdout] 125 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/layout.rs:341:4 [INFO] [stdout] | [INFO] [stdout] 341 | swaps.push(0); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![0;SIZE]` [INFO] [stdout] = help: or `swaps.extend(std::iter::repeat_n(0, SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:130:2 [INFO] [stdout] | [INFO] [stdout] 130 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:135:2 [INFO] [stdout] | [INFO] [stdout] 135 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:140:2 [INFO] [stdout] | [INFO] [stdout] 140 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:145:2 [INFO] [stdout] | [INFO] [stdout] 145 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:150:2 [INFO] [stdout] | [INFO] [stdout] 150 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:155:2 [INFO] [stdout] | [INFO] [stdout] 155 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:160:2 [INFO] [stdout] | [INFO] [stdout] 160 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:165:2 [INFO] [stdout] | [INFO] [stdout] 165 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/layout.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 387 | let ref mut lower = ((layout.0).0).0; [INFO] [stdout] | ----^^^^^^^^^^^^^-------------------- help: try: `let lower = &mut ((layout.0).0).0;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/layout.rs:388:9 [INFO] [stdout] | [INFO] [stdout] 388 | let ref mut upper = ((layout.1).0).0; [INFO] [stdout] | ----^^^^^^^^^^^^^-------------------- help: try: `let upper = &mut ((layout.1).0).0;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | Err(f) => { panic!(f.to_string()) } [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: add a "{}" format string to `Display` the message [INFO] [stdout] | [INFO] [stdout] 32 | Err(f) => { panic!("{}", f.to_string()) } [INFO] [stdout] | +++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/penalty.rs:48:2 [INFO] [stdout] | [INFO] [stdout] 48 | / let mut penalties = Vec::new(); [INFO] [stdout] 49 | | [INFO] [stdout] 50 | | // Base penalty. [INFO] [stdout] 51 | | penalties.push(KeyPenalty { [INFO] [stdout] ... | [INFO] [stdout] 122 | | name: "twist", [INFO] [stdout] 123 | | }); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let penalties = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/penalty.rs:193:18 [INFO] [stdout] | [INFO] [stdout] 193 | let mut chars = string.chars().into_iter().rev(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `string.chars()` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/penalty.rs:200:14 [INFO] [stdout] | [INFO] [stdout] 200 | Some(c) => match position_map.get_key_position(c) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 201 | | &Some(ref kp) => kp, [INFO] [stdout] 202 | | &None => { return 0.0 } [INFO] [stdout] 203 | | }, [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 200 ~ Some(c) => match *position_map.get_key_position(c) { [INFO] [stdout] 201 ~ Some(ref kp) => kp, [INFO] [stdout] 202 ~ None => { return 0.0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> src/penalty.rs:201:4 [INFO] [stdout] | [INFO] [stdout] 201 | &Some(ref kp) => kp, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 201 - &Some(ref kp) => kp, [INFO] [stdout] 201 + Some(kp) => kp, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/penalty.rs:219:26 [INFO] [stdout] | [INFO] [stdout] 219 | penalize(string, count, &curr, old1, old2, old3, result, detailed) [INFO] [stdout] | ^^^^^ help: change this to: `curr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/penalty.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | fn penalize<'a, 'b>( [INFO] [stdout] | ^^ [INFO] [stdout] ... [INFO] [stdout] 229 | result: &'b mut Vec>, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 222 ~ fn penalize<'a>( [INFO] [stdout] 223 | string: &'a str, [INFO] [stdout] ... [INFO] [stdout] 228 | old3: & Option, [INFO] [stdout] 229 ~ result: &mut Vec>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:313:6 [INFO] [stdout] | [INFO] [stdout] 313 | if (curr.finger == Finger::Ring && old1.finger == Finger::Pinky && [INFO] [stdout] | ____________^ [INFO] [stdout] 314 | | (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 | | curr.row == Row::Bottom && old1.row == Row::Top)) || [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] 313 - if (curr.finger == Finger::Ring && old1.finger == Finger::Pinky && [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 313 + if !(curr.finger != Finger::Ring || old1.finger != Finger::Pinky || old1.row != Row::Top || curr.row != Row::Home && curr.row != Row::Bottom) || [INFO] [stdout] | [INFO] [stdout] 313 - if (curr.finger == Finger::Ring && old1.finger == Finger::Pinky && [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 313 + if (curr.row == Row::Bottom || curr.row == Row::Home) && old1.row == Row::Top && old1.finger == Finger::Pinky && curr.finger == Finger::Ring || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:314:7 [INFO] [stdout] | [INFO] [stdout] 314 | / (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 | | curr.row == Row::Bottom && old1.row == Row::Top)) || [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] help: try [INFO] [stdout] | [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 314 + !(old1.row != Row::Top || curr.row != Row::Home && curr.row != Row::Bottom)) || [INFO] [stdout] | [INFO] [stdout] 314 - (curr.row == Row::Home && old1.row == Row::Top || [INFO] [stdout] 315 - curr.row == Row::Bottom && old1.row == Row::Top)) || [INFO] [stdout] 314 + (curr.row == Row::Bottom || curr.row == Row::Home) && old1.row == Row::Top) || [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:316:6 [INFO] [stdout] | [INFO] [stdout] 316 | / (curr.finger == Finger::Pinky && old1.finger == Finger::Ring && [INFO] [stdout] 317 | | (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 | | curr.row == Row::Top && old1.row == Row::Bottom)) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 316 - (curr.finger == Finger::Pinky && old1.finger == Finger::Ring && [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 316 + !(curr.finger != Finger::Pinky || old1.finger != Finger::Ring || curr.row != Row::Top || old1.row != Row::Home && old1.row != Row::Bottom) { [INFO] [stdout] | [INFO] [stdout] 316 - (curr.finger == Finger::Pinky && old1.finger == Finger::Ring && [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 316 + (old1.row == Row::Bottom || old1.row == Row::Home) && curr.row == Row::Top && old1.finger == Finger::Ring && curr.finger == Finger::Pinky { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/penalty.rs:317:7 [INFO] [stdout] | [INFO] [stdout] 317 | / (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 | | curr.row == Row::Top && old1.row == Row::Bottom)) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 317 + !(curr.row != Row::Top || old1.row != Row::Home && old1.row != Row::Bottom)) { [INFO] [stdout] | [INFO] [stdout] 317 - (curr.row == Row::Top && old1.row == Row::Home || [INFO] [stdout] 318 - curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 317 + (old1.row == Row::Bottom || old1.row == Row::Home) && curr.row == Row::Top) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/penalty.rs:222:1 [INFO] [stdout] | [INFO] [stdout] 222 | / fn penalize<'a, 'b>( [INFO] [stdout] 223 | | string: &'a str, [INFO] [stdout] 224 | | count: usize, [INFO] [stdout] 225 | | curr: & KeyPress, [INFO] [stdout] ... | [INFO] [stdout] 230 | | detailed: bool) [INFO] [stdout] 231 | | -> f64 [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/penalty.rs:229:10 [INFO] [stdout] | [INFO] [stdout] 229 | result: &'b mut 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] 229 - result: &'b mut Vec>, [INFO] [stdout] 229 + result: &'b mut [KeyPenaltyResult<'a>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/penalty.rs:281:3 [INFO] [stdout] | [INFO] [stdout] 281 | / if curr.hand == old1.hand && curr.finger == old1.finger { [INFO] [stdout] 282 | | if curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 283 | | curr.row == Row::Bottom && old1.row == Row::Top { [INFO] [stdout] 284 | | let penalty = 10.0 * count; [INFO] [stdout] ... | [INFO] [stdout] 291 | | } [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] 281 ~ if curr.hand == old1.hand && curr.finger == old1.finger [INFO] [stdout] 282 ~ && (curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 283 ~ curr.row == Row::Bottom && old1.row == Row::Top) { [INFO] [stdout] 284 | let penalty = 10.0 * count; [INFO] [stdout] ... [INFO] [stdout] 289 | total += penalty; [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/penalty.rs:294:3 [INFO] [stdout] | [INFO] [stdout] 294 | / if curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 295 | | curr.row == Row::Bottom && old1.row == Row::Top { [INFO] [stdout] 296 | | if curr.finger == Finger::Ring && old1.finger == Finger::Pinky || [INFO] [stdout] 297 | | curr.finger == Finger::Pinky && old1.finger == Finger::Ring || [INFO] [stdout] ... | [INFO] [stdout] 310 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 294 ~ if (curr.row == Row::Top && old1.row == Row::Bottom || [INFO] [stdout] 295 ~ curr.row == Row::Bottom && old1.row == Row::Top) { [INFO] [stdout] 296 ~ && (curr.finger == Finger::Ring && old1.finger == Finger::Pinky || [INFO] [stdout] 297 | curr.finger == Finger::Pinky && old1.finger == Finger::Ring || [INFO] [stdout] ... [INFO] [stdout] 301 | old1.finger == Finger::Ring) && [INFO] [stdout] 302 ~ curr.row == Row::Top && old1.row == Row::Bottom)) { [INFO] [stdout] 303 | let penalty = 5.0 * count; [INFO] [stdout] ... [INFO] [stdout] 308 | total += penalty; [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/penalty.rs:385:2 [INFO] [stdout] | [INFO] [stdout] 385 | / if curr.hand == old2.hand && curr.finger == old2.finger { [INFO] [stdout] 386 | | if curr.row == Row::Top && old2.row == Row::Bottom || [INFO] [stdout] 387 | | curr.row == Row::Bottom && old2.row == Row::Top { [INFO] [stdout] 388 | | let penalty = 3.0 * count; [INFO] [stdout] ... | [INFO] [stdout] 396 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 385 ~ if curr.hand == old2.hand && curr.finger == old2.finger [INFO] [stdout] 386 ~ && (curr.row == Row::Top && old2.row == Row::Bottom || [INFO] [stdout] 387 ~ curr.row == Row::Bottom && old2.row == Row::Top) { [INFO] [stdout] 388 | let penalty = 3.0 * count; [INFO] [stdout] ... [INFO] [stdout] 394 | total += penalty; [INFO] [stdout] 395 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/simulator.rs:41:43 [INFO] [stdout] | [INFO] [stdout] 41 | let penalty = penalty::calculate_penalty(&quartads, len, init_layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:60:44 [INFO] [stdout] | [INFO] [stdout] 60 | let penalty = penalty::calculate_penalty(&quartads, len, &curr_layout, penalties, false); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:89:44 [INFO] [stdout] | [INFO] [stdout] 89 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:90:3 [INFO] [stdout] | [INFO] [stdout] 90 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` 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/simulator.rs:104:43 [INFO] [stdout] | [INFO] [stdout] 104 | let penalty = penalty::calculate_penalty(&quartads, len, init_layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:117:45 [INFO] [stdout] | [INFO] [stdout] 117 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, false); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/simulator.rs:138:8 [INFO] [stdout] | [INFO] [stdout] 138 | let ref layout = entry.layout; [INFO] [stdout] | ----^^^^^^^^^^---------------- help: try: `let layout = &entry.layout;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/simulator.rs:139:45 [INFO] [stdout] | [INFO] [stdout] 139 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, true); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `quartads` [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/simulator.rs:139:61 [INFO] [stdout] | [INFO] [stdout] 139 | let penalty = penalty::calculate_penalty(&quartads, len, &layout, penalties, true); [INFO] [stdout] | ^^^^^^^ help: change this to: `layout` [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: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/simulator.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | print_result(&layout, &penalty); [INFO] [stdout] | ^^^^^^^ help: change this to: `layout` [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: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:154:2 [INFO] [stdout] | [INFO] [stdout] 154 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/simulator.rs:179:3 [INFO] [stdout] | [INFO] [stdout] 179 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `matches.free.get(0)` [INFO] [stdout] --> src/main.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | let corpus_filename = match matches.free.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `matches.free.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: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:125:2 [INFO] [stdout] | [INFO] [stdout] 125 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:130:2 [INFO] [stdout] | [INFO] [stdout] 130 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:135:2 [INFO] [stdout] | [INFO] [stdout] 135 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:140:2 [INFO] [stdout] | [INFO] [stdout] 140 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:145:2 [INFO] [stdout] | [INFO] [stdout] 145 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:150:2 [INFO] [stdout] | [INFO] [stdout] 150 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:155:2 [INFO] [stdout] | [INFO] [stdout] 155 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:160:2 [INFO] [stdout] | [INFO] [stdout] 160 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:165:2 [INFO] [stdout] | [INFO] [stdout] 165 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | Err(f) => { panic!(f.to_string()) } [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: add a "{}" format string to `Display` the message [INFO] [stdout] | [INFO] [stdout] 32 | Err(f) => { panic!("{}", f.to_string()) } [INFO] [stdout] | +++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized] target(s) in 1.46s [INFO] running `Command { std: "docker" "inspect" "4cf9047d03e99fe6c639450fe34778233f548a8fa940f2ea47fd6683c3cbe8f5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4cf9047d03e99fe6c639450fe34778233f548a8fa940f2ea47fd6683c3cbe8f5", kill_on_drop: false }` [INFO] [stdout] 4cf9047d03e99fe6c639450fe34778233f548a8fa940f2ea47fd6683c3cbe8f5