[INFO] cloning repository https://github.com/sukolenvo/aoc-2024-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/sukolenvo/aoc-2024-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsukolenvo%2Faoc-2024-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsukolenvo%2Faoc-2024-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 086ef0b546e68747bd4992807fa017c76ebc38d2 [INFO] linting sukolenvo/aoc-2024-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsukolenvo%2Faoc-2024-rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/sukolenvo/aoc-2024-rust [INFO] finished tweaking git repo https://github.com/sukolenvo/aoc-2024-rust [INFO] tweaked toml for git repo https://github.com/sukolenvo/aoc-2024-rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/sukolenvo/aoc-2024-rust 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/sukolenvo/aoc-2024-rust 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded errno v0.3.10 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.99 [INFO] [stderr] Downloaded wit-bindgen-rt v0.33.0 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.99 [INFO] [stderr] Downloaded unicode-ident v1.0.14 [INFO] [stderr] Downloaded ppv-lite86 v0.2.20 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.99 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.99 [INFO] [stderr] Downloaded rand_chacha v0.9.0-beta.1 [INFO] [stderr] Downloaded zerocopy-derive v0.7.35 [INFO] [stderr] Downloaded wasm-bindgen v0.2.99 [INFO] [stderr] Downloaded js-sys v0.3.76 [INFO] [stderr] Downloaded bumpalo v3.16.0 [INFO] [stderr] Downloaded aho-corasick v1.1.3 [INFO] [stderr] Downloaded rand v0.9.0-beta.1 [INFO] [stderr] Downloaded wasi v0.13.3+wasi-0.2.2 [INFO] [stderr] Downloaded proc-macro2 v1.0.92 [INFO] [stderr] Downloaded zerocopy v0.7.35 [INFO] [stderr] Downloaded zerocopy-derive v0.8.14 [INFO] [stderr] Downloaded bitflags v2.6.0 [INFO] [stderr] Downloaded syn v2.0.93 [INFO] [stderr] Downloaded regex v1.11.1 [INFO] [stderr] Downloaded zerocopy v0.8.14 [INFO] [stderr] Downloaded once_cell v1.20.2 [INFO] [stderr] Downloaded log v0.4.22 [INFO] [stderr] Downloaded getrandom v0.3.0-rc.0 [INFO] [stderr] Downloaded regex-syntax v0.8.5 [INFO] [stderr] Downloaded rand_core v0.9.0-beta.1 [INFO] [stderr] Downloaded quote v1.0.38 [INFO] [stderr] Downloaded rustix v0.38.42 [INFO] [stderr] Downloaded regex-automata v0.4.9 [INFO] [stderr] Downloaded libc v0.2.169 [INFO] [stderr] Downloaded linux-raw-sys v0.4.14 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 7e240e40b88f086a3de2d006ea78ef16ad19ac03152225dfab222634c37a39e4 [INFO] running `Command { std: "docker" "start" "-a" "7e240e40b88f086a3de2d006ea78ef16ad19ac03152225dfab222634c37a39e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7e240e40b88f086a3de2d006ea78ef16ad19ac03152225dfab222634c37a39e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7e240e40b88f086a3de2d006ea78ef16ad19ac03152225dfab222634c37a39e4", kill_on_drop: false }` [INFO] [stdout] 7e240e40b88f086a3de2d006ea78ef16ad19ac03152225dfab222634c37a39e4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 81a21c8ab119d0ef352f6f374a91489241585376f01f92e4f645b850d90c1655 [INFO] running `Command { std: "docker" "start" "-a" "81a21c8ab119d0ef352f6f374a91489241585376f01f92e4f645b850d90c1655", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling unicode-ident v1.0.14 [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling zerocopy v0.8.14 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking getrandom v0.3.0-rc.0 [INFO] [stderr] Compiling syn v2.0.93 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking rand_core v0.9.0-beta.1 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.9.0-beta.1 [INFO] [stderr] Checking rand v0.9.0-beta.1 [INFO] [stderr] Checking aoc-2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | prev + 1 <= current && current <= prev + 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev < current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | prev - 1 >= current && current >= prev - 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev > current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | prev + 1 <= current && current <= prev + 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev < current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | prev - 1 >= current && current >= prev - 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev > current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | if (guard.y == 0) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 40 - if (guard.y == 0) { [INFO] [stdout] 40 + if guard.y == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:43:16 [INFO] [stdout] | [INFO] [stdout] 43 | if (map.data[guard.y - 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 43 - if (map.data[guard.y - 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] 43 + if map.data[guard.y - 1][guard.x] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:53:16 [INFO] [stdout] | [INFO] [stdout] 53 | if (guard.y == map.data.len() - 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 53 - if (guard.y == map.data.len() - 1) { [INFO] [stdout] 53 + if guard.y == map.data.len() - 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if (map.data[guard.y + 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 56 - if (map.data[guard.y + 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] 56 + if map.data[guard.y + 1][guard.x] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:66:16 [INFO] [stdout] | [INFO] [stdout] 66 | if (guard.x == 0) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 66 - if (guard.x == 0) { [INFO] [stdout] 66 + if guard.x == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:69:16 [INFO] [stdout] | [INFO] [stdout] 69 | if (map.data[guard.y][guard.x - 1] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 69 - if (map.data[guard.y][guard.x - 1] == MapState::Obstacle) { [INFO] [stdout] 69 + if map.data[guard.y][guard.x - 1] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 79 | if (guard.x == map.data[0].len() - 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 79 - if (guard.x == map.data[0].len() - 1) { [INFO] [stdout] 79 + if guard.x == map.data[0].len() - 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:82:16 [INFO] [stdout] | [INFO] [stdout] 82 | if (map.data[guard.y][guard.x + 1] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 82 - if (map.data[guard.y][guard.x + 1] == MapState::Obstacle) { [INFO] [stdout] 82 + if map.data[guard.y][guard.x + 1] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:168:20 [INFO] [stdout] | [INFO] [stdout] 168 | if (res == "Loop detected") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 168 - if (res == "Loop detected") { [INFO] [stdout] 168 + if res == "Loop detected" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl09.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | } else if (back_file_idx > file_idx + 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 35 - } else if (back_file_idx > file_idx + 1) { [INFO] [stdout] 35 + } else if back_file_idx > file_idx + 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl10.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | if (process == positions.len()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 40 - if (process == positions.len()) { [INFO] [stdout] 40 + if process == positions.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl10.rs:70:16 [INFO] [stdout] | [INFO] [stdout] 70 | if (process == positions.len()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 70 - if (process == positions.len()) { [INFO] [stdout] 70 + if process == positions.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/lvl14.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::{Read, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl16.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 55 - if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] 55 + if val > paths[&(pos, direction)] + cost { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl16.rs:150:24 [INFO] [stdout] | [INFO] [stdout] 150 | if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 150 - if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] 150 + if val > paths[&(pos, direction)] + cost { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl17.rs:210:16 [INFO] [stdout] | [INFO] [stdout] 210 | if (val as i32 != instructions[output_idx]) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 210 - if (val as i32 != instructions[output_idx]) { [INFO] [stdout] 210 + if val as i32 != instructions[output_idx] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:89:60 [INFO] [stdout] | [INFO] [stdout] 89 | ... && !positions.contains_key((&(r - 1, c))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r - 1, c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:89:60 [INFO] [stdout] | [INFO] [stdout] 89 | ... && !positions.contains_key((&(r - 1, c))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 89 - && !positions.contains_key((&(r - 1, c))) [INFO] [stdout] 89 + && !positions.contains_key(&(r - 1, c) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:98:60 [INFO] [stdout] | [INFO] [stdout] 98 | ... && !positions.contains_key((&(r, c - 1))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r, c - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:98:60 [INFO] [stdout] | [INFO] [stdout] 98 | ... && !positions.contains_key((&(r, c - 1))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 98 - && !positions.contains_key((&(r, c - 1))) [INFO] [stdout] 98 + && !positions.contains_key(&(r, c - 1) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:107:60 [INFO] [stdout] | [INFO] [stdout] 107 | ... && !positions.contains_key((&(r + 1, c))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r + 1, c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:107:60 [INFO] [stdout] | [INFO] [stdout] 107 | ... && !positions.contains_key((&(r + 1, c))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 107 - && !positions.contains_key((&(r + 1, c))) [INFO] [stdout] 107 + && !positions.contains_key(&(r + 1, c) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | ... && !positions.contains_key((&(r, c + 1))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r, c + 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | ... && !positions.contains_key((&(r, c + 1))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 116 - && !positions.contains_key((&(r, c + 1))) [INFO] [stdout] 116 + && !positions.contains_key(&(r, c + 1) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path::Component::ParentDir` [INFO] [stdout] --> src/lvl23.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::path::Component::ParentDir; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/lvl24.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `rand::thread_rng`: renamed to `rng` [INFO] [stdout] --> src/lvl24.rs:206:29 [INFO] [stdout] | [INFO] [stdout] 206 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | prev + 1 <= current && current <= prev + 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev < current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | prev - 1 >= current && current >= prev - 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev > current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | prev + 1 <= current && current <= prev + 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev < current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/lvl02.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | prev - 1 >= current && current >= prev - 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change it to: `prev > current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | if (guard.y == 0) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 40 - if (guard.y == 0) { [INFO] [stdout] 40 + if guard.y == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:43:16 [INFO] [stdout] | [INFO] [stdout] 43 | if (map.data[guard.y - 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 43 - if (map.data[guard.y - 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] 43 + if map.data[guard.y - 1][guard.x] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:53:16 [INFO] [stdout] | [INFO] [stdout] 53 | if (guard.y == map.data.len() - 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 53 - if (guard.y == map.data.len() - 1) { [INFO] [stdout] 53 + if guard.y == map.data.len() - 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if (map.data[guard.y + 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 56 - if (map.data[guard.y + 1][guard.x] == MapState::Obstacle) { [INFO] [stdout] 56 + if map.data[guard.y + 1][guard.x] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:66:16 [INFO] [stdout] | [INFO] [stdout] 66 | if (guard.x == 0) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 66 - if (guard.x == 0) { [INFO] [stdout] 66 + if guard.x == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:69:16 [INFO] [stdout] | [INFO] [stdout] 69 | if (map.data[guard.y][guard.x - 1] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 69 - if (map.data[guard.y][guard.x - 1] == MapState::Obstacle) { [INFO] [stdout] 69 + if map.data[guard.y][guard.x - 1] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:79:16 [INFO] [stdout] | [INFO] [stdout] 79 | if (guard.x == map.data[0].len() - 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 79 - if (guard.x == map.data[0].len() - 1) { [INFO] [stdout] 79 + if guard.x == map.data[0].len() - 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:82:16 [INFO] [stdout] | [INFO] [stdout] 82 | if (map.data[guard.y][guard.x + 1] == MapState::Obstacle) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 82 - if (map.data[guard.y][guard.x + 1] == MapState::Obstacle) { [INFO] [stdout] 82 + if map.data[guard.y][guard.x + 1] == MapState::Obstacle { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl06.rs:168:20 [INFO] [stdout] | [INFO] [stdout] 168 | if (res == "Loop detected") { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 168 - if (res == "Loop detected") { [INFO] [stdout] 168 + if res == "Loop detected" { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl09.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | } else if (back_file_idx > file_idx + 1) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 35 - } else if (back_file_idx > file_idx + 1) { [INFO] [stdout] 35 + } else if back_file_idx > file_idx + 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl10.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | if (process == positions.len()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 40 - if (process == positions.len()) { [INFO] [stdout] 40 + if process == positions.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl10.rs:70:16 [INFO] [stdout] | [INFO] [stdout] 70 | if (process == positions.len()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 70 - if (process == positions.len()) { [INFO] [stdout] 70 + if process == positions.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/lvl14.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::{Read, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/lvl14.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 71 | / loop { [INFO] [stdout] 72 | | for r in 0..height { [INFO] [stdout] 73 | | for c in 0..width { [INFO] [stdout] 74 | | area[r][c] = 0; [INFO] [stdout] ... | [INFO] [stdout] 112 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 113 | println!("Result: {}", result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl16.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 55 - if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] 55 + if val > paths[&(pos, direction)] + cost { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl16.rs:150:24 [INFO] [stdout] | [INFO] [stdout] 150 | if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 150 - if (val > paths[&(pos, direction)] + cost) { [INFO] [stdout] 150 + if val > paths[&(pos, direction)] + cost { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/lvl17.rs:210:16 [INFO] [stdout] | [INFO] [stdout] 210 | if (val as i32 != instructions[output_idx]) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 210 - if (val as i32 != instructions[output_idx]) { [INFO] [stdout] 210 + if val as i32 != instructions[output_idx] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:89:60 [INFO] [stdout] | [INFO] [stdout] 89 | ... && !positions.contains_key((&(r - 1, c))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r - 1, c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:89:60 [INFO] [stdout] | [INFO] [stdout] 89 | ... && !positions.contains_key((&(r - 1, c))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 89 - && !positions.contains_key((&(r - 1, c))) [INFO] [stdout] 89 + && !positions.contains_key(&(r - 1, c) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:98:60 [INFO] [stdout] | [INFO] [stdout] 98 | ... && !positions.contains_key((&(r, c - 1))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r, c - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:98:60 [INFO] [stdout] | [INFO] [stdout] 98 | ... && !positions.contains_key((&(r, c - 1))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 98 - && !positions.contains_key((&(r, c - 1))) [INFO] [stdout] 98 + && !positions.contains_key(&(r, c - 1) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:107:60 [INFO] [stdout] | [INFO] [stdout] 107 | ... && !positions.contains_key((&(r + 1, c))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r + 1, c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:107:60 [INFO] [stdout] | [INFO] [stdout] 107 | ... && !positions.contains_key((&(r + 1, c))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 107 - && !positions.contains_key((&(r + 1, c))) [INFO] [stdout] 107 + && !positions.contains_key(&(r + 1, c) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/lvl18.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | ... && !positions.contains_key((&(r, c + 1))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove them: `&(r, c + 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/lvl18.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | ... && !positions.contains_key((&(r, c + 1))) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 116 - && !positions.contains_key((&(r, c + 1))) [INFO] [stdout] 116 + && !positions.contains_key(&(r, c + 1) ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path::Component::ParentDir` [INFO] [stdout] --> src/lvl23.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::path::Component::ParentDir; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::hash::Hash` [INFO] [stdout] --> src/lvl24.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::hash::Hash; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `rand::thread_rng`: renamed to `rng` [INFO] [stdout] --> src/lvl24.rs:206:29 [INFO] [stdout] | [INFO] [stdout] 206 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `rand::Rng::gen_range`: Renamed to `random_range` [INFO] [stdout] --> src/lvl24.rs:208:42 [INFO] [stdout] | [INFO] [stdout] 208 | let random_number: u64 = rng.gen_range(0..(1 << size)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `rand::Rng::gen_range`: Renamed to `random_range` [INFO] [stdout] --> src/lvl24.rs:209:43 [INFO] [stdout] | [INFO] [stdout] 209 | let random_number2: u64 = rng.gen_range(0..(1 << size)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `i` is never read [INFO] [stdout] --> src/lvl05.rs:72:29 [INFO] [stdout] | [INFO] [stdout] 72 | ... i = j; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `right` [INFO] [stdout] --> src/lvl05.rs:117:31 [INFO] [stdout] | [INFO] [stdout] 117 | edges.retain(|&(left, right)| left != vertex); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_right` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `right` [INFO] [stdout] --> src/lvl05.rs:114:30 [INFO] [stdout] | [INFO] [stdout] 114 | .filter(|&(left, right)| *left == vertex) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_right` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `left` [INFO] [stdout] --> src/lvl05.rs:105:48 [INFO] [stdout] | [INFO] [stdout] 105 | .filter(|&&vertex| edges.iter().all(|&(left, right)| right != vertex)) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/lvl14.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 71 | / loop { [INFO] [stdout] 72 | | for r in 0..height { [INFO] [stdout] 73 | | for c in 0..width { [INFO] [stdout] 74 | | area[r][c] = 0; [INFO] [stdout] ... | [INFO] [stdout] 112 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 113 | println!("Result: {}", result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl09.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let mut files = input [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl09.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl13.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for mut arcade in arcades.iter_mut() { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl14.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl14.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl14.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | for mut robot in robots.iter_mut() { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/lvl14.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut result = 0; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `diff` is assigned to, but never used [INFO] [stdout] --> src/lvl14.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | let mut diff = 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_diff` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `diff` is never read [INFO] [stdout] --> src/lvl14.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | diff += 1; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl15.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map_rows` [INFO] [stdout] --> src/lvl15.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | let map_rows = map_instructions[0].lines().count(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_map_rows` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map_cols` [INFO] [stdout] --> src/lvl15.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | let map_cols = map_instructions[0].lines().next().unwrap().chars().count() * 2; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_map_cols` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl15.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl16.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl16.rs:105:22 [INFO] [stdout] | [INFO] [stdout] 105 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl17.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/lvl17.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let a = lines[0] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl18.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl18.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl19.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl19.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl21.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lvl21.rs:105:23 [INFO] [stdout] | [INFO] [stdout] 105 | .filter(|(i, c)| *c == 'A') [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lvl21.rs:213:17 [INFO] [stdout] | [INFO] [stdout] 213 | for i in 0..25 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl21.rs:202:22 [INFO] [stdout] | [INFO] [stdout] 202 | let mut result = 0usize; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `rand::Rng::gen_range`: Renamed to `random_range` [INFO] [stdout] --> src/lvl24.rs:208:42 [INFO] [stdout] | [INFO] [stdout] 208 | let random_number: u64 = rng.gen_range(0..(1 << size)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lvl21.rs:240:19 [INFO] [stdout] | [INFO] [stdout] 240 | .filter(|(i, c)| *c == 'A') [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `rand::Rng::gen_range`: Renamed to `random_range` [INFO] [stdout] --> src/lvl24.rs:209:43 [INFO] [stdout] | [INFO] [stdout] 209 | let random_number2: u64 = rng.gen_range(0..(1 << size)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl22.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl22.rs:34:22 [INFO] [stdout] | [INFO] [stdout] 34 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `val` [INFO] [stdout] --> src/lvl23.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | .filter(|(key, val)| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_val` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl23.rs:5:22 [INFO] [stdout] | [INFO] [stdout] 5 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl23.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/lvl23.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut result = 0; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl24.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl24.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_task` is never used [INFO] [stdout] --> src/common.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn read_task(lvl: i32) -> String { [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 `lvl01` is never used [INFO] [stdout] --> src/lvl01.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn lvl01() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl01_second` is never used [INFO] [stdout] --> src/lvl01.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn lvl01_second() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl02` is never used [INFO] [stdout] --> src/lvl02.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn lvl02() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_levels_safe` is never used [INFO] [stdout] --> src/lvl02.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn check_levels_safe(line: String, predicate: fn(i32, i32) -> bool) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl02_second` is never used [INFO] [stdout] --> src/lvl02.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn lvl02_second() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl03` is never used [INFO] [stdout] --> src/lvl03.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn lvl03() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl04` is never used [INFO] [stdout] --> src/lvl04.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn lvl04() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_xmas` is never used [INFO] [stdout] --> src/lvl04.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn count_xmas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl04_second` is never used [INFO] [stdout] --> src/lvl04.rs:90:8 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn lvl04_second() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_x_mas` is never used [INFO] [stdout] --> src/lvl04.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn count_x_mas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl05` is never used [INFO] [stdout] --> src/lvl05.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn lvl05() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_dependencies` is never used [INFO] [stdout] --> src/lvl05.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn parse_dependencies(input: &String) -> HashMap<&str, Vec<&str>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lvl05_second` is never used [INFO] [stdout] --> src/lvl05.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn lvl05_second() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_topological_order` is never used [INFO] [stdout] --> src/lvl05.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn parse_topological_order(input: &String) -> Vec<&str> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_updates` is never used [INFO] [stdout] --> src/lvl05.rs:129:4 [INFO] [stdout] | [INFO] [stdout] 129 | fn parse_updates(input: &String) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl06.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `walk` is never used [INFO] [stdout] --> src/lvl06.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn walk(map: &mut Map, guard: &mut Guard) -> String { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step` is never used [INFO] [stdout] --> src/lvl06.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn step(map: &mut Map, guard: &mut Guard) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MapState` is never used [INFO] [stdout] --> src/lvl06.rs:95:6 [INFO] [stdout] | [INFO] [stdout] 95 | enum MapState { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/lvl06.rs:102:8 [INFO] [stdout] | [INFO] [stdout] 102 | struct Map { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/lvl06.rs:107:6 [INFO] [stdout] | [INFO] [stdout] 107 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Guard` is never constructed [INFO] [stdout] --> src/lvl06.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | struct Guard { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_map` is never used [INFO] [stdout] --> src/lvl06.rs:121:4 [INFO] [stdout] | [INFO] [stdout] 121 | fn parse_map() -> (Map, Guard) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl06.rs:154:4 [INFO] [stdout] | [INFO] [stdout] 154 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl07.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Task` is never constructed [INFO] [stdout] --> src/lvl07.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct Task { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `part1` and `part2` are never used [INFO] [stdout] --> src/lvl07.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Task { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 34 | fn part1(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | fn part2(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `concatenate` is never used [INFO] [stdout] --> src/lvl07.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn concatenate(a: u64, b: u64) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl07.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl08.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/lvl08.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct Map { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lvl08.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 37 | impl Map { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 38 | fn new(input: &String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl08.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl09.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `File` is never constructed [INFO] [stdout] --> src/lvl09.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | struct File { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Gap` is never constructed [INFO] [stdout] --> src/lvl09.rs:60:8 [INFO] [stdout] | [INFO] [stdout] 60 | struct Gap { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `checksum` is never used [INFO] [stdout] --> src/lvl09.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 65 | impl File { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 66 | fn checksum(&self) -> usize { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl09.rs:75:4 [INFO] [stdout] | [INFO] [stdout] 75 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl10.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/lvl10.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Map { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `walk`, and `walk2` are never used [INFO] [stdout] --> src/lvl10.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 21 | impl Map { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] 22 | fn new(input: &String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | fn walk(&self, r: usize, c: usize) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | fn walk2(&self, r: usize, c: usize) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl10.rs:94:4 [INFO] [stdout] | [INFO] [stdout] 94 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl11.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Evo` is never constructed [INFO] [stdout] --> src/lvl11.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct Evo { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `count_stones` is never used [INFO] [stdout] --> src/lvl11.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 19 | impl Evo { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] 20 | [INFO] [stdout] 21 | fn count_stones(&mut self, stone: &Stone, iterations: u32) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Stone` is never constructed [INFO] [stdout] --> src/lvl11.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | struct Stone { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mutate` is never used [INFO] [stdout] --> src/lvl11.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 38 | impl Stone { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 39 | fn mutate(&self) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_digits` is never used [INFO] [stdout] --> src/lvl11.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn count_digits(num: u64) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl11.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl12.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_region` is never used [INFO] [stdout] --> src/lvl12.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn build_region(farm: &Farm, r: usize, c: usize) -> Region { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Farm` is never constructed [INFO] [stdout] --> src/lvl12.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 64 | struct Farm { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lvl12.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 68 | impl Farm { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 69 | fn new(input: &String) -> Farm { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Region` is never constructed [INFO] [stdout] --> src/lvl12.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | struct Region { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `includes_plot`, `get_area`, `get_perimeter`, `get_perimeter_edges`, and `get_sides` are never used [INFO] [stdout] --> src/lvl12.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 80 | impl Region { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 81 | fn includes_plot(&self, plot: (usize, usize)) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | fn get_area(&self) -> usize { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | fn get_perimeter(&self, farm_width: usize, farm_height: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | fn get_perimeter_edges(&self, farm_width: usize, farm_height: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | fn get_sides(&self, farm_width: usize, farm_height: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Fence` is never constructed [INFO] [stdout] --> src/lvl12.rs:151:8 [INFO] [stdout] | [INFO] [stdout] 151 | struct Fence { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_horizontal` and `is_adjacent` are never used [INFO] [stdout] --> src/lvl12.rs:159:8 [INFO] [stdout] | [INFO] [stdout] 158 | impl Fence { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 159 | fn is_horizontal(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | fn is_adjacent(&self, other: &Fence) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl12.rs:175:4 [INFO] [stdout] | [INFO] [stdout] 175 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl13.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Arcade` is never constructed [INFO] [stdout] --> src/lvl13.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | struct Arcade { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `find_ab` are never used [INFO] [stdout] --> src/lvl13.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Arcade { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 37 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn find_ab(&self) -> Result<(u64, u64), ()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl13.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl14.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Robot` is never constructed [INFO] [stdout] --> src/lvl14.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | struct Robot { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lvl14.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 42 | impl Robot { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 43 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl14.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl15.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WideBox` is never constructed [INFO] [stdout] --> src/lvl15.rs:121:8 [INFO] [stdout] | [INFO] [stdout] 121 | struct WideBox { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_occupying` is never used [INFO] [stdout] --> src/lvl15.rs:127:8 [INFO] [stdout] | [INFO] [stdout] 126 | impl WideBox { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 127 | fn is_occupying(&self, row: usize, col: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl15.rs:132:4 [INFO] [stdout] | [INFO] [stdout] 132 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `WALL` is never used [INFO] [stdout] --> src/lvl16.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | static WALL: i32 = -1; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DIRECTION_EAST` is never used [INFO] [stdout] --> src/lvl16.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | static DIRECTION_EAST: (i32, i32) = (0, 1); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DIRECTION_WEST` is never used [INFO] [stdout] --> src/lvl16.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | static DIRECTION_WEST: (i32, i32) = (0, -1); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DIRECTION_NORTH` is never used [INFO] [stdout] --> src/lvl16.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | static DIRECTION_NORTH: (i32, i32) = (-1, 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DIRECTION_SOUTH` is never used [INFO] [stdout] --> src/lvl16.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | static DIRECTION_SOUTH: (i32, i32) = (1, 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl16.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/lvl16.rs:79:8 [INFO] [stdout] | [INFO] [stdout] 79 | struct Map { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lvl16.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 83 | impl Map { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 84 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl16.rs:104:4 [INFO] [stdout] | [INFO] [stdout] 104 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_tiles` is never used [INFO] [stdout] --> src/lvl16.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn find_tiles( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl17.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ADV` is never used [INFO] [stdout] --> src/lvl17.rs:33:7 [INFO] [stdout] | [INFO] [stdout] 33 | const ADV: i32 = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BXL` is never used [INFO] [stdout] --> src/lvl17.rs:34:7 [INFO] [stdout] | [INFO] [stdout] 34 | const BXL: i32 = 1; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BST` is never used [INFO] [stdout] --> src/lvl17.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | const BST: i32 = 2; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `JNZ` is never used [INFO] [stdout] --> src/lvl17.rs:36:7 [INFO] [stdout] | [INFO] [stdout] 36 | const JNZ: i32 = 3; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BXC` is never used [INFO] [stdout] --> src/lvl17.rs:37:7 [INFO] [stdout] | [INFO] [stdout] 37 | const BXC: i32 = 4; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OUT` is never used [INFO] [stdout] --> src/lvl17.rs:38:7 [INFO] [stdout] | [INFO] [stdout] 38 | const OUT: i32 = 5; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BDV` is never used [INFO] [stdout] --> src/lvl17.rs:39:7 [INFO] [stdout] | [INFO] [stdout] 39 | const BDV: i32 = 6; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CDV` is never used [INFO] [stdout] --> src/lvl17.rs:40:7 [INFO] [stdout] | [INFO] [stdout] 40 | const CDV: i32 = 7; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_program` is never used [INFO] [stdout] --> src/lvl17.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn run_program(a: i64, b: i64, c: i64, ip: usize, instructions: &Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_combo_value` is never used [INFO] [stdout] --> src/lvl17.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn get_combo_value(a: i64, b: i64, c: i64, operand: i32) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2_naive` is never used [INFO] [stdout] --> src/lvl17.rs:104:4 [INFO] [stdout] | [INFO] [stdout] 104 | fn part2_naive() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_program_2` is never used [INFO] [stdout] --> src/lvl17.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | fn run_program_2( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl17.rs:251:4 [INFO] [stdout] | [INFO] [stdout] 251 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SIZE` is never used [INFO] [stdout] --> src/lvl18.rs:3:7 [INFO] [stdout] | [INFO] [stdout] 3 | const SIZE: usize = 71; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl18.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl18.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl19.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solver` is never constructed [INFO] [stdout] --> src/lvl19.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct Solver { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `solve` is never used [INFO] [stdout] --> src/lvl19.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 31 | impl Solver { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 32 | fn solve(&mut self, patterns: &Vec<&str>, line: &str, pos: usize) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl19.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solver2` is never constructed [INFO] [stdout] --> src/lvl19.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | struct Solver2 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `solve` is never used [INFO] [stdout] --> src/lvl19.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 81 | impl Solver2 { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 82 | fn solve(&mut self, patterns: &Vec<&str>, line: &str, pos: usize) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl20.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solver` is never constructed [INFO] [stdout] --> src/lvl20.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | struct Solver {} [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `solve` and `solve_simple` are never used [INFO] [stdout] --> src/lvl20.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 65 | impl Solver { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 66 | fn solve( [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | fn solve_simple( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl20.rs:143:4 [INFO] [stdout] | [INFO] [stdout] 143 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_distances_map` is never used [INFO] [stdout] --> src/lvl20.rs:209:4 [INFO] [stdout] | [INFO] [stdout] 209 | fn get_distances_map(tiles: &Vec>, from: (usize, usize)) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solver2` is never constructed [INFO] [stdout] --> src/lvl20.rs:236:8 [INFO] [stdout] | [INFO] [stdout] 236 | struct Solver2 {} [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl21.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NumericKeypad` is never constructed [INFO] [stdout] --> src/lvl21.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | struct NumericKeypad {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `enter_code` and `get_pos` are never used [INFO] [stdout] --> src/lvl21.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 37 | impl NumericKeypad { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] 38 | fn enter_code(&self, code: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | fn get_pos(&self, c: char) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DirectionalKeypad` is never constructed [INFO] [stdout] --> src/lvl21.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | struct DirectionalKeypad { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `enter_code`, `enter_code_chunk`, and `get_pos` are never used [INFO] [stdout] --> src/lvl21.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 93 | impl DirectionalKeypad { [INFO] [stdout] | ---------------------- associated items in this implementation [INFO] [stdout] 94 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 100 | fn enter_code(&mut self, code: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | fn enter_code_chunk(&mut self, code: &str, strategy: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 189 | fn get_pos(&self, c: char) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl21.rs:201:4 [INFO] [stdout] | [INFO] [stdout] 201 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_code` is never used [INFO] [stdout] --> src/lvl21.rs:236:4 [INFO] [stdout] | [INFO] [stdout] 236 | fn split_code(str: &String) -> Vec<&str> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl22.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_next` is never used [INFO] [stdout] --> src/lvl22.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn get_next(number: u64) -> u64 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl22.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl23.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl23.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl24.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `insert_value` is never used [INFO] [stdout] --> src/lvl24.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn insert_value<'a>( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `i` is never read [INFO] [stdout] --> src/lvl05.rs:72:29 [INFO] [stdout] | [INFO] [stdout] 72 | ... i = j; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/lvl24.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_2` is never used [INFO] [stdout] --> src/lvl24.rs:174:4 [INFO] [stdout] | [INFO] [stdout] 174 | fn process_2( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_i` is never used [INFO] [stdout] --> src/lvl24.rs:302:4 [INFO] [stdout] | [INFO] [stdout] 302 | fn check_i(i: usize, gates: &HashMap u16)>) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_2` is never used [INFO] [stdout] --> src/lvl24.rs:332:4 [INFO] [stdout] | [INFO] [stdout] 332 | fn solve_2( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/lvl25.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Schematic` is never constructed [INFO] [stdout] --> src/lvl25.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct Schematic { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_lock` and `get_height` are never used [INFO] [stdout] --> src/lvl25.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 55 | impl Schematic { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 56 | fn is_lock(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | fn get_height(&self, i: usize) -> u16 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `right` [INFO] [stdout] --> src/lvl05.rs:117:31 [INFO] [stdout] | [INFO] [stdout] 117 | edges.retain(|&(left, right)| left != vertex); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_right` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `right` [INFO] [stdout] --> src/lvl05.rs:114:30 [INFO] [stdout] | [INFO] [stdout] 114 | .filter(|&(left, right)| *left == vertex) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_right` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `left` [INFO] [stdout] --> src/lvl05.rs:105:48 [INFO] [stdout] | [INFO] [stdout] 105 | .filter(|&&vertex| edges.iter().all(|&(left, right)| right != vertex)) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl04.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn count_xmas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [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] 16 - fn count_xmas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [INFO] [stdout] 16 + fn count_xmas(lines: &[&str], i: usize, j: usize) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl04.rs:103:23 [INFO] [stdout] | [INFO] [stdout] 103 | fn count_x_mas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [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] 103 - fn count_x_mas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [INFO] [stdout] 103 + fn count_x_mas(lines: &[&str], i: usize, j: usize) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl05.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | return true; [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] 20 - return true; [INFO] [stdout] 20 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl05.rs:33:30 [INFO] [stdout] | [INFO] [stdout] 33 | fn parse_dependencies(input: &String) -> HashMap<&str, Vec<&str>> { [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] 33 - fn parse_dependencies(input: &String) -> HashMap<&str, Vec<&str>> { [INFO] [stdout] 33 + fn parse_dependencies(input: &str) -> HashMap<&str, Vec<&str>> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl05.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | return false; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 61 - return false; [INFO] [stdout] 61 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl05.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | return res; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 78 - return res; [INFO] [stdout] 78 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl05.rs:91:35 [INFO] [stdout] | [INFO] [stdout] 91 | fn parse_topological_order(input: &String) -> Vec<&str> { [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] 91 - fn parse_topological_order(input: &String) -> Vec<&str> { [INFO] [stdout] 91 + fn parse_topological_order(input: &str) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/lvl05.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | let vertex = orphan_vertexes.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 109 ~ while let Some(vertex) = orphan_vertexes.pop() { [INFO] [stdout] 110 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl05.rs:129:25 [INFO] [stdout] | [INFO] [stdout] 129 | fn parse_updates(input: &String) -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 129 - fn parse_updates(input: &String) -> Vec> { [INFO] [stdout] 129 + fn parse_updates(input: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl09.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let mut files = input [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl09.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl08.rs:38:19 [INFO] [stdout] | [INFO] [stdout] 38 | fn new(input: &String) -> Self { [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] 38 - fn new(input: &String) -> Self { [INFO] [stdout] 38 + fn new(input: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl10.rs:22:19 [INFO] [stdout] | [INFO] [stdout] 22 | fn new(input: &String) -> Self { [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] 22 - fn new(input: &String) -> Self { [INFO] [stdout] 22 + fn new(input: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl13.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for mut arcade in arcades.iter_mut() { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl10.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / if self.data[nr as usize][nc as usize] == height + 1 { [INFO] [stdout] 55 | | if !positions.contains(&(height + 1, nr as usize, nc as usize)) { [INFO] [stdout] 56 | | positions.push((height + 1, nr as usize, nc as usize)); [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [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] 54 ~ if self.data[nr as usize][nc as usize] == height + 1 [INFO] [stdout] 55 ~ && !positions.contains(&(height + 1, nr as usize, nc as usize)) { [INFO] [stdout] 56 | positions.push((height + 1, nr as usize, nc as usize)); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl14.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl14.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl14.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | for mut robot in robots.iter_mut() { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl11.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | return vec![Stone { val: self.val / 10u64.pow(digit_count / 2) }, Stone { val: self.val % 10u64.pow(digit_count / 2) }]; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return vec![Stone { val: self.val / 10u64.pow(digit_count / 2) }, Stone { val: self.val % 10u64.pow(digit_count / 2) }]; [INFO] [stdout] 44 + vec![Stone { val: self.val / 10u64.pow(digit_count / 2) }, Stone { val: self.val % 10u64.pow(digit_count / 2) }] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl11.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | return vec![Stone { val: self.val * 2024 }]; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return vec![Stone { val: self.val * 2024 }]; [INFO] [stdout] 46 + vec![Stone { val: self.val * 2024 }] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/lvl11.rs:42:19 [INFO] [stdout] | [INFO] [stdout] 42 | } else if count_digits(self.val) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(self.val).is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/lvl14.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut result = 0; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `diff` is assigned to, but never used [INFO] [stdout] --> src/lvl14.rs:88:13 [INFO] [stdout] | [INFO] [stdout] 88 | let mut diff = 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_diff` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `diff` is never read [INFO] [stdout] --> src/lvl14.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | diff += 1; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / if r > 0 && farm.plots[r - 1][c] == plot { [INFO] [stdout] 37 | | if !plots.contains(&(r - 1, c)) { [INFO] [stdout] 38 | | plots.push((r - 1, c)); [INFO] [stdout] 39 | | } [INFO] [stdout] 40 | | } [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] 36 ~ if r > 0 && farm.plots[r - 1][c] == plot [INFO] [stdout] 37 ~ && !plots.contains(&(r - 1, c)) { [INFO] [stdout] 38 | plots.push((r - 1, c)); [INFO] [stdout] 39 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / if c > 0 && farm.plots[r][c - 1] == plot { [INFO] [stdout] 42 | | if !plots.contains(&(r, c - 1)) { [INFO] [stdout] 43 | | plots.push((r, c - 1)); [INFO] [stdout] 44 | | } [INFO] [stdout] 45 | | } [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] 41 ~ if c > 0 && farm.plots[r][c - 1] == plot [INFO] [stdout] 42 ~ && !plots.contains(&(r, c - 1)) { [INFO] [stdout] 43 | plots.push((r, c - 1)); [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / if r < farm.plots.len() - 1 && farm.plots[r + 1][c] == plot { [INFO] [stdout] 47 | | if !plots.contains(&(r + 1, c)) { [INFO] [stdout] 48 | | plots.push((r + 1, c)); [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [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] 46 ~ if r < farm.plots.len() - 1 && farm.plots[r + 1][c] == plot [INFO] [stdout] 47 ~ && !plots.contains(&(r + 1, c)) { [INFO] [stdout] 48 | plots.push((r + 1, c)); [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | / if c < farm.plots[r].len() - 1 && farm.plots[r][c + 1] == plot { [INFO] [stdout] 52 | | if !plots.contains(&(r, c + 1)) { [INFO] [stdout] 53 | | plots.push((r, c + 1)); [INFO] [stdout] 54 | | } [INFO] [stdout] 55 | | } [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] 51 ~ if c < farm.plots[r].len() - 1 && farm.plots[r][c + 1] == plot [INFO] [stdout] 52 ~ && !plots.contains(&(r, c + 1)) { [INFO] [stdout] 53 | plots.push((r, c + 1)); [INFO] [stdout] 54 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl12.rs:69:19 [INFO] [stdout] | [INFO] [stdout] 69 | fn new(input: &String) -> Farm { [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] 69 - fn new(input: &String) -> Farm { [INFO] [stdout] 69 + fn new(input: &str) -> Farm { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl15.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl13.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|x| Arcade::new(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Arcade::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `arcades` [INFO] [stdout] --> src/lvl13.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | for i in 0..arcades.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 10 - for i in 0..arcades.len() { [INFO] [stdout] 10 + for (i, ) in arcades.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lvl13.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / match arcades[i].find_ab() { [INFO] [stdout] 12 | | Ok((a, b)) => { [INFO] [stdout] 13 | | println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 14 | | if a <= 100 && b <= 100 { [INFO] [stdout] ... | [INFO] [stdout] 18 | | Err(_) => (), [INFO] [stdout] 19 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ if let Ok((a, b)) = arcades[i].find_ab() { [INFO] [stdout] 12 + println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 13 + if a <= 100 && b <= 100 { [INFO] [stdout] 14 + result += 3 * a + b; [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl13.rs:82:14 [INFO] [stdout] | [INFO] [stdout] 82 | .map(|x| Arcade::new(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Arcade::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `arcades` [INFO] [stdout] --> src/lvl13.rs:89:14 [INFO] [stdout] | [INFO] [stdout] 89 | for i in 0..arcades.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 89 - for i in 0..arcades.len() { [INFO] [stdout] 89 + for (i, ) in arcades.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lvl13.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | / match arcades[i].find_ab() { [INFO] [stdout] 91 | | Ok((a, b)) => { [INFO] [stdout] 92 | | println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 93 | | result += 3 * a + b; [INFO] [stdout] 94 | | }, [INFO] [stdout] 95 | | Err(_) => (), [INFO] [stdout] 96 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 90 ~ if let Ok((a, b)) = arcades[i].find_ab() { [INFO] [stdout] 91 + println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 92 + result += 3 * a + b; [INFO] [stdout] 93 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl14.rs:8:36 [INFO] [stdout] | [INFO] [stdout] 8 | let robots = input.lines().map(|x| Robot::new(x)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl14.rs:59:40 [INFO] [stdout] | [INFO] [stdout] 59 | let mut robots = input.lines().map(|x| Robot::new(x)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/lvl14.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | row.push(0); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![0;SIZE]` [INFO] [stdout] = help: or `row.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: the loop variable `r` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:72:18 [INFO] [stdout] | [INFO] [stdout] 72 | for r in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 72 - for r in 0..height { [INFO] [stdout] 72 + for in area.iter_mut().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:73:22 [INFO] [stdout] | [INFO] [stdout] 73 | for c in 0..width { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 73 - for c in 0..width { [INFO] [stdout] 73 + for in area.iter_mut().take(width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for r in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 90 - for r in 0..height { [INFO] [stdout] 90 + for in area.iter().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:98:22 [INFO] [stdout] | [INFO] [stdout] 98 | for r in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 98 - for r in 0..height { [INFO] [stdout] 98 + for in area.iter().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:99:26 [INFO] [stdout] | [INFO] [stdout] 99 | for c in 0..width { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 99 - for c in 0..width { [INFO] [stdout] 99 + for in area.iter().take(width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map_rows` [INFO] [stdout] --> src/lvl15.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | let map_rows = map_instructions[0].lines().count(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_map_rows` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map_cols` [INFO] [stdout] --> src/lvl15.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | let map_cols = map_instructions[0].lines().next().unwrap().chars().count() * 2; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_map_cols` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl15.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lvl15.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | self.row == row && self.col == col || self.row == row && self.col + 1 == col [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] 128 - self.row == row && self.col == col || self.row == row && self.col + 1 == col [INFO] [stdout] 128 + !(self.row != row || self.col != col && self.col + 1 != col) [INFO] [stdout] | [INFO] [stdout] 128 - self.row == row && self.col == col || self.row == row && self.col + 1 == col [INFO] [stdout] 128 + (self.col + 1 == col || self.col == col) && self.row == row [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl16.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl16.rs:105:22 [INFO] [stdout] | [INFO] [stdout] 105 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl17.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/lvl16.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | result = vec![ [INFO] [stdout] | ______________^ [INFO] [stdout] 67 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 68 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 69 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] ... | [INFO] [stdout] 74 | | .unwrap() [INFO] [stdout] 75 | | .clone(); [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 66 ~ result = *vec![ [INFO] [stdout] 67 + paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 68 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 69 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 70 + paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 71 + ] [INFO] [stdout] 72 + .iter() [INFO] [stdout] 73 + .min() [INFO] [stdout] 74 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/lvl17.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let a = lines[0] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/lvl16.rs:161:20 [INFO] [stdout] | [INFO] [stdout] 161 | let min_cost = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 162 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 163 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 164 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] ... | [INFO] [stdout] 169 | | .unwrap() [INFO] [stdout] 170 | | .clone(); [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 161 ~ let min_cost = *vec![ [INFO] [stdout] 162 + paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 163 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 164 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 165 + paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 166 + ] [INFO] [stdout] 167 + .iter() [INFO] [stdout] 168 + .min() [INFO] [stdout] 169 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lvl16.rs:178:24 [INFO] [stdout] | [INFO] [stdout] 178 | .filter(|&x| paths[&x] == min_cost) [INFO] [stdout] | ^^ help: change this to: `x` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl16.rs:186:12 [INFO] [stdout] | [INFO] [stdout] 186 | paths: &HashMap<((usize, usize), (i32, i32)), i32>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/lvl16.rs:195:19 [INFO] [stdout] | [INFO] [stdout] 195 | result.insert(pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl18.rs:6:22 [INFO] [stdout] | [INFO] [stdout] 6 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl18.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl19.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | b = b ^ 5; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b ^= 5` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | b = b ^ 6; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b ^= 6` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:265:13 [INFO] [stdout] | [INFO] [stdout] 265 | b = b ^ c; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b ^= c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:266:13 [INFO] [stdout] | [INFO] [stdout] 266 | b = b % 8; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b %= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | a = a / 8; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `a /= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl19.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is used to index `obstacles` [INFO] [stdout] --> src/lvl18.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | for r in 0..SIZE { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 67 - for r in 0..SIZE { [INFO] [stdout] 67 + for (r, ) in obstacles.iter().enumerate().take(SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `obstacles` [INFO] [stdout] --> src/lvl18.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for c in 0..SIZE { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 68 - for c in 0..SIZE { [INFO] [stdout] 68 + for (c, ) in obstacles.iter().enumerate().take(SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `coordinates` [INFO] [stdout] --> src/lvl18.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | for i in 1024..coordinates.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 74 - for i in 1024..coordinates.len() { [INFO] [stdout] 74 + for (i, ) in coordinates.iter().enumerate().skip(1024) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lvl18.rs:86:28 [INFO] [stdout] | [INFO] [stdout] 86 | if val.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!val.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/lvl19.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | return valid; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - return valid; [INFO] [stdout] 21 + valid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl19.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | return false; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 - return false; [INFO] [stdout] 49 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl19.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | / if line[pos..].starts_with(pattern) { [INFO] [stdout] 42 | | if self.solve(patterns, line, pos + pattern.len()) { [INFO] [stdout] 43 | | self.cache.insert(key, true); [INFO] [stdout] 44 | | return true; [INFO] [stdout] 45 | | } [INFO] [stdout] 46 | | } [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] 41 ~ if line[pos..].starts_with(pattern) [INFO] [stdout] 42 ~ && self.solve(patterns, line, pos + pattern.len()) { [INFO] [stdout] 43 | self.cache.insert(key, true); [INFO] [stdout] 44 | return true; [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl19.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | return valid; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 71 - return valid; [INFO] [stdout] 71 + valid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `tiles` [INFO] [stdout] --> src/lvl20.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | for c in 0..line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 11 - for c in 0..line.len() { [INFO] [stdout] 11 + for (c, ) in tiles.iter_mut().enumerate().take(line.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl20.rs:68:16 [INFO] [stdout] | [INFO] [stdout] 68 | tiles: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - tiles: &Vec>, [INFO] [stdout] 68 + tiles: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl21.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lvl21.rs:105:23 [INFO] [stdout] | [INFO] [stdout] 105 | .filter(|(i, c)| *c == 'A') [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl20.rs:110:16 [INFO] [stdout] | [INFO] [stdout] 110 | tiles: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 110 - tiles: &Vec>, [INFO] [stdout] 110 + tiles: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `tiles` [INFO] [stdout] --> src/lvl20.rs:151:18 [INFO] [stdout] | [INFO] [stdout] 151 | for c in 0..line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 151 - for c in 0..line.len() { [INFO] [stdout] 151 + for (c, ) in tiles.iter_mut().enumerate().take(line.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lvl21.rs:213:17 [INFO] [stdout] | [INFO] [stdout] 213 | for i in 0..25 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl21.rs:202:22 [INFO] [stdout] | [INFO] [stdout] 202 | let mut result = 0usize; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/lvl21.rs:240:19 [INFO] [stdout] | [INFO] [stdout] 240 | .filter(|(i, c)| *c == 'A') [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl20.rs:209:29 [INFO] [stdout] | [INFO] [stdout] 209 | fn get_distances_map(tiles: &Vec>, from: (usize, usize)) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 209 - fn get_distances_map(tiles: &Vec>, from: (usize, usize)) -> Vec> { [INFO] [stdout] 209 + fn get_distances_map(tiles: &[Vec], from: (usize, usize)) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl22.rs:4:22 [INFO] [stdout] | [INFO] [stdout] 4 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl22.rs:34:22 [INFO] [stdout] | [INFO] [stdout] 34 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | return line[0..3].parse::().unwrap() * code8.len(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - return line[0..3].parse::().unwrap() * code8.len(); [INFO] [stdout] 21 + line[0..3].parse::().unwrap() * code8.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `val` [INFO] [stdout] --> src/lvl23.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | .filter(|(key, val)| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_val` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/lvl23.rs:5:22 [INFO] [stdout] | [INFO] [stdout] 5 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl23.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:230:13 [INFO] [stdout] | [INFO] [stdout] 230 | return line[0..3].parse::().unwrap() * code_mul; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 230 - return line[0..3].parse::().unwrap() * code_mul; [INFO] [stdout] 230 + line[0..3].parse::().unwrap() * code_mul [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> src/lvl23.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let mut result = 0; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | return code.len() * count; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 227 - return code.len() * count; [INFO] [stdout] 227 + code.len() * count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / return idx [INFO] [stdout] 244 | | .iter() [INFO] [stdout] 245 | | .enumerate() [INFO] [stdout] 246 | | .map(|(i, pos)| { [INFO] [stdout] ... | [INFO] [stdout] 250 | | }) [INFO] [stdout] 251 | | .collect(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 243 ~ idx [INFO] [stdout] 244 + .iter() [INFO] [stdout] 245 + .enumerate() [INFO] [stdout] 246 + .map(|(i, pos)| { [INFO] [stdout] 247 + let start = if i == 0 { 0 } else { idx[i - 1] + 1 }; [INFO] [stdout] 248 + let end = *pos; [INFO] [stdout] 249 + &str[start..=end] [INFO] [stdout] 250 + }) [INFO] [stdout] 251 ~ .collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl21.rs:236:20 [INFO] [stdout] | [INFO] [stdout] 236 | fn split_code(str: &String) -> Vec<&str> { [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] 236 - fn split_code(str: &String) -> Vec<&str> { [INFO] [stdout] 236 + fn split_code(str: &str) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl24.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/lvl22.rs:58:14 [INFO] [stdout] | [INFO] [stdout] 58 | result = bananas.values().max().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*bananas.values().max().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl23.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 17 | return key.starts_with("t"); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 - return key.starts_with("t"); [INFO] [stdout] 17 + key.starts_with("t") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lvl24.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let mut result = 0; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | let mut operations: HashMap<&str, (&str, &str, fn(u16, u16) -> u16)> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:66:17 [INFO] [stdout] | [INFO] [stdout] 66 | operations: &HashMap<&str, (&str, &str, fn(u16, u16) -> u16)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let mut operations: HashMap u16)> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:177:17 [INFO] [stdout] | [INFO] [stdout] 177 | operations: &mut HashMap u16)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lvl24.rs:207:21 [INFO] [stdout] | [INFO] [stdout] 207 | for j in 0..2usize.pow(size as u32) as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `2usize.pow(size as u32)` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lvl24.rs:245:26 [INFO] [stdout] | [INFO] [stdout] 245 | let val = check_i(i, &operations); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `operations` [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/lvl24.rs:279:32 [INFO] [stdout] | [INFO] [stdout] 279 | if !check_i(i, &operations) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `operations` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:302:29 [INFO] [stdout] | [INFO] [stdout] 302 | fn check_i(i: usize, gates: &HashMap u16)>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_topological_order` is never used [INFO] [stdout] --> src/lvl05.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn parse_topological_order(input: &String) -> Vec<&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: method `is_horizontal` is never used [INFO] [stdout] --> src/lvl12.rs:159:8 [INFO] [stdout] | [INFO] [stdout] 158 | impl Fence { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 159 | fn is_horizontal(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2_naive` is never used [INFO] [stdout] --> src/lvl17.rs:104:4 [INFO] [stdout] | [INFO] [stdout] 104 | fn part2_naive() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_program_2` is never used [INFO] [stdout] --> src/lvl17.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | fn run_program_2( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solver2` is never constructed [INFO] [stdout] --> src/lvl20.rs:236:8 [INFO] [stdout] | [INFO] [stdout] 236 | struct Solver2 {} [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lvl24.rs:320:41 [INFO] [stdout] | [INFO] [stdout] 320 | if j < i && val != Some(&0) { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 321 | | return false; [INFO] [stdout] 322 | | } else if j == i && val != Some(&test.2) { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lvl24.rs:322:54 [INFO] [stdout] | [INFO] [stdout] 322 | } else if j == i && val != Some(&test.2) { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 323 | | return false; [INFO] [stdout] 324 | | } else if j == i + 1 && val != Some(&test.3) { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lvl24.rs:322:54 [INFO] [stdout] | [INFO] [stdout] 322 | } else if j == i && val != Some(&test.2) { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 323 | | return false; [INFO] [stdout] 324 | | } else if j == i + 1 && val != Some(&test.3) { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lvl24.rs:324:58 [INFO] [stdout] | [INFO] [stdout] 324 | } else if j == i + 1 && val != Some(&test.3) { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 325 | | return false; [INFO] [stdout] 326 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | gates: &HashMap u16)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl14.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | let mut quadrants = vec![0, 0, 0, 0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `[0, 0, 0, 0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:41:49 [INFO] [stdout] | [INFO] [stdout] 41 | for (next_pos, next_direction, cost) in vec![ [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 42 | | ( [INFO] [stdout] 43 | | ( [INFO] [stdout] 44 | | (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] ... | [INFO] [stdout] 51 | | (pos, counter_clockwise, 1000), [INFO] [stdout] 52 | | ] { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 41 ~ for (next_pos, next_direction, cost) in [( [INFO] [stdout] 42 + ( [INFO] [stdout] 43 + (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] 44 + (pos.1 as i32 + direction.1) as usize, [INFO] [stdout] 45 + ), [INFO] [stdout] 46 + direction, [INFO] [stdout] 47 + 1, [INFO] [stdout] 48 + ), [INFO] [stdout] 49 + (pos, clockwise, 1000), [INFO] [stdout] 50 ~ (pos, counter_clockwise, 1000)] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | result = vec![ [INFO] [stdout] | ______________^ [INFO] [stdout] 67 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 68 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 69 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 70 | | paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 71 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 66 ~ result = [paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 67 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 68 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 69 + paths[&(end, DIRECTION_SOUTH)]] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:136:49 [INFO] [stdout] | [INFO] [stdout] 136 | for (next_pos, next_direction, cost) in vec![ [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 137 | | ( [INFO] [stdout] 138 | | ( [INFO] [stdout] 139 | | (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] ... | [INFO] [stdout] 146 | | (pos, counter_clockwise, 1000), [INFO] [stdout] 147 | | ] { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 136 ~ for (next_pos, next_direction, cost) in [( [INFO] [stdout] 137 + ( [INFO] [stdout] 138 + (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] 139 + (pos.1 as i32 + direction.1) as usize, [INFO] [stdout] 140 + ), [INFO] [stdout] 141 + direction, [INFO] [stdout] 142 + 1, [INFO] [stdout] 143 + ), [INFO] [stdout] 144 + (pos, clockwise, 1000), [INFO] [stdout] 145 ~ (pos, counter_clockwise, 1000)] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:161:20 [INFO] [stdout] | [INFO] [stdout] 161 | let min_cost = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 162 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 163 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 164 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 165 | | paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 166 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 161 ~ let min_cost = [paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 162 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 163 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 164 + paths[&(end, DIRECTION_SOUTH)]] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | result = vec![ [INFO] [stdout] | ______________^ [INFO] [stdout] 172 | | (end, DIRECTION_EAST), [INFO] [stdout] 173 | | (end, DIRECTION_WEST), [INFO] [stdout] 174 | | (end, DIRECTION_NORTH), [INFO] [stdout] 175 | | (end, DIRECTION_SOUTH), [INFO] [stdout] 176 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 171 ~ result = [(end, DIRECTION_EAST), [INFO] [stdout] 172 + (end, DIRECTION_WEST), [INFO] [stdout] 173 + (end, DIRECTION_NORTH), [INFO] [stdout] 174 + (end, DIRECTION_SOUTH)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl24.rs:190:20 [INFO] [stdout] | [INFO] [stdout] 190 | for val in vec![0, 1] { [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl04.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn count_xmas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [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] 16 - fn count_xmas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [INFO] [stdout] 16 + fn count_xmas(lines: &[&str], i: usize, j: usize) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl04.rs:103:23 [INFO] [stdout] | [INFO] [stdout] 103 | fn count_x_mas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [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] 103 - fn count_x_mas(lines: &Vec<&str>, i: usize, j: usize) -> i32 { [INFO] [stdout] 103 + fn count_x_mas(lines: &[&str], i: usize, j: usize) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl05.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | return true; [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] 20 - return true; [INFO] [stdout] 20 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl05.rs:33:30 [INFO] [stdout] | [INFO] [stdout] 33 | fn parse_dependencies(input: &String) -> HashMap<&str, Vec<&str>> { [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] 33 - fn parse_dependencies(input: &String) -> HashMap<&str, Vec<&str>> { [INFO] [stdout] 33 + fn parse_dependencies(input: &str) -> HashMap<&str, Vec<&str>> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl05.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | return false; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 61 - return false; [INFO] [stdout] 61 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl05.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | return res; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 78 - return res; [INFO] [stdout] 78 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl05.rs:91:35 [INFO] [stdout] | [INFO] [stdout] 91 | fn parse_topological_order(input: &String) -> Vec<&str> { [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] 91 - fn parse_topological_order(input: &String) -> Vec<&str> { [INFO] [stdout] 91 + fn parse_topological_order(input: &str) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/lvl05.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | let vertex = orphan_vertexes.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 109 ~ while let Some(vertex) = orphan_vertexes.pop() { [INFO] [stdout] 110 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl05.rs:129:25 [INFO] [stdout] | [INFO] [stdout] 129 | fn parse_updates(input: &String) -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 129 - fn parse_updates(input: &String) -> Vec> { [INFO] [stdout] 129 + fn parse_updates(input: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl08.rs:38:19 [INFO] [stdout] | [INFO] [stdout] 38 | fn new(input: &String) -> Self { [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] 38 - fn new(input: &String) -> Self { [INFO] [stdout] 38 + fn new(input: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl10.rs:22:19 [INFO] [stdout] | [INFO] [stdout] 22 | fn new(input: &String) -> Self { [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] 22 - fn new(input: &String) -> Self { [INFO] [stdout] 22 + fn new(input: &str) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl10.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / if self.data[nr as usize][nc as usize] == height + 1 { [INFO] [stdout] 55 | | if !positions.contains(&(height + 1, nr as usize, nc as usize)) { [INFO] [stdout] 56 | | positions.push((height + 1, nr as usize, nc as usize)); [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [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] 54 ~ if self.data[nr as usize][nc as usize] == height + 1 [INFO] [stdout] 55 ~ && !positions.contains(&(height + 1, nr as usize, nc as usize)) { [INFO] [stdout] 56 | positions.push((height + 1, nr as usize, nc as usize)); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl11.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | return vec![Stone { val: self.val / 10u64.pow(digit_count / 2) }, Stone { val: self.val % 10u64.pow(digit_count / 2) }]; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 44 - return vec![Stone { val: self.val / 10u64.pow(digit_count / 2) }, Stone { val: self.val % 10u64.pow(digit_count / 2) }]; [INFO] [stdout] 44 + vec![Stone { val: self.val / 10u64.pow(digit_count / 2) }, Stone { val: self.val % 10u64.pow(digit_count / 2) }] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl11.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | return vec![Stone { val: self.val * 2024 }]; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return vec![Stone { val: self.val * 2024 }]; [INFO] [stdout] 46 + vec![Stone { val: self.val * 2024 }] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/lvl11.rs:42:19 [INFO] [stdout] | [INFO] [stdout] 42 | } else if count_digits(self.val) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(self.val).is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / if r > 0 && farm.plots[r - 1][c] == plot { [INFO] [stdout] 37 | | if !plots.contains(&(r - 1, c)) { [INFO] [stdout] 38 | | plots.push((r - 1, c)); [INFO] [stdout] 39 | | } [INFO] [stdout] 40 | | } [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] 36 ~ if r > 0 && farm.plots[r - 1][c] == plot [INFO] [stdout] 37 ~ && !plots.contains(&(r - 1, c)) { [INFO] [stdout] 38 | plots.push((r - 1, c)); [INFO] [stdout] 39 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / if c > 0 && farm.plots[r][c - 1] == plot { [INFO] [stdout] 42 | | if !plots.contains(&(r, c - 1)) { [INFO] [stdout] 43 | | plots.push((r, c - 1)); [INFO] [stdout] 44 | | } [INFO] [stdout] 45 | | } [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] 41 ~ if c > 0 && farm.plots[r][c - 1] == plot [INFO] [stdout] 42 ~ && !plots.contains(&(r, c - 1)) { [INFO] [stdout] 43 | plots.push((r, c - 1)); [INFO] [stdout] 44 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / if r < farm.plots.len() - 1 && farm.plots[r + 1][c] == plot { [INFO] [stdout] 47 | | if !plots.contains(&(r + 1, c)) { [INFO] [stdout] 48 | | plots.push((r + 1, c)); [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [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] 46 ~ if r < farm.plots.len() - 1 && farm.plots[r + 1][c] == plot [INFO] [stdout] 47 ~ && !plots.contains(&(r + 1, c)) { [INFO] [stdout] 48 | plots.push((r + 1, c)); [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl12.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | / if c < farm.plots[r].len() - 1 && farm.plots[r][c + 1] == plot { [INFO] [stdout] 52 | | if !plots.contains(&(r, c + 1)) { [INFO] [stdout] 53 | | plots.push((r, c + 1)); [INFO] [stdout] 54 | | } [INFO] [stdout] 55 | | } [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] 51 ~ if c < farm.plots[r].len() - 1 && farm.plots[r][c + 1] == plot [INFO] [stdout] 52 ~ && !plots.contains(&(r, c + 1)) { [INFO] [stdout] 53 | plots.push((r, c + 1)); [INFO] [stdout] 54 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl12.rs:69:19 [INFO] [stdout] | [INFO] [stdout] 69 | fn new(input: &String) -> Farm { [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] 69 - fn new(input: &String) -> Farm { [INFO] [stdout] 69 + fn new(input: &str) -> Farm { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl13.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|x| Arcade::new(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Arcade::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `arcades` [INFO] [stdout] --> src/lvl13.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | for i in 0..arcades.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 10 - for i in 0..arcades.len() { [INFO] [stdout] 10 + for (i, ) in arcades.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lvl13.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / match arcades[i].find_ab() { [INFO] [stdout] 12 | | Ok((a, b)) => { [INFO] [stdout] 13 | | println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 14 | | if a <= 100 && b <= 100 { [INFO] [stdout] ... | [INFO] [stdout] 18 | | Err(_) => (), [INFO] [stdout] 19 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ if let Ok((a, b)) = arcades[i].find_ab() { [INFO] [stdout] 12 + println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 13 + if a <= 100 && b <= 100 { [INFO] [stdout] 14 + result += 3 * a + b; [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl13.rs:82:14 [INFO] [stdout] | [INFO] [stdout] 82 | .map(|x| Arcade::new(x)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Arcade::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `arcades` [INFO] [stdout] --> src/lvl13.rs:89:14 [INFO] [stdout] | [INFO] [stdout] 89 | for i in 0..arcades.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 89 - for i in 0..arcades.len() { [INFO] [stdout] 89 + for (i, ) in arcades.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lvl13.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | / match arcades[i].find_ab() { [INFO] [stdout] 91 | | Ok((a, b)) => { [INFO] [stdout] 92 | | println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 93 | | result += 3 * a + b; [INFO] [stdout] 94 | | }, [INFO] [stdout] 95 | | Err(_) => (), [INFO] [stdout] 96 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 90 ~ if let Ok((a, b)) = arcades[i].find_ab() { [INFO] [stdout] 91 + println!("{:?}: a: {}, b: {}", i, a, b); [INFO] [stdout] 92 + result += 3 * a + b; [INFO] [stdout] 93 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl14.rs:8:36 [INFO] [stdout] | [INFO] [stdout] 8 | let robots = input.lines().map(|x| Robot::new(x)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lvl14.rs:59:40 [INFO] [stdout] | [INFO] [stdout] 59 | let mut robots = input.lines().map(|x| Robot::new(x)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/lvl14.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | row.push(0); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec![0;SIZE]` [INFO] [stdout] = help: or `row.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: the loop variable `r` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:72:18 [INFO] [stdout] | [INFO] [stdout] 72 | for r in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 72 - for r in 0..height { [INFO] [stdout] 72 + for in area.iter_mut().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:73:22 [INFO] [stdout] | [INFO] [stdout] 73 | for c in 0..width { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 73 - for c in 0..width { [INFO] [stdout] 73 + for in area.iter_mut().take(width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:90:18 [INFO] [stdout] | [INFO] [stdout] 90 | for r in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 90 - for r in 0..height { [INFO] [stdout] 90 + for in area.iter().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:98:22 [INFO] [stdout] | [INFO] [stdout] 98 | for r in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 98 - for r in 0..height { [INFO] [stdout] 98 + for in area.iter().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `area` [INFO] [stdout] --> src/lvl14.rs:99:26 [INFO] [stdout] | [INFO] [stdout] 99 | for c in 0..width { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 99 - for c in 0..width { [INFO] [stdout] 99 + for in area.iter().take(width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lvl15.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | self.row == row && self.col == col || self.row == row && self.col + 1 == col [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] 128 - self.row == row && self.col == col || self.row == row && self.col + 1 == col [INFO] [stdout] 128 + !(self.row != row || self.col != col && self.col + 1 != col) [INFO] [stdout] | [INFO] [stdout] 128 - self.row == row && self.col == col || self.row == row && self.col + 1 == col [INFO] [stdout] 128 + (self.col + 1 == col || self.col == col) && self.row == row [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/lvl16.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | result = vec![ [INFO] [stdout] | ______________^ [INFO] [stdout] 67 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 68 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 69 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] ... | [INFO] [stdout] 74 | | .unwrap() [INFO] [stdout] 75 | | .clone(); [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 66 ~ result = *vec![ [INFO] [stdout] 67 + paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 68 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 69 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 70 + paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 71 + ] [INFO] [stdout] 72 + .iter() [INFO] [stdout] 73 + .min() [INFO] [stdout] 74 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/lvl16.rs:161:20 [INFO] [stdout] | [INFO] [stdout] 161 | let min_cost = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 162 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 163 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 164 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] ... | [INFO] [stdout] 169 | | .unwrap() [INFO] [stdout] 170 | | .clone(); [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 161 ~ let min_cost = *vec![ [INFO] [stdout] 162 + paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 163 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 164 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 165 + paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 166 + ] [INFO] [stdout] 167 + .iter() [INFO] [stdout] 168 + .min() [INFO] [stdout] 169 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lvl16.rs:178:24 [INFO] [stdout] | [INFO] [stdout] 178 | .filter(|&x| paths[&x] == min_cost) [INFO] [stdout] | ^^ help: change this to: `x` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl16.rs:186:12 [INFO] [stdout] | [INFO] [stdout] 186 | paths: &HashMap<((usize, usize), (i32, i32)), i32>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/lvl16.rs:195:19 [INFO] [stdout] | [INFO] [stdout] 195 | result.insert(pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | b = b ^ 5; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b ^= 5` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | b = b ^ 6; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b ^= 6` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:265:13 [INFO] [stdout] | [INFO] [stdout] 265 | b = b ^ c; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b ^= c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:266:13 [INFO] [stdout] | [INFO] [stdout] 266 | b = b % 8; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `b %= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lvl17.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | a = a / 8; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `a /= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is used to index `obstacles` [INFO] [stdout] --> src/lvl18.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | for r in 0..SIZE { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 67 - for r in 0..SIZE { [INFO] [stdout] 67 + for (r, ) in obstacles.iter().enumerate().take(SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `obstacles` [INFO] [stdout] --> src/lvl18.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for c in 0..SIZE { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 68 - for c in 0..SIZE { [INFO] [stdout] 68 + for (c, ) in obstacles.iter().enumerate().take(SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `coordinates` [INFO] [stdout] --> src/lvl18.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | for i in 1024..coordinates.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 74 - for i in 1024..coordinates.len() { [INFO] [stdout] 74 + for (i, ) in coordinates.iter().enumerate().skip(1024) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lvl18.rs:86:28 [INFO] [stdout] | [INFO] [stdout] 86 | if val.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!val.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/lvl19.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | return valid; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - return valid; [INFO] [stdout] 21 + valid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl19.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | return false; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 - return false; [INFO] [stdout] 49 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lvl19.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | / if line[pos..].starts_with(pattern) { [INFO] [stdout] 42 | | if self.solve(patterns, line, pos + pattern.len()) { [INFO] [stdout] 43 | | self.cache.insert(key, true); [INFO] [stdout] 44 | | return true; [INFO] [stdout] 45 | | } [INFO] [stdout] 46 | | } [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] 41 ~ if line[pos..].starts_with(pattern) [INFO] [stdout] 42 ~ && self.solve(patterns, line, pos + pattern.len()) { [INFO] [stdout] 43 | self.cache.insert(key, true); [INFO] [stdout] 44 | return true; [INFO] [stdout] 45 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl19.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | return valid; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 71 - return valid; [INFO] [stdout] 71 + valid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `tiles` [INFO] [stdout] --> src/lvl20.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | for c in 0..line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 11 - for c in 0..line.len() { [INFO] [stdout] 11 + for (c, ) in tiles.iter_mut().enumerate().take(line.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl20.rs:68:16 [INFO] [stdout] | [INFO] [stdout] 68 | tiles: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - tiles: &Vec>, [INFO] [stdout] 68 + tiles: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl20.rs:110:16 [INFO] [stdout] | [INFO] [stdout] 110 | tiles: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 110 - tiles: &Vec>, [INFO] [stdout] 110 + tiles: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `tiles` [INFO] [stdout] --> src/lvl20.rs:151:18 [INFO] [stdout] | [INFO] [stdout] 151 | for c in 0..line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 151 - for c in 0..line.len() { [INFO] [stdout] 151 + for (c, ) in tiles.iter_mut().enumerate().take(line.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lvl20.rs:209:29 [INFO] [stdout] | [INFO] [stdout] 209 | fn get_distances_map(tiles: &Vec>, from: (usize, usize)) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 209 - fn get_distances_map(tiles: &Vec>, from: (usize, usize)) -> Vec> { [INFO] [stdout] 209 + fn get_distances_map(tiles: &[Vec], from: (usize, usize)) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | return line[0..3].parse::().unwrap() * code8.len(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - return line[0..3].parse::().unwrap() * code8.len(); [INFO] [stdout] 21 + line[0..3].parse::().unwrap() * code8.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:230:13 [INFO] [stdout] | [INFO] [stdout] 230 | return line[0..3].parse::().unwrap() * code_mul; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 230 - return line[0..3].parse::().unwrap() * code_mul; [INFO] [stdout] 230 + line[0..3].parse::().unwrap() * code_mul [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | return code.len() * count; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 227 - return code.len() * count; [INFO] [stdout] 227 + code.len() * count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl21.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / return idx [INFO] [stdout] 244 | | .iter() [INFO] [stdout] 245 | | .enumerate() [INFO] [stdout] 246 | | .map(|(i, pos)| { [INFO] [stdout] ... | [INFO] [stdout] 250 | | }) [INFO] [stdout] 251 | | .collect(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 243 ~ idx [INFO] [stdout] 244 + .iter() [INFO] [stdout] 245 + .enumerate() [INFO] [stdout] 246 + .map(|(i, pos)| { [INFO] [stdout] 247 + let start = if i == 0 { 0 } else { idx[i - 1] + 1 }; [INFO] [stdout] 248 + let end = *pos; [INFO] [stdout] 249 + &str[start..=end] [INFO] [stdout] 250 + }) [INFO] [stdout] 251 ~ .collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/lvl21.rs:236:20 [INFO] [stdout] | [INFO] [stdout] 236 | fn split_code(str: &String) -> Vec<&str> { [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] 236 - fn split_code(str: &String) -> Vec<&str> { [INFO] [stdout] 236 + fn split_code(str: &str) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/lvl22.rs:58:14 [INFO] [stdout] | [INFO] [stdout] 58 | result = bananas.values().max().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*bananas.values().max().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lvl23.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 17 | return key.starts_with("t"); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 - return key.starts_with("t"); [INFO] [stdout] 17 + key.starts_with("t") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | let mut operations: HashMap<&str, (&str, &str, fn(u16, u16) -> u16)> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:66:17 [INFO] [stdout] | [INFO] [stdout] 66 | operations: &HashMap<&str, (&str, &str, fn(u16, u16) -> u16)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let mut operations: HashMap u16)> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:177:17 [INFO] [stdout] | [INFO] [stdout] 177 | operations: &mut HashMap u16)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lvl24.rs:207:21 [INFO] [stdout] | [INFO] [stdout] 207 | for j in 0..2usize.pow(size as u32) as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `2usize.pow(size as u32)` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lvl24.rs:245:26 [INFO] [stdout] | [INFO] [stdout] 245 | let val = check_i(i, &operations); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `operations` [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/lvl24.rs:279:32 [INFO] [stdout] | [INFO] [stdout] 279 | if !check_i(i, &operations) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `operations` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:302:29 [INFO] [stdout] | [INFO] [stdout] 302 | fn check_i(i: usize, gates: &HashMap u16)>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lvl24.rs:320:41 [INFO] [stdout] | [INFO] [stdout] 320 | if j < i && val != Some(&0) { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 321 | | return false; [INFO] [stdout] 322 | | } else if j == i && val != Some(&test.2) { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lvl24.rs:322:54 [INFO] [stdout] | [INFO] [stdout] 322 | } else if j == i && val != Some(&test.2) { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 323 | | return false; [INFO] [stdout] 324 | | } else if j == i + 1 && val != Some(&test.3) { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/lvl24.rs:322:54 [INFO] [stdout] | [INFO] [stdout] 322 | } else if j == i && val != Some(&test.2) { [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 323 | | return false; [INFO] [stdout] 324 | | } else if j == i + 1 && val != Some(&test.3) { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/lvl24.rs:324:58 [INFO] [stdout] | [INFO] [stdout] 324 | } else if j == i + 1 && val != Some(&test.3) { [INFO] [stdout] | __________________________________________________________^ [INFO] [stdout] 325 | | return false; [INFO] [stdout] 326 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lvl24.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | gates: &HashMap u16)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl14.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | let mut quadrants = vec![0, 0, 0, 0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `[0, 0, 0, 0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:41:49 [INFO] [stdout] | [INFO] [stdout] 41 | for (next_pos, next_direction, cost) in vec![ [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 42 | | ( [INFO] [stdout] 43 | | ( [INFO] [stdout] 44 | | (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] ... | [INFO] [stdout] 51 | | (pos, counter_clockwise, 1000), [INFO] [stdout] 52 | | ] { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 41 ~ for (next_pos, next_direction, cost) in [( [INFO] [stdout] 42 + ( [INFO] [stdout] 43 + (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] 44 + (pos.1 as i32 + direction.1) as usize, [INFO] [stdout] 45 + ), [INFO] [stdout] 46 + direction, [INFO] [stdout] 47 + 1, [INFO] [stdout] 48 + ), [INFO] [stdout] 49 + (pos, clockwise, 1000), [INFO] [stdout] 50 ~ (pos, counter_clockwise, 1000)] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | result = vec![ [INFO] [stdout] | ______________^ [INFO] [stdout] 67 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 68 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 69 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 70 | | paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 71 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 66 ~ result = [paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 67 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 68 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 69 + paths[&(end, DIRECTION_SOUTH)]] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:136:49 [INFO] [stdout] | [INFO] [stdout] 136 | for (next_pos, next_direction, cost) in vec![ [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 137 | | ( [INFO] [stdout] 138 | | ( [INFO] [stdout] 139 | | (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] ... | [INFO] [stdout] 146 | | (pos, counter_clockwise, 1000), [INFO] [stdout] 147 | | ] { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 136 ~ for (next_pos, next_direction, cost) in [( [INFO] [stdout] 137 + ( [INFO] [stdout] 138 + (pos.0 as i32 + direction.0) as usize, [INFO] [stdout] 139 + (pos.1 as i32 + direction.1) as usize, [INFO] [stdout] 140 + ), [INFO] [stdout] 141 + direction, [INFO] [stdout] 142 + 1, [INFO] [stdout] 143 + ), [INFO] [stdout] 144 + (pos, clockwise, 1000), [INFO] [stdout] 145 ~ (pos, counter_clockwise, 1000)] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:161:20 [INFO] [stdout] | [INFO] [stdout] 161 | let min_cost = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 162 | | paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 163 | | paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 164 | | paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 165 | | paths[&(end, DIRECTION_SOUTH)], [INFO] [stdout] 166 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 161 ~ let min_cost = [paths[&(end, DIRECTION_EAST)], [INFO] [stdout] 162 + paths[&(end, DIRECTION_WEST)], [INFO] [stdout] 163 + paths[&(end, DIRECTION_NORTH)], [INFO] [stdout] 164 + paths[&(end, DIRECTION_SOUTH)]] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl16.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | result = vec![ [INFO] [stdout] | ______________^ [INFO] [stdout] 172 | | (end, DIRECTION_EAST), [INFO] [stdout] 173 | | (end, DIRECTION_WEST), [INFO] [stdout] 174 | | (end, DIRECTION_NORTH), [INFO] [stdout] 175 | | (end, DIRECTION_SOUTH), [INFO] [stdout] 176 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 171 ~ result = [(end, DIRECTION_EAST), [INFO] [stdout] 172 + (end, DIRECTION_WEST), [INFO] [stdout] 173 + (end, DIRECTION_NORTH), [INFO] [stdout] 174 + (end, DIRECTION_SOUTH)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lvl24.rs:190:20 [INFO] [stdout] | [INFO] [stdout] 190 | for val in vec![0, 1] { [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.63s [INFO] running `Command { std: "docker" "inspect" "81a21c8ab119d0ef352f6f374a91489241585376f01f92e4f645b850d90c1655", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "81a21c8ab119d0ef352f6f374a91489241585376f01f92e4f645b850d90c1655", kill_on_drop: false }` [INFO] [stdout] 81a21c8ab119d0ef352f6f374a91489241585376f01f92e4f645b850d90c1655