[INFO] cloning repository https://github.com/shua/ascii-box-editor [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/shua/ascii-box-editor" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fshua%2Fascii-box-editor", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fshua%2Fascii-box-editor'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9b68ffa90e5ce0f5f426e107bb43cbe3f1979f3b [INFO] linting shua/ascii-box-editor against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fshua%2Fascii-box-editor" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/shua/ascii-box-editor [INFO] finished tweaking git repo https://github.com/shua/ascii-box-editor [INFO] tweaked toml for git repo https://github.com/shua/ascii-box-editor written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/shua/ascii-box-editor 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/shua/ascii-box-editor 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: the cargo feature `edition2021` has been stabilized in the 1.56 release and is no longer necessary to be listed in the manifest [INFO] [stderr] See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature. [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded instant v0.1.10 [INFO] [stderr] Downloaded signal-hook v0.1.17 [INFO] [stderr] Downloaded crossterm_winapi v0.7.0 [INFO] [stderr] Downloaded crossterm v0.19.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 279b3feba1e7a23ac09e7780f1438fc817636e505e0a6d83bf6b4df8c09b45f4 [INFO] running `Command { std: "docker" "start" "-a" "279b3feba1e7a23ac09e7780f1438fc817636e505e0a6d83bf6b4df8c09b45f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "279b3feba1e7a23ac09e7780f1438fc817636e505e0a6d83bf6b4df8c09b45f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "279b3feba1e7a23ac09e7780f1438fc817636e505e0a6d83bf6b4df8c09b45f4", kill_on_drop: false }` [INFO] [stdout] 279b3feba1e7a23ac09e7780f1438fc817636e505e0a6d83bf6b4df8c09b45f4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d5b40e11593a2c8f28cb168ecb5570a2dc692291b4419f6527ef2def17ee517c [INFO] running `Command { std: "docker" "start" "-a" "d5b40e11593a2c8f28cb168ecb5570a2dc692291b4419f6527ef2def17ee517c", kill_on_drop: false }` [INFO] [stderr] warning: the cargo feature `edition2021` has been stabilized in the 1.56 release and is no longer necessary to be listed in the manifest [INFO] [stderr] See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field for more information about using this feature. [INFO] [stderr] Compiling libc v0.2.98 [INFO] [stderr] Checking instant v0.1.10 [INFO] [stderr] Checking lock_api v0.4.4 [INFO] [stderr] Checking mio v0.7.13 [INFO] [stderr] Checking parking_lot_core v0.8.3 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking parking_lot v0.11.1 [INFO] [stderr] Checking signal-hook v0.1.17 [INFO] [stderr] Checking crossterm v0.19.0 [INFO] [stderr] Checking graphedit v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/parse.rs:230:4 [INFO] [stdout] | [INFO] [stdout] 230 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [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: redundant field names in struct initialization [INFO] [stdout] --> src/parse.rs:231:4 [INFO] [stdout] | [INFO] [stdout] 231 | p: p, [INFO] [stdout] | ^^^^ help: replace it with: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/parse.rs:232:4 [INFO] [stdout] | [INFO] [stdout] 232 | d: d, [INFO] [stdout] | ^^^^ help: replace it with: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/main.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | event::{self, read, Event, KeyCode, KeyEvent, KeyModifiers}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude::*` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/parse.rs:230:4 [INFO] [stdout] | [INFO] [stdout] 230 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [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: redundant field names in struct initialization [INFO] [stdout] --> src/parse.rs:231:4 [INFO] [stdout] | [INFO] [stdout] 231 | p: p, [INFO] [stdout] | ^^^^ help: replace it with: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/parse.rs:232:4 [INFO] [stdout] | [INFO] [stdout] 232 | d: d, [INFO] [stdout] | ^^^^ help: replace it with: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/main.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | event::{self, read, Event, KeyCode, KeyEvent, KeyModifiers}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/parse.rs:276:25 [INFO] [stdout] | [INFO] [stdout] 276 | if let Some((pnext, c)) = scan_dir(self.lines, self.p, self.d) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cursor` [INFO] [stdout] --> src/main.rs:115:17 [INFO] [stdout] | [INFO] [stdout] 115 | let cursor = Point { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_cursor` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/parse.rs:276:25 [INFO] [stdout] | [INFO] [stdout] 276 | if let Some((pnext, c)) = scan_dir(self.lines, self.p, self.d) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_style` is never used [INFO] [stdout] --> src/main.rs:218:4 [INFO] [stdout] | [INFO] [stdout] 218 | fn set_style<'s>(prev: &'s str, next: &'s str) -> &'s str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simp_draw` is never used [INFO] [stdout] --> src/main.rs:226:4 [INFO] [stdout] | [INFO] [stdout] 226 | fn simp_draw(lines: &Lines, es: HashSet>, bs: Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit` is never used [INFO] [stdout] --> src/parse.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 151 | impl Lines { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 167 | fn visit(&self, mut pred: impl FnMut(Point, char)) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/parse.rs:40:2 [INFO] [stdout] | [INFO] [stdout] 40 | / match (c, d) { [INFO] [stdout] 41 | | ('|', Up | Dn) | ('-', Lt | Rt) => true, [INFO] [stdout] 42 | | ('.', Dn | Lt) => true, [INFO] [stdout] 43 | | (',', Dn | Rt) => true, [INFO] [stdout] ... | [INFO] [stdout] 46 | | _ => false, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 40 - match (c, d) { [INFO] [stdout] 41 - ('|', Up | Dn) | ('-', Lt | Rt) => true, [INFO] [stdout] 42 - ('.', Dn | Lt) => true, [INFO] [stdout] 43 - (',', Dn | Rt) => true, [INFO] [stdout] 44 - ('\'', Up | Lt | Rt) => true, [INFO] [stdout] 45 - ('<', Rt) | ('>', Lt) | ('^', Up) | ('v', Dn) => true, [INFO] [stdout] 46 - _ => false, [INFO] [stdout] 47 - } [INFO] [stdout] 40 + matches!((c, d), ('|', Up | Dn) | ('-', Lt | Rt) | ('.', Dn | Lt) | (',', Dn | Rt) | ('\'', Up | Lt | Rt) | ('<', Rt) | ('>', Lt) | ('^', Up) | ('v', Dn)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/parse.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | / (self.0.col..=self.1.col) [INFO] [stdout] 124 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `(self.0.col..=self.1.col)` [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: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/parse.rs:127:3 [INFO] [stdout] | [INFO] [stdout] 127 | (self.0.row..=self.1.row).into_iter().flat_map(col_iter) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(self.0.row..=self.1.row)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:153:6 [INFO] [stdout] | [INFO] [stdout] 153 | if p.row as usize >= self.0.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:156:22 [INFO] [stdout] | [INFO] [stdout] 156 | let line = &self.0[p.row as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:157:6 [INFO] [stdout] | [INFO] [stdout] 157 | if p.col as usize >= line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | Some(line[p.col as usize]) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cursor` [INFO] [stdout] --> src/main.rs:115:17 [INFO] [stdout] | [INFO] [stdout] 115 | let cursor = Point { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_cursor` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_style` is never used [INFO] [stdout] --> src/main.rs:218:4 [INFO] [stdout] | [INFO] [stdout] 218 | fn set_style<'s>(prev: &'s str, next: &'s str) -> &'s str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simp_draw` is never used [INFO] [stdout] --> src/main.rs:226:4 [INFO] [stdout] | [INFO] [stdout] 226 | fn simp_draw(lines: &Lines, es: HashSet>, bs: Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `visit` is never used [INFO] [stdout] --> src/parse.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 151 | impl Lines { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 167 | fn visit(&self, mut pred: impl FnMut(Point, char)) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/parse.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | if let Some(dnext) = Direction::VALUES [INFO] [stdout] | __________________________________^ [INFO] [stdout] 285 | | .into_iter() [INFO] [stdout] 286 | | .filter(|d| !cant_go.contains(d)) [INFO] [stdout] 287 | | .next() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 284 ~ if let Some(dnext) = Direction::VALUES [INFO] [stdout] 285 ~ .into_iter().find(|d| !cant_go.contains(d)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parse.rs:303:29 [INFO] [stdout] | [INFO] [stdout] 303 | let mut it = PathIter::new(&lines, p, d); [INFO] [stdout] | ^^^^^^ help: change this to: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parse.rs:304:2 [INFO] [stdout] | [INFO] [stdout] 304 | while let Some(next) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/parse.rs:40:2 [INFO] [stdout] | [INFO] [stdout] 40 | / match (c, d) { [INFO] [stdout] 41 | | ('|', Up | Dn) | ('-', Lt | Rt) => true, [INFO] [stdout] 42 | | ('.', Dn | Lt) => true, [INFO] [stdout] 43 | | (',', Dn | Rt) => true, [INFO] [stdout] ... | [INFO] [stdout] 46 | | _ => false, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 40 - match (c, d) { [INFO] [stdout] 41 - ('|', Up | Dn) | ('-', Lt | Rt) => true, [INFO] [stdout] 42 - ('.', Dn | Lt) => true, [INFO] [stdout] 43 - (',', Dn | Rt) => true, [INFO] [stdout] 44 - ('\'', Up | Lt | Rt) => true, [INFO] [stdout] 45 - ('<', Rt) | ('>', Lt) | ('^', Up) | ('v', Dn) => true, [INFO] [stdout] 46 - _ => false, [INFO] [stdout] 47 - } [INFO] [stdout] 40 + matches!((c, d), ('|', Up | Dn) | ('-', Lt | Rt) | ('.', Dn | Lt) | (',', Dn | Rt) | ('\'', Up | Lt | Rt) | ('<', Rt) | ('>', Lt) | ('^', Up) | ('v', Dn)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parse.rs:354:5 [INFO] [stdout] | [INFO] [stdout] 354 | if !fst.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `fst.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parse.rs:351:27 [INFO] [stdout] | [INFO] [stdout] 351 | pub fn path_contains(pth: &Vec, p: Point) -> bool { [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] 351 - pub fn path_contains(pth: &Vec, p: Point) -> bool { [INFO] [stdout] 351 + pub fn path_contains(pth: &[Point], p: Point) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parse.rs:361:2 [INFO] [stdout] | [INFO] [stdout] 361 | while let Some(next) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parse.rs:370:36 [INFO] [stdout] | [INFO] [stdout] 370 | pub fn edges(lines: &Lines, boxes: &Vec) -> HashSet> { [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] 370 - pub fn edges(lines: &Lines, boxes: &Vec) -> HashSet> { [INFO] [stdout] 370 + pub fn edges(lines: &Lines, boxes: &[TBox]) -> HashSet> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parse.rs:382:17 [INFO] [stdout] | [INFO] [stdout] 382 | .filter(|pth| pth.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pth.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return None; [INFO] [stdout] 58 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/parse.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | / (self.0.col..=self.1.col) [INFO] [stdout] 124 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `(self.0.col..=self.1.col)` [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: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/parse.rs:127:3 [INFO] [stdout] | [INFO] [stdout] 127 | (self.0.row..=self.1.row).into_iter().flat_map(col_iter) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(self.0.row..=self.1.row)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:153:6 [INFO] [stdout] | [INFO] [stdout] 153 | if p.row as usize >= self.0.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:156:22 [INFO] [stdout] | [INFO] [stdout] 156 | let line = &self.0[p.row as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:157:6 [INFO] [stdout] | [INFO] [stdout] 157 | if p.col as usize >= line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/parse.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | Some(line[p.col as usize]) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `p.col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/main.rs:212:25 [INFO] [stdout] | [INFO] [stdout] 212 | let nextfocus = bs.iter().find(|b1| b1.contains(Point::from((pr as usize + vr, pc as usize + vc)))).map(|b| *b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `bs.iter().find(|b1| b1.contains(Point::from((pr as usize + vr, pc as usize + vc)))).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/parse.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | if let Some(dnext) = Direction::VALUES [INFO] [stdout] | __________________________________^ [INFO] [stdout] 285 | | .into_iter() [INFO] [stdout] 286 | | .filter(|d| !cant_go.contains(d)) [INFO] [stdout] 287 | | .next() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 284 ~ if let Some(dnext) = Direction::VALUES [INFO] [stdout] 285 ~ .into_iter().find(|d| !cant_go.contains(d)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::iter::FlatMap` that must be used [INFO] [stdout] --> src/parse.rs:108:3 [INFO] [stdout] | [INFO] [stdout] 108 | ["hey", "there"].into_iter().flat_map(|s| s.chars()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 108 | let _ = ["hey", "there"].into_iter().flat_map(|s| s.chars()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parse.rs:303:29 [INFO] [stdout] | [INFO] [stdout] 303 | let mut it = PathIter::new(&lines, p, d); [INFO] [stdout] | ^^^^^^ help: change this to: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parse.rs:304:2 [INFO] [stdout] | [INFO] [stdout] 304 | while let Some(next) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parse.rs:354:5 [INFO] [stdout] | [INFO] [stdout] 354 | if !fst.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `fst.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parse.rs:351:27 [INFO] [stdout] | [INFO] [stdout] 351 | pub fn path_contains(pth: &Vec, p: Point) -> bool { [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] 351 - pub fn path_contains(pth: &Vec, p: Point) -> bool { [INFO] [stdout] 351 + pub fn path_contains(pth: &[Point], p: Point) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/parse.rs:361:2 [INFO] [stdout] | [INFO] [stdout] 361 | while let Some(next) = it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/parse.rs:370:36 [INFO] [stdout] | [INFO] [stdout] 370 | pub fn edges(lines: &Lines, boxes: &Vec) -> HashSet> { [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] 370 - pub fn edges(lines: &Lines, boxes: &Vec) -> HashSet> { [INFO] [stdout] 370 + pub fn edges(lines: &Lines, boxes: &[TBox]) -> HashSet> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parse.rs:382:17 [INFO] [stdout] | [INFO] [stdout] 382 | .filter(|pth| pth.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!pth.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/parse.rs:495:3 [INFO] [stdout] | [INFO] [stdout] 495 | assert_eq!(true, lb.contains(lb.0) && lb.contains(lb.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 495 - assert_eq!(true, lb.contains(lb.0) && lb.contains(lb.1)); [INFO] [stdout] 495 + assert!(lb.contains(lb.0) && lb.contains(lb.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/parse.rs:496:3 [INFO] [stdout] | [INFO] [stdout] 496 | assert_eq!(false, lb.contains(Point { row: 5, col: 4 }),); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 496 - assert_eq!(false, lb.contains(Point { row: 5, col: 4 }),); [INFO] [stdout] 496 + assert!(!lb.contains(Point { row: 5, col: 4 }),); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return None; [INFO] [stdout] 58 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/main.rs:212:25 [INFO] [stdout] | [INFO] [stdout] 212 | let nextfocus = bs.iter().find(|b1| b1.contains(Point::from((pr as usize + vr, pc as usize + vc)))).map(|b| *b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `bs.iter().find(|b1| b1.contains(Point::from((pr as usize + vr, pc as usize + vc)))).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::iter::FlatMap` that must be used [INFO] [stdout] --> src/parse.rs:108:3 [INFO] [stdout] | [INFO] [stdout] 108 | ["hey", "there"].into_iter().flat_map(|s| s.chars()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 108 | let _ = ["hey", "there"].into_iter().flat_map(|s| s.chars()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.49s [INFO] running `Command { std: "docker" "inspect" "d5b40e11593a2c8f28cb168ecb5570a2dc692291b4419f6527ef2def17ee517c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d5b40e11593a2c8f28cb168ecb5570a2dc692291b4419f6527ef2def17ee517c", kill_on_drop: false }` [INFO] [stdout] d5b40e11593a2c8f28cb168ecb5570a2dc692291b4419f6527ef2def17ee517c