[INFO] updating cached repository tbelaire/maze_w25 [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/tbelaire/maze_w25 [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/tbelaire/maze_w25" "work/ex/clippy-test-run/sources/stable/gh/tbelaire/maze_w25"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/tbelaire/maze_w25'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/tbelaire/maze_w25" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/tbelaire/maze_w25"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/tbelaire/maze_w25'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 34764ca4a25e3ae49ba0e92c0b22222b996532d5 [INFO] sha for GitHub repo tbelaire/maze_w25: 34764ca4a25e3ae49ba0e92c0b22222b996532d5 [INFO] validating manifest of tbelaire/maze_w25 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of tbelaire/maze_w25 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing tbelaire/maze_w25 [INFO] finished frobbing tbelaire/maze_w25 [INFO] frobbed toml for tbelaire/maze_w25 written to work/ex/clippy-test-run/sources/stable/gh/tbelaire/maze_w25/Cargo.toml [INFO] started frobbing tbelaire/maze_w25 [INFO] finished frobbing tbelaire/maze_w25 [INFO] frobbed toml for tbelaire/maze_w25 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/tbelaire/maze_w25/Cargo.toml [INFO] crate tbelaire/maze_w25 has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting tbelaire/maze_w25 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/tbelaire/maze_w25:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] d78761cf9fa2d9a5e11368e6fc7030cdbdbbba6869374dfb4396786995e5c8e6 [INFO] running `"docker" "start" "-a" "d78761cf9fa2d9a5e11368e6fc7030cdbdbbba6869374dfb4396786995e5c8e6"` [INFO] [stderr] Checking libc v0.2.15 [INFO] [stderr] Checking ansi_term v0.8.0 [INFO] [stderr] Checking text_io v0.1.5 [INFO] [stderr] Checking fern v0.3.5 [INFO] [stderr] Checking rand v0.3.14 [INFO] [stderr] Checking termios v0.2.2 [INFO] [stderr] Checking time v0.1.35 [INFO] [stderr] Checking maze v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:62:21 [INFO] [stderr] | [INFO] [stderr] 62 | row: row, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `row` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:63:21 [INFO] [stderr] | [INFO] [stderr] 63 | col: col, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `col` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:128:13 [INFO] [stderr] | [INFO] [stderr] 128 | map: map, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `map` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:222:13 [INFO] [stderr] | [INFO] [stderr] 222 | map: map, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `map` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:261:17 [INFO] [stderr] | [INFO] [stderr] 261 | row: row, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `row` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:262:17 [INFO] [stderr] | [INFO] [stderr] 262 | col: col, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `col` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/posn.rs:65:13 [INFO] [stderr] | [INFO] [stderr] 65 | pos: pos, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `pos` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/troll.rs:43:13 [INFO] [stderr] | [INFO] [stderr] 43 | dir: dir, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `dir` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:62:21 [INFO] [stderr] | [INFO] [stderr] 62 | row: row, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `row` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:63:21 [INFO] [stderr] | [INFO] [stderr] 63 | col: col, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `col` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:128:13 [INFO] [stderr] | [INFO] [stderr] 128 | map: map, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `map` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:222:13 [INFO] [stderr] | [INFO] [stderr] 222 | map: map, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `map` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:261:17 [INFO] [stderr] | [INFO] [stderr] 261 | row: row, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `row` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/maze.rs:262:17 [INFO] [stderr] | [INFO] [stderr] 262 | col: col, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `col` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/posn.rs:65:13 [INFO] [stderr] | [INFO] [stderr] 65 | pos: pos, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `pos` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/troll.rs:43:13 [INFO] [stderr] | [INFO] [stderr] 43 | dir: dir, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `dir` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/maze.rs:21:23 [INFO] [stderr] | [INFO] [stderr] 21 | const WALL_TILE_REF: &'static Tile = &WALL_TILE; [INFO] [stderr] | -^^^^^^^----- help: consider removing `'static`: `&Tile` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/posn.rs:30:16 [INFO] [stderr] | [INFO] [stderr] 30 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 31 | | if dy >= 0 { North } else { South } [INFO] [stderr] 32 | | } [INFO] [stderr] | |_________^ help: try: `if dy >= 0 { North } else { South }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/maze.rs:21:23 [INFO] [stderr] | [INFO] [stderr] 21 | const WALL_TILE_REF: &'static Tile = &WALL_TILE; [INFO] [stderr] | -^^^^^^^----- help: consider removing `'static`: `&Tile` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/posn.rs:30:16 [INFO] [stderr] | [INFO] [stderr] 30 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 31 | | if dy >= 0 { North } else { South } [INFO] [stderr] 32 | | } [INFO] [stderr] | |_________^ help: try: `if dy >= 0 { North } else { South }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/direction.rs:15:20 [INFO] [stderr] | [INFO] [stderr] 15 | pub fn numeric(&self) -> (i32, i32) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/direction.rs:23:20 [INFO] [stderr] | [INFO] [stderr] 23 | pub fn unicode(&self) -> &'static str { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/direction.rs:32:17 [INFO] [stderr] | [INFO] [stderr] 32 | pub fn flip(&self) -> Direction { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: the variable `row` is used as a loop counter. Consider using `for (row, item) in &self.map.enumerate()` or similar iterators [INFO] [stderr] --> src/maze.rs:58:21 [INFO] [stderr] | [INFO] [stderr] 58 | for line in &self.map { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: the variable `col` is used as a loop counter. Consider using `for (col, item) in line.iter().enumerate()` or similar iterators [INFO] [stderr] --> src/maze.rs:60:22 [INFO] [stderr] | [INFO] [stderr] 60 | for t in line.iter() { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/maze.rs:80:36 [INFO] [stderr] | [INFO] [stderr] 80 | pub fn redraw_tile(&self, pos: &Posn) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `Posn` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/maze.rs:125:17 [INFO] [stderr] | [INFO] [stderr] 125 | assert!(map.len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!map.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/maze.rs:126:17 [INFO] [stderr] | [INFO] [stderr] 126 | assert!(map[0].len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!map[0].is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/maze.rs:136:18 [INFO] [stderr] | [INFO] [stderr] 136 | for _ in 0..2 * height + 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: use: `0..=2 * height` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/maze.rs:140:22 [INFO] [stderr] | [INFO] [stderr] 140 | fn hunt(map: &Vec>, [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/maze.rs:157:31 [INFO] [stderr] | [INFO] [stderr] 157 | fn lookup_center(map: &Vec>, p: Posn) -> Tile { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/maze.rs:233:34 [INFO] [stderr] | [INFO] [stderr] 233 | pub fn in_bounds(&self, pos: &Posn) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `Posn` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/posn.rs:10:19 [INFO] [stderr] | [INFO] [stderr] 10 | pub fn inside(&self, upper_left: Posn, lower_right: Posn) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/tile.rs:16:21 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn coloured(&self) -> ANSIString<'static> { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 34 [INFO] [stderr] --> src/main.rs:68:1 [INFO] [stderr] | [INFO] [stderr] 68 | / fn main() { [INFO] [stderr] 69 | | let logger_config = fern::DispatchConfig { [INFO] [stderr] 70 | | format: Box::new(|msg: &str, level: &log::LogLevel, _location: &log::LogLocation| { [INFO] [stderr] 71 | | // This is a fairly simple format, though it's possible to do more complicated ones. [INFO] [stderr] ... | [INFO] [stderr] 222 | | } [INFO] [stderr] 223 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:115:27 [INFO] [stderr] | [INFO] [stderr] 115 | let mut termios_old = termios.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `termios` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/direction.rs:15:20 [INFO] [stderr] | [INFO] [stderr] 15 | pub fn numeric(&self) -> (i32, i32) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/direction.rs:23:20 [INFO] [stderr] | [INFO] [stderr] 23 | pub fn unicode(&self) -> &'static str { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/direction.rs:32:17 [INFO] [stderr] | [INFO] [stderr] 32 | pub fn flip(&self) -> Direction { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: the variable `row` is used as a loop counter. Consider using `for (row, item) in &self.map.enumerate()` or similar iterators [INFO] [stderr] --> src/maze.rs:58:21 [INFO] [stderr] | [INFO] [stderr] 58 | for line in &self.map { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: the variable `col` is used as a loop counter. Consider using `for (col, item) in line.iter().enumerate()` or similar iterators [INFO] [stderr] --> src/maze.rs:60:22 [INFO] [stderr] | [INFO] [stderr] 60 | for t in line.iter() { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/maze.rs:80:36 [INFO] [stderr] | [INFO] [stderr] 80 | pub fn redraw_tile(&self, pos: &Posn) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `Posn` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/maze.rs:125:17 [INFO] [stderr] | [INFO] [stderr] 125 | assert!(map.len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!map.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/maze.rs:126:17 [INFO] [stderr] | [INFO] [stderr] 126 | assert!(map[0].len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!map[0].is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/maze.rs:136:18 [INFO] [stderr] | [INFO] [stderr] 136 | for _ in 0..2 * height + 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: use: `0..=2 * height` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/maze.rs:140:22 [INFO] [stderr] | [INFO] [stderr] 140 | fn hunt(map: &Vec>, [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/maze.rs:157:31 [INFO] [stderr] | [INFO] [stderr] 157 | fn lookup_center(map: &Vec>, p: Posn) -> Tile { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/maze.rs:233:34 [INFO] [stderr] | [INFO] [stderr] 233 | pub fn in_bounds(&self, pos: &Posn) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `Posn` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/posn.rs:10:19 [INFO] [stderr] | [INFO] [stderr] 10 | pub fn inside(&self, upper_left: Posn, lower_right: Posn) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/tile.rs:16:21 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn coloured(&self) -> ANSIString<'static> { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 34 [INFO] [stderr] --> src/main.rs:68:1 [INFO] [stderr] | [INFO] [stderr] 68 | / fn main() { [INFO] [stderr] 69 | | let logger_config = fern::DispatchConfig { [INFO] [stderr] 70 | | format: Box::new(|msg: &str, level: &log::LogLevel, _location: &log::LogLocation| { [INFO] [stderr] 71 | | // This is a fairly simple format, though it's possible to do more complicated ones. [INFO] [stderr] ... | [INFO] [stderr] 222 | | } [INFO] [stderr] 223 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:115:27 [INFO] [stderr] | [INFO] [stderr] 115 | let mut termios_old = termios.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `termios` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4.27s [INFO] running `"docker" "inspect" "d78761cf9fa2d9a5e11368e6fc7030cdbdbbba6869374dfb4396786995e5c8e6"` [INFO] running `"docker" "rm" "-f" "d78761cf9fa2d9a5e11368e6fc7030cdbdbbba6869374dfb4396786995e5c8e6"` [INFO] [stdout] d78761cf9fa2d9a5e11368e6fc7030cdbdbbba6869374dfb4396786995e5c8e6