[INFO] cloning repository https://github.com/tristan/adventofcode2019 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tristan/adventofcode2019" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftristan%2Fadventofcode2019", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftristan%2Fadventofcode2019'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4993ce288ce92f8f51387b54c3bed416e00b5520 [INFO] linting tristan/adventofcode2019 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftristan%2Fadventofcode2019" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/tristan/adventofcode2019 [INFO] finished tweaking git repo https://github.com/tristan/adventofcode2019 [INFO] tweaked toml for git repo https://github.com/tristan/adventofcode2019 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tristan/adventofcode2019 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/tristan/adventofcode2019 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded autocfg v0.1.7 [INFO] [stderr] Downloaded crossbeam-epoch v0.8.0 [INFO] [stderr] Downloaded crossbeam v0.7.3 [INFO] [stderr] Downloaded crossbeam-queue v0.2.0 [INFO] [stderr] Downloaded memoffset v0.5.3 [INFO] [stderr] Downloaded crossbeam-deque v0.7.2 [INFO] [stderr] Downloaded crossbeam-utils v0.7.0 [INFO] [stderr] Downloaded memchr v2.2.1 [INFO] [stderr] Downloaded aho-corasick v0.7.6 [INFO] [stderr] Downloaded scopeguard v1.0.0 [INFO] [stderr] Downloaded crossbeam-channel v0.4.0 [INFO] [stderr] Downloaded regex-syntax v0.6.12 [INFO] [stderr] Downloaded regex v1.3.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 948e9147ddd6d126077f8be62ff38419db8ed75be1a065ef583d2910c4ad32f3 [INFO] running `Command { std: "docker" "start" "-a" "948e9147ddd6d126077f8be62ff38419db8ed75be1a065ef583d2910c4ad32f3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "948e9147ddd6d126077f8be62ff38419db8ed75be1a065ef583d2910c4ad32f3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "948e9147ddd6d126077f8be62ff38419db8ed75be1a065ef583d2910c4ad32f3", kill_on_drop: false }` [INFO] [stdout] 948e9147ddd6d126077f8be62ff38419db8ed75be1a065ef583d2910c4ad32f3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 8beff1c5883d26e6912c1cddeee792aaa34a5c8fce9066fdf34ccbd498bffdb1 [INFO] running `Command { std: "docker" "start" "-a" "8beff1c5883d26e6912c1cddeee792aaa34a5c8fce9066fdf34ccbd498bffdb1", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v0.1.7 [INFO] [stderr] Compiling memchr v2.2.1 [INFO] [stderr] Checking scopeguard v1.0.0 [INFO] [stderr] Checking either v1.5.3 [INFO] [stderr] Checking regex-syntax v0.6.12 [INFO] [stderr] Checking thread_local v0.3.6 [INFO] [stderr] Compiling memoffset v0.5.3 [INFO] [stderr] Checking itertools v0.8.2 [INFO] [stderr] Compiling crossbeam-utils v0.7.0 [INFO] [stderr] Compiling crossbeam-epoch v0.8.0 [INFO] [stderr] Checking aho-corasick v0.7.6 [INFO] [stderr] Checking crossbeam-queue v0.2.0 [INFO] [stderr] Checking crossbeam-channel v0.4.0 [INFO] [stderr] Checking crossbeam-deque v0.7.2 [INFO] [stderr] Checking crossbeam v0.7.3 [INFO] [stderr] Checking regex v1.3.1 [INFO] [stderr] Checking adventofcode2019 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> intcode.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | fs::read_to_string(&program)?.split(",").map(|x| { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DataStream` [INFO] [stdout] --> intcode.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | / pub fn new() -> DataStream { [INFO] [stdout] 69 | | let (sender, receiver) = channel(); [INFO] [stdout] 70 | | DataStream(sender, receiver) [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 67 + impl Default for DataStream { [INFO] [stdout] 68 + fn default() -> Self { [INFO] [stdout] 69 + Self::new() [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> intcode.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / loop { [INFO] [stdout] 116 | | match self.next() { [INFO] [stdout] 117 | | Some(res) => res?, [INFO] [stdout] 118 | | None => break [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(res) = self.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> intcode.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | while let Some(_) = i.next() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> intcode.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | while let Some(_) = i.next() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:224:31 [INFO] [stdout] | [INFO] [stdout] 224 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 224 ~ let out_pos = match $param { [INFO] [stdout] 225 + Ok(v) => v, [INFO] [stdout] 226 + Err(e) => return Some(Err(e)) [INFO] [stdout] 227 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:229:31 [INFO] [stdout] | [INFO] [stdout] 229 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 229 ~ let out_pos = match $param { [INFO] [stdout] 230 + Ok(v) => v, [INFO] [stdout] 231 + Err(e) => return Some(Err(e)) [INFO] [stdout] 232 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:234:31 [INFO] [stdout] | [INFO] [stdout] 234 | let out_pos = opt_err!(self.get_pos(0)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 234 ~ let out_pos = match $param { [INFO] [stdout] 235 + Ok(v) => v, [INFO] [stdout] 236 + Err(e) => return Some(Err(e)) [INFO] [stdout] 237 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:270:31 [INFO] [stdout] | [INFO] [stdout] 270 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 270 ~ let out_pos = match $param { [INFO] [stdout] 271 + Ok(v) => v, [INFO] [stdout] 272 + Err(e) => return Some(Err(e)) [INFO] [stdout] 273 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:279:31 [INFO] [stdout] | [INFO] [stdout] 279 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 279 ~ let out_pos = match $param { [INFO] [stdout] 280 + Ok(v) => v, [INFO] [stdout] 281 + Err(e) => return Some(Err(e)) [INFO] [stdout] 282 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> intcode2.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | fs::read_to_string(&program)?.split(",").map(|x| { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> intcode2.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / loop { [INFO] [stdout] 72 | | let signal = match self.next() { [INFO] [stdout] 73 | | Some(res) => res?, [INFO] [stdout] 74 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 ~ while let Some(res) = self.next() { [INFO] [stdout] 72 + let signal = res?; [INFO] [stdout] 73 + .. [INFO] [stdout] 74 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:163:31 [INFO] [stdout] | [INFO] [stdout] 163 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 163 ~ let out_pos = match $param { [INFO] [stdout] 164 + Ok(v) => v, [INFO] [stdout] 165 + Err(e) => return Some(Err(e)) [INFO] [stdout] 166 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:168:31 [INFO] [stdout] | [INFO] [stdout] 168 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 168 ~ let out_pos = match $param { [INFO] [stdout] 169 + Ok(v) => v, [INFO] [stdout] 170 + Err(e) => return Some(Err(e)) [INFO] [stdout] 171 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:173:31 [INFO] [stdout] | [INFO] [stdout] 173 | let out_pos = opt_err!(self.get_pos(0)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 173 ~ let out_pos = match $param { [INFO] [stdout] 174 + Ok(v) => v, [INFO] [stdout] 175 + Err(e) => return Some(Err(e)) [INFO] [stdout] 176 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:207:31 [INFO] [stdout] | [INFO] [stdout] 207 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 207 ~ let out_pos = match $param { [INFO] [stdout] 208 + Ok(v) => v, [INFO] [stdout] 209 + Err(e) => return Some(Err(e)) [INFO] [stdout] 210 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:216:31 [INFO] [stdout] | [INFO] [stdout] 216 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 216 ~ let out_pos = match $param { [INFO] [stdout] 217 + Ok(v) => v, [INFO] [stdout] 218 + Err(e) => return Some(Err(e)) [INFO] [stdout] 219 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> intcode.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn try_iter(&self) -> TryIter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 81 | pub fn try_iter(&self) -> TryIter<'_, Signal> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> intcode.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | fs::read_to_string(&program)?.split(",").map(|x| { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DataStream` [INFO] [stdout] --> intcode.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | / pub fn new() -> DataStream { [INFO] [stdout] 69 | | let (sender, receiver) = channel(); [INFO] [stdout] 70 | | DataStream(sender, receiver) [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 67 + impl Default for DataStream { [INFO] [stdout] 68 + fn default() -> Self { [INFO] [stdout] 69 + Self::new() [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> intcode.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / loop { [INFO] [stdout] 116 | | match self.next() { [INFO] [stdout] 117 | | Some(res) => res?, [INFO] [stdout] 118 | | None => break [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(res) = self.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> intcode.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | while let Some(_) = i.next() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> intcode.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | while let Some(_) = i.next() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:224:31 [INFO] [stdout] | [INFO] [stdout] 224 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 224 ~ let out_pos = match $param { [INFO] [stdout] 225 + Ok(v) => v, [INFO] [stdout] 226 + Err(e) => return Some(Err(e)) [INFO] [stdout] 227 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:229:31 [INFO] [stdout] | [INFO] [stdout] 229 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 229 ~ let out_pos = match $param { [INFO] [stdout] 230 + Ok(v) => v, [INFO] [stdout] 231 + Err(e) => return Some(Err(e)) [INFO] [stdout] 232 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:234:31 [INFO] [stdout] | [INFO] [stdout] 234 | let out_pos = opt_err!(self.get_pos(0)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 234 ~ let out_pos = match $param { [INFO] [stdout] 235 + Ok(v) => v, [INFO] [stdout] 236 + Err(e) => return Some(Err(e)) [INFO] [stdout] 237 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:270:31 [INFO] [stdout] | [INFO] [stdout] 270 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 270 ~ let out_pos = match $param { [INFO] [stdout] 271 + Ok(v) => v, [INFO] [stdout] 272 + Err(e) => return Some(Err(e)) [INFO] [stdout] 273 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode.rs:279:31 [INFO] [stdout] | [INFO] [stdout] 279 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 279 ~ let out_pos = match $param { [INFO] [stdout] 280 + Ok(v) => v, [INFO] [stdout] 281 + Err(e) => return Some(Err(e)) [INFO] [stdout] 282 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> intcode2.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | fs::read_to_string(&program)?.split(",").map(|x| { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> intcode2.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / loop { [INFO] [stdout] 72 | | let signal = match self.next() { [INFO] [stdout] 73 | | Some(res) => res?, [INFO] [stdout] 74 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 ~ while let Some(res) = self.next() { [INFO] [stdout] 72 + let signal = res?; [INFO] [stdout] 73 + .. [INFO] [stdout] 74 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:163:31 [INFO] [stdout] | [INFO] [stdout] 163 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 163 ~ let out_pos = match $param { [INFO] [stdout] 164 + Ok(v) => v, [INFO] [stdout] 165 + Err(e) => return Some(Err(e)) [INFO] [stdout] 166 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:168:31 [INFO] [stdout] | [INFO] [stdout] 168 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 168 ~ let out_pos = match $param { [INFO] [stdout] 169 + Ok(v) => v, [INFO] [stdout] 170 + Err(e) => return Some(Err(e)) [INFO] [stdout] 171 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:173:31 [INFO] [stdout] | [INFO] [stdout] 173 | let out_pos = opt_err!(self.get_pos(0)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 173 ~ let out_pos = match $param { [INFO] [stdout] 174 + Ok(v) => v, [INFO] [stdout] 175 + Err(e) => return Some(Err(e)) [INFO] [stdout] 176 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:207:31 [INFO] [stdout] | [INFO] [stdout] 207 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 207 ~ let out_pos = match $param { [INFO] [stdout] 208 + Ok(v) => v, [INFO] [stdout] 209 + Err(e) => return Some(Err(e)) [INFO] [stdout] 210 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> intcode2.rs:216:31 [INFO] [stdout] | [INFO] [stdout] 216 | let out_pos = opt_err!(self.get_pos(2)) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 216 ~ let out_pos = match $param { [INFO] [stdout] 217 + Ok(v) => v, [INFO] [stdout] 218 + Err(e) => return Some(Err(e)) [INFO] [stdout] 219 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> intcode.rs:81:21 [INFO] [stdout] | [INFO] [stdout] 81 | pub fn try_iter(&self) -> TryIter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 81 | pub fn try_iter(&self) -> TryIter<'_, Signal> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_09.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | IntCodeError(intcode::Error), [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 5 - IntCodeError(intcode::Error), [INFO] [stdout] 5 + IntCodeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> day_04.rs:33:28 [INFO] [stdout] | [INFO] [stdout] 33 | .map(|(_, counts)| counts.iter().any(|x| *x == 2)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `counts.contains(&2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_10.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | IoError(io::Error) [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - IoError(io::Error) [INFO] [stdout] 11 + IoError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `position` is never read [INFO] [stdout] --> day_10.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 33 | struct AsteroidDestructionIterator { [INFO] [stdout] | --------------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 36 | position: Point, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AsteroidDestructionIterator` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day_10.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let x = lines.split("\n").nth(0).unwrap().len() as isize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `lines.split("\n").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_10.rs:168:20 [INFO] [stdout] | [INFO] [stdout] 168 | let point = adi.skip(199).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(199)` [INFO] [stdout] | [INFO] [stdout] help: for this change `adi` has to be mutable [INFO] [stdout] --> day_10.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | let adi = AsteroidDestructionIterator::new(&input, dimensions, Point::new(x, y)); [INFO] [stdout] | ^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_10.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | assert_eq!(input[0], false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 190 - assert_eq!(input[0], false); [INFO] [stdout] 190 + assert!(!input[0]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_10.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | assert_eq!(input[1], true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 191 - assert_eq!(input[1], true); [INFO] [stdout] 191 + assert!(input[1]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_10.rs:321:23 [INFO] [stdout] | [INFO] [stdout] 321 | assert_eq!(adi.skip(199).next().unwrap(), Point::new(8, 2)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(199)` [INFO] [stdout] | [INFO] [stdout] help: for this change `adi` has to be mutable [INFO] [stdout] --> day_10.rs:319:13 [INFO] [stdout] | [INFO] [stdout] 319 | let adi = AsteroidDestructionIterator::new(&input, dimensions, pos); [INFO] [stdout] | ^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 10 - IoError(io::Error), [INFO] [stdout] 10 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | InvalidLine(String), [INFO] [stdout] | ----------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - InvalidLine(String), [INFO] [stdout] 11 + InvalidLine(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | InputHasMultipleDirectOrbits(String), [INFO] [stdout] | ---------------------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 12 - InputHasMultipleDirectOrbits(String), [INFO] [stdout] 12 + InputHasMultipleDirectOrbits(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | MissingObject(String) [INFO] [stdout] | ------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 13 - MissingObject(String) [INFO] [stdout] 13 + MissingObject(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_06.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> day_06.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / tree.iter().map(|(_k, n)| { [INFO] [stdout] 96 | | let orbits = n.borrow().count_orbits(); [INFO] [stdout] 97 | | orbits [INFO] [stdout] 98 | | }).sum() [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 95 ~ tree.values().map(|n| { [INFO] [stdout] 96 + let orbits = n.borrow().count_orbits(); [INFO] [stdout] 97 + orbits [INFO] [stdout] 98 ~ }).sum() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_03.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - IoError(io::Error), [INFO] [stdout] 8 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_03.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | ParseIntError(num::ParseIntError), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - ParseIntError(num::ParseIntError), [INFO] [stdout] 9 + ParseIntError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_03.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> day_19.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | x = (x..).filter(|&dx| { [INFO] [stdout] | _____________^ [INFO] [stdout] 17 | | input.send(Signal::Value(dx)).unwrap(); [INFO] [stdout] 18 | | input.send(Signal::Value(y)).unwrap(); [INFO] [stdout] 19 | | comp.run().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 22 | | v == 1 [INFO] [stdout] 23 | | }).next().unwrap(); [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day_03.rs:41:23 [INFO] [stdout] | [INFO] [stdout] 41 | match point.chars().nth(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `point.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:74:26 [INFO] [stdout] | [INFO] [stdout] 74 | for i in start..end { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 74 - for i in start..end { [INFO] [stdout] 74 + for in board.iter_mut().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:84:26 [INFO] [stdout] | [INFO] [stdout] 84 | for i in start..x { [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] 84 - for i in start..x { [INFO] [stdout] 84 + for in board.iter_mut().take(x).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:94:26 [INFO] [stdout] | [INFO] [stdout] 94 | for i in start..end { [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] 94 - for i in start..end { [INFO] [stdout] 94 + for in board.iter_mut().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | for i in start..y { [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] 104 - for i in start..y { [INFO] [stdout] 104 + for in board.iter_mut().take(y).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:126:26 [INFO] [stdout] | [INFO] [stdout] 126 | for i in start..end { [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] 126 - for i in start..end { [INFO] [stdout] 126 + for (i, ) in board.iter().enumerate().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:138:26 [INFO] [stdout] | [INFO] [stdout] 138 | for i in start..x { [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] 138 - for i in start..x { [INFO] [stdout] 138 + for (i, ) in board.iter().enumerate().take(x).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:150:26 [INFO] [stdout] | [INFO] [stdout] 150 | for i in start..end { [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] 150 - for i in start..end { [INFO] [stdout] 150 + for (i, ) in board.iter().enumerate().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:162:26 [INFO] [stdout] | [INFO] [stdout] 162 | for i in start..y { [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] 162 - for i in start..y { [INFO] [stdout] 162 + for (i, ) in board.iter().enumerate().take(y).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> day_19.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | x = (x..).filter(|&dx| { [INFO] [stdout] | _____________^ [INFO] [stdout] 17 | | input.send(Signal::Value(dx)).unwrap(); [INFO] [stdout] 18 | | input.send(Signal::Value(y)).unwrap(); [INFO] [stdout] 19 | | comp.run().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 22 | | v == 1 [INFO] [stdout] 23 | | }).next().unwrap(); [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `screen` is never read [INFO] [stdout] --> day_13.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | screen[(y * 42 + x) as usize] = id; [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> day_13.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | Ok(comp.run()?) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 29 - Ok(comp.run()?) [INFO] [stdout] 29 + comp.run() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - IoError(io::Error), [INFO] [stdout] 7 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 8 | ParseIntError(num::ParseIntError), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - ParseIntError(num::ParseIntError), [INFO] [stdout] 8 + ParseIntError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | InvalidOpcode(usize), [INFO] [stdout] | ------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - InvalidOpcode(usize), [INFO] [stdout] 9 + InvalidOpcode(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | IndexOutOfBounds(usize) [INFO] [stdout] | ---------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 10 - IndexOutOfBounds(usize) [INFO] [stdout] 10 + IndexOutOfBounds(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_02.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - IoError(io::Error), [INFO] [stdout] 9 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | ParseIntError(num::ParseIntError), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 10 - ParseIntError(num::ParseIntError), [INFO] [stdout] 10 + ParseIntError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:11:19 [INFO] [stdout] | [INFO] [stdout] 11 | InvalidOpcode(isize), [INFO] [stdout] | ------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - InvalidOpcode(isize), [INFO] [stdout] 11 + InvalidOpcode(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | BadValueAtPosition(usize), [INFO] [stdout] | ------------------ ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 13 - BadValueAtPosition(usize), [INFO] [stdout] 13 + BadValueAtPosition(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_05.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> day_05.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | fs::read_to_string(&program)?.split(",").map(|x| { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_11.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | IntcodeError(intcode::Error) [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - IntcodeError(intcode::Error) [INFO] [stdout] 9 + IntcodeError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> day_05.rs:63:22 [INFO] [stdout] | [INFO] [stdout] 63 | self.input = input.iter().map(|x| *x).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `input.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> day_05.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / loop { [INFO] [stdout] 69 | | match self.next() { [INFO] [stdout] 70 | | Some(res) => res?, [INFO] [stdout] 71 | | None => break [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(res) = self.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> day_02.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | fn run_program(memory: &mut Vec) -> Result<(), Error> { [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] 37 - fn run_program(memory: &mut Vec) -> Result<(), Error> { [INFO] [stdout] 37 + fn run_program(memory: &mut [usize]) -> Result<(), Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day_02.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 89 - return None; [INFO] [stdout] 89 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_02.rs:73:32 [INFO] [stdout] | [INFO] [stdout] 73 | fn find_inputs_matching(input: &Vec, expected_output: usize) -> Option<(usize, usize)> { [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] 73 ~ fn find_inputs_matching(input: &[usize], expected_output: usize) -> Option<(usize, usize)> { [INFO] [stdout] 74 | //let input = read_input()?; [INFO] [stdout] 75 | for a in 0..100 { [INFO] [stdout] 76 | for b in 0..100 { [INFO] [stdout] 77 ~ let mut input = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_11.rs:59:71 [INFO] [stdout] | [INFO] [stdout] 59 | let mut computer = intcode::IntcodeComputer::new_with_streams(&program, input.clone(), output.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> day_11.rs:60:44 [INFO] [stdout] | [INFO] [stdout] 60 | let thread = thread::spawn(move || Ok(computer.run()?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 60 - let thread = thread::spawn(move || Ok(computer.run()?)); [INFO] [stdout] 60 + let thread = thread::spawn(move || computer.run()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:10 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:27 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (std::isize::MAX, isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:44 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (std::isize::MAX, std::isize::MAX, isize::MIN, std::isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:61 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (std::isize::MAX, std::isize::MAX, std::isize::MIN, isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_11.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_11.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | IntcodeError(intcode::Error) [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - IntcodeError(intcode::Error) [INFO] [stdout] 9 + IntcodeError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_11.rs:59:71 [INFO] [stdout] | [INFO] [stdout] 59 | let mut computer = intcode::IntcodeComputer::new_with_streams(&program, input.clone(), output.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> day_11.rs:60:44 [INFO] [stdout] | [INFO] [stdout] 60 | let thread = thread::spawn(move || Ok(computer.run()?)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 60 - let thread = thread::spawn(move || Ok(computer.run()?)); [INFO] [stdout] 60 + let thread = thread::spawn(move || computer.run()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:10 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:27 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (std::isize::MAX, isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:44 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (std::isize::MAX, std::isize::MAX, isize::MIN, std::isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> day_11.rs:133:61 [INFO] [stdout] | [INFO] [stdout] 133 | (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - (std::isize::MAX, std::isize::MAX, std::isize::MIN, std::isize::MIN), [INFO] [stdout] 133 + (std::isize::MAX, std::isize::MAX, std::isize::MIN, isize::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_11.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> day_23.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | .filter_map(|o| o) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `screen` is never read [INFO] [stdout] --> day_13.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | screen[(y * 42 + x) as usize] = id; [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> day_13.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | Ok(comp.run()?) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 29 - Ok(comp.run()?) [INFO] [stdout] 29 + comp.run() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `p` [INFO] [stdout] --> day_16.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | for j in 1..input.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] 13 - for j in 1..input.len() { [INFO] [stdout] 13 + for (j, ) in p.iter_mut().enumerate().take(input.len()).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `o` is only used to index `input` [INFO] [stdout] --> day_16.rs:16:26 [INFO] [stdout] | [INFO] [stdout] 16 | for o in start..end { [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] 16 - for o in start..end { [INFO] [stdout] 16 + for in input.iter().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_16.rs:78:29 [INFO] [stdout] | [INFO] [stdout] 78 | let p0 = read_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_16.rs:92:39 [INFO] [stdout] | [INFO] [stdout] 92 | let r = run_phases(read_input(&input), 100); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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] --> day_16.rs:95:39 [INFO] [stdout] | [INFO] [stdout] 95 | let r = run_phases(read_input(&input), 100); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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] --> day_16.rs:98:39 [INFO] [stdout] | [INFO] [stdout] 98 | let r = run_phases(read_input(&input), 100); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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] --> day_16.rs:105:45 [INFO] [stdout] | [INFO] [stdout] 105 | assert_eq!(decode_signal(read_input(&input)), "84462026"); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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] --> day_16.rs:107:45 [INFO] [stdout] | [INFO] [stdout] 107 | assert_eq!(decode_signal(read_input(&input)), "78725270"); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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] --> day_16.rs:109:45 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(decode_signal(read_input(&input)), "53553731"); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_21.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_21.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_07.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | IntCodeError(intcode::Error), [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - IntCodeError(intcode::Error), [INFO] [stdout] 8 + IntCodeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_07.rs:33:64 [INFO] [stdout] | [INFO] [stdout] 33 | let mut amp_a = intcode::IntcodeComputer::new_with_streams(&program, stream_a.clone(), stream_b.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_07.rs:34:64 [INFO] [stdout] | [INFO] [stdout] 34 | let mut amp_b = intcode::IntcodeComputer::new_with_streams(&program, stream_b.clone(), stream_c.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:35:64 [INFO] [stdout] | [INFO] [stdout] 35 | let mut amp_c = intcode::IntcodeComputer::new_with_streams(&program, stream_c.clone(), stream_d.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:36:64 [INFO] [stdout] | [INFO] [stdout] 36 | let mut amp_d = intcode::IntcodeComputer::new_with_streams(&program, stream_d.clone(), stream_e.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:37:64 [INFO] [stdout] | [INFO] [stdout] 37 | let mut amp_e = intcode::IntcodeComputer::new_with_streams(&program, stream_e.clone(), stream_f.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> day_22.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | .map(|line| Ok(line?)) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 60 - .map(|line| Ok(line?)) [INFO] [stdout] 60 + .map(|line| line) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_01.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - IoError(io::Error), [INFO] [stdout] 7 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_01.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 8 | ParseIntError(num::ParseIntError) [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - ParseIntError(num::ParseIntError) [INFO] [stdout] 8 + ParseIntError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> day_22.rs:79:11 [INFO] [stdout] | [INFO] [stdout] 79 | steps.into_iter().fold(initial_deck, |mut current_deck, step| { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> day_22.rs:86:47 [INFO] [stdout] | [INFO] [stdout] 86 | current_deck.rotate_right(cut.abs() as _); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `cut.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_07.rs:75:38 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|phases| run_amplifiers(&program, &phases)) [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: field `0` is never read [INFO] [stdout] --> day_07.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | IntCodeError(intcode::Error), [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - IntCodeError(intcode::Error), [INFO] [stdout] 8 + IntCodeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> day_22.rs:116:11 [INFO] [stdout] | [INFO] [stdout] 116 | steps.into_iter().rev().fold((1, 0), |(a, b), step| { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_07.rs:85:38 [INFO] [stdout] | [INFO] [stdout] 85 | .map(|phases| run_amplifiers(&program, &phases)) [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:33:64 [INFO] [stdout] | [INFO] [stdout] 33 | let mut amp_a = intcode::IntcodeComputer::new_with_streams(&program, stream_a.clone(), stream_b.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_07.rs:34:64 [INFO] [stdout] | [INFO] [stdout] 34 | let mut amp_b = intcode::IntcodeComputer::new_with_streams(&program, stream_b.clone(), stream_c.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:35:64 [INFO] [stdout] | [INFO] [stdout] 35 | let mut amp_c = intcode::IntcodeComputer::new_with_streams(&program, stream_c.clone(), stream_d.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:36:64 [INFO] [stdout] | [INFO] [stdout] 36 | let mut amp_d = intcode::IntcodeComputer::new_with_streams(&program, stream_d.clone(), stream_e.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:37:64 [INFO] [stdout] | [INFO] [stdout] 37 | let mut amp_e = intcode::IntcodeComputer::new_with_streams(&program, stream_e.clone(), stream_f.clone()); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:75:38 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|phases| run_amplifiers(&program, &phases)) [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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] --> day_07.rs:85:38 [INFO] [stdout] | [INFO] [stdout] 85 | .map(|phases| run_amplifiers(&program, &phases)) [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_17.rs:131:10 [INFO] [stdout] | [INFO] [stdout] 131 | .map(|(a, b)| vec![a.clone(), b.clone()]) [INFO] [stdout] | __________^ [INFO] [stdout] 132 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(a, b)| vec![a.clone(), b.clone()])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_10.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | IoError(io::Error) [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - IoError(io::Error) [INFO] [stdout] 11 + IoError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `position` is never read [INFO] [stdout] --> day_10.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 33 | struct AsteroidDestructionIterator { [INFO] [stdout] | --------------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 36 | position: Point, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AsteroidDestructionIterator` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:12:38 [INFO] [stdout] | [INFO] [stdout] 12 | if i >= 5 && self & (1 << i - 5) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i - 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:19:38 [INFO] [stdout] | [INFO] [stdout] 19 | if i < 20 && self & (1 << i + 5) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i + 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | if i % 5 != 0 && self & (1 << i - 1) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:33:42 [INFO] [stdout] | [INFO] [stdout] 33 | if i % 5 != 4 && self & (1 << i + 1) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i + 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | 1 & this >> i - 5 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i - 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | 1 & this >> i + 5 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i + 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | 1 & this >> i - 1 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:92:25 [INFO] [stdout] | [INFO] [stdout] 92 | 1 & this >> i + 1 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i + 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` [INFO] [stdout] --> day_25.rs:94:7 [INFO] [stdout] | [INFO] [stdout] 94 | ].into_iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> day_25.rs:126:36 [INFO] [stdout] | [INFO] [stdout] 126 | let item = s[2..].to_string(); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> day_25.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | } else if s.starts_with("- ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 125 ~ } else if let Some() = s.strip_prefix("- ") { [INFO] [stdout] 126 ~ let item = .to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:260:35 [INFO] [stdout] | [INFO] [stdout] 260 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: field `0` is never read [INFO] [stdout] --> day_03.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - IoError(io::Error), [INFO] [stdout] 8 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:264:35 [INFO] [stdout] | [INFO] [stdout] 264 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_25.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_03.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | ParseIntError(num::ParseIntError), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - ParseIntError(num::ParseIntError), [INFO] [stdout] 9 + ParseIntError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_03.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:279:39 [INFO] [stdout] | [INFO] [stdout] 279 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: called `ok().expect()` on a `Result` value [INFO] [stdout] --> day_25.rs:172:21 [INFO] [stdout] | [INFO] [stdout] 172 | / io::stdin().read_line(&mut input) [INFO] [stdout] 173 | | .ok().expect("Couldn't read input"); [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 172 - io::stdin().read_line(&mut input) [INFO] [stdout] 173 - .ok().expect("Couldn't read input"); [INFO] [stdout] 172 + io::stdin().read_line(&mut input).expect("Couldn't read input"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021 [INFO] [stdout] --> day_25.rs:94:7 [INFO] [stdout] | [INFO] [stdout] 94 | ].into_iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: use `.iter()` instead of `.into_iter()` to avoid ambiguity [INFO] [stdout] | [INFO] [stdout] 94 - ].into_iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] 94 + ].iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | [INFO] [stdout] help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value [INFO] [stdout] | [INFO] [stdout] 85 ~ IntoIterator::into_iter([ [INFO] [stdout] 86 | "hypercube".to_string(), [INFO] [stdout] ... [INFO] [stdout] 93 | "antenna".to_string(), [INFO] [stdout] 94 ~ ]).for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:291:39 [INFO] [stdout] | [INFO] [stdout] 291 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day_03.rs:41:23 [INFO] [stdout] | [INFO] [stdout] 41 | match point.chars().nth(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `point.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:74:26 [INFO] [stdout] | [INFO] [stdout] 74 | for i in start..end { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 74 - for i in start..end { [INFO] [stdout] 74 + for in board.iter_mut().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day_10.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | let x = lines.split("\n").nth(0).unwrap().len() as isize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `lines.split("\n").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:318:39 [INFO] [stdout] | [INFO] [stdout] 318 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:84:26 [INFO] [stdout] | [INFO] [stdout] 84 | for i in start..x { [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] 84 - for i in start..x { [INFO] [stdout] 84 + for in board.iter_mut().take(x).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:94:26 [INFO] [stdout] | [INFO] [stdout] 94 | for i in start..end { [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] 94 - for i in start..end { [INFO] [stdout] 94 + for in board.iter_mut().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> day_03.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | for i in start..y { [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] 104 - for i in start..y { [INFO] [stdout] 104 + for in board.iter_mut().take(y).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:126:26 [INFO] [stdout] | [INFO] [stdout] 126 | for i in start..end { [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] 126 - for i in start..end { [INFO] [stdout] 126 + for (i, ) in board.iter().enumerate().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:138:26 [INFO] [stdout] | [INFO] [stdout] 138 | for i in start..x { [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] 138 - for i in start..x { [INFO] [stdout] 138 + for (i, ) in board.iter().enumerate().take(x).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:330:39 [INFO] [stdout] | [INFO] [stdout] 330 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:150:26 [INFO] [stdout] | [INFO] [stdout] 150 | for i in start..end { [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] 150 - for i in start..end { [INFO] [stdout] 150 + for (i, ) in board.iter().enumerate().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `board` [INFO] [stdout] --> day_03.rs:162:26 [INFO] [stdout] | [INFO] [stdout] 162 | for i in start..y { [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] 162 - for i in start..y { [INFO] [stdout] 162 + for (i, ) in board.iter().enumerate().take(y).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_10.rs:168:20 [INFO] [stdout] | [INFO] [stdout] 168 | let point = adi.skip(199).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(199)` [INFO] [stdout] | [INFO] [stdout] help: for this change `adi` has to be mutable [INFO] [stdout] --> day_10.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | let adi = AsteroidDestructionIterator::new(&input, dimensions, Point::new(x, y)); [INFO] [stdout] | ^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `array` [INFO] [stdout] --> day_25.rs:94:7 [INFO] [stdout] | [INFO] [stdout] 94 | ].into_iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> day_25.rs:126:36 [INFO] [stdout] | [INFO] [stdout] 126 | let item = s[2..].to_string(); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> day_25.rs:125:28 [INFO] [stdout] | [INFO] [stdout] 125 | } else if s.starts_with("- ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 125 ~ } else if let Some() = s.strip_prefix("- ") { [INFO] [stdout] 126 ~ let item = .to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day_24.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [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] 42 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 42 + if !(bug && count != 1 || count != 1 && count != 2) { [INFO] [stdout] | [INFO] [stdout] 42 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 42 + if (count == 2 || count == 1) && (count == 1 || !bug) { [INFO] [stdout] | [INFO] [stdout] 42 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 42 + if count == 1 || !bug && count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day_24.rs:101:16 [INFO] [stdout] | [INFO] [stdout] 101 | if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 101 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 101 + if !(bug && count != 1 || count != 1 && count != 2) { [INFO] [stdout] | [INFO] [stdout] 101 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 101 + if (count == 2 || count == 1) && (count == 1 || !bug) { [INFO] [stdout] | [INFO] [stdout] 101 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 101 + if count == 1 || !bug && count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> day_24.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 181 | let dup = find_duplicate(map); [INFO] [stdout] | ------------------------------ unnecessary `let` binding [INFO] [stdout] 182 | dup [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 181 ~ [INFO] [stdout] 182 ~ find_duplicate(map) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_25.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> day_25.rs:172:21 [INFO] [stdout] | [INFO] [stdout] 172 | / io::stdin().read_line(&mut input) [INFO] [stdout] 173 | | .ok().expect("Couldn't read input"); [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 172 - io::stdin().read_line(&mut input) [INFO] [stdout] 173 - .ok().expect("Couldn't read input"); [INFO] [stdout] 172 + io::stdin().read_line(&mut input).expect("Couldn't read input"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021 [INFO] [stdout] --> day_25.rs:94:7 [INFO] [stdout] | [INFO] [stdout] 94 | ].into_iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: use `.iter()` instead of `.into_iter()` to avoid ambiguity [INFO] [stdout] | [INFO] [stdout] 94 - ].into_iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] 94 + ].iter().for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | [INFO] [stdout] help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value [INFO] [stdout] | [INFO] [stdout] 85 ~ IntoIterator::into_iter([ [INFO] [stdout] 86 | "hypercube".to_string(), [INFO] [stdout] ... [INFO] [stdout] 93 | "antenna".to_string(), [INFO] [stdout] 94 ~ ]).for_each(|i| { all_items.insert(i.clone()); }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> day_04.rs:33:28 [INFO] [stdout] | [INFO] [stdout] 33 | .map(|(_, counts)| counts.iter().any(|x| *x == 2)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `counts.contains(&2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | assert_eq!(is_sequential_part1(111111), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 62 - assert_eq!(is_sequential_part1(111111), true); [INFO] [stdout] 62 + assert!(is_sequential_part1(111111)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | assert_eq!(is_sequential_part1(111121), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 63 - assert_eq!(is_sequential_part1(111121), false); [INFO] [stdout] 63 + assert!(!is_sequential_part1(111121)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | assert_eq!(is_sequential_part1(123455), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 64 - assert_eq!(is_sequential_part1(123455), true); [INFO] [stdout] 64 + assert!(is_sequential_part1(123455)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | assert_eq!(is_sequential_part1(133789), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 65 - assert_eq!(is_sequential_part1(133789), true); [INFO] [stdout] 65 + assert!(is_sequential_part1(133789)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | assert_eq!(is_sequential_part1(128392), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 66 - assert_eq!(is_sequential_part1(128392), false); [INFO] [stdout] 66 + assert!(!is_sequential_part1(128392)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | assert_eq!(is_sequential_part1(643281), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 67 - assert_eq!(is_sequential_part1(643281), false); [INFO] [stdout] 67 + assert!(!is_sequential_part1(643281)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | assert_eq!(is_sequential_part1(99999999), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 68 - assert_eq!(is_sequential_part1(99999999), true); [INFO] [stdout] 68 + assert!(is_sequential_part1(99999999)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | assert_eq!(is_sequential_part1(1234567), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 69 - assert_eq!(is_sequential_part1(1234567), false); [INFO] [stdout] 69 + assert!(!is_sequential_part1(1234567)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | assert_eq!(is_sequential_part2(111122), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 75 - assert_eq!(is_sequential_part2(111122), true); [INFO] [stdout] 75 + assert!(is_sequential_part2(111122)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | assert_eq!(is_sequential_part2(123444), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 76 - assert_eq!(is_sequential_part2(123444), false); [INFO] [stdout] 76 + assert!(!is_sequential_part2(123444)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | assert_eq!(is_sequential_part2(112233), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 77 - assert_eq!(is_sequential_part2(112233), true); [INFO] [stdout] 77 + assert!(is_sequential_part2(112233)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | assert_eq!(is_sequential_part2(111333), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 78 - assert_eq!(is_sequential_part2(111333), false); [INFO] [stdout] 78 + assert!(!is_sequential_part2(111333)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | assert_eq!(is_sequential_part2(111442), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 79 - assert_eq!(is_sequential_part2(111442), false); [INFO] [stdout] 79 + assert!(!is_sequential_part2(111442)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_15.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&check_pos).is_none()` [INFO] [stdout] --> day_15.rs:154:32 [INFO] [stdout] | [INFO] [stdout] 154 | if map.get(&check_pos).is_none() { [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!map.contains_key(&check_pos)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:260:35 [INFO] [stdout] | [INFO] [stdout] 260 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12.rs:264:35 [INFO] [stdout] | [INFO] [stdout] 264 | let mut system = System::load(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: field `0` is never read [INFO] [stdout] --> day_02.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - IoError(io::Error), [INFO] [stdout] 7 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 8 | ParseIntError(num::ParseIntError), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - ParseIntError(num::ParseIntError), [INFO] [stdout] 8 + ParseIntError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | InvalidOpcode(usize), [INFO] [stdout] | ------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - InvalidOpcode(usize), [INFO] [stdout] 9 + InvalidOpcode(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_02.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | IndexOutOfBounds(usize) [INFO] [stdout] | ---------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 10 - IndexOutOfBounds(usize) [INFO] [stdout] 10 + IndexOutOfBounds(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_02.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> day_02.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | fn run_program(memory: &mut Vec) -> Result<(), Error> { [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] 37 - fn run_program(memory: &mut Vec) -> Result<(), Error> { [INFO] [stdout] 37 + fn run_program(memory: &mut [usize]) -> Result<(), Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day_02.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 89 - return None; [INFO] [stdout] 89 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_02.rs:73:32 [INFO] [stdout] | [INFO] [stdout] 73 | fn find_inputs_matching(input: &Vec, expected_output: usize) -> Option<(usize, usize)> { [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] 73 ~ fn find_inputs_matching(input: &[usize], expected_output: usize) -> Option<(usize, usize)> { [INFO] [stdout] 74 | //let input = read_input()?; [INFO] [stdout] 75 | for a in 0..100 { [INFO] [stdout] 76 | for b in 0..100 { [INFO] [stdout] 77 ~ let mut input = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_20.rs:163:39 [INFO] [stdout] | [INFO] [stdout] 163 | walkers = walkers.into_iter().map(|(walker, distance)| { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 164 | | deltas.iter().filter_map(|&d| { [INFO] [stdout] 165 | | let p = walker + d; [INFO] [stdout] 166 | | let p = if map.paths.contains(&p) { [INFO] [stdout] ... | [INFO] [stdout] 179 | | }).collect::>() [INFO] [stdout] 180 | | }).flatten().collect(); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 163 ~ walkers = walkers.into_iter().flat_map(|(walker, distance)| { [INFO] [stdout] 164 + deltas.iter().filter_map(|&d| { [INFO] [stdout] 165 + let p = walker + d; [INFO] [stdout] 166 + let p = if map.paths.contains(&p) { [INFO] [stdout] 167 + p [INFO] [stdout] 168 + } else if let Some(&(_, exit)) = map.portals.get(&p) { [INFO] [stdout] 169 + exit [INFO] [stdout] 170 + } else { [INFO] [stdout] 171 + return None; [INFO] [stdout] 172 + }; [INFO] [stdout] 173 + if let Some(_) = scores.get(&p) { [INFO] [stdout] 174 + None [INFO] [stdout] 175 + } else { [INFO] [stdout] 176 + scores.insert(p, distance + 1); [INFO] [stdout] 177 + Some((p, distance + 1)) [INFO] [stdout] 178 + } [INFO] [stdout] 179 + }).collect::>() [INFO] [stdout] 180 ~ }).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day_20.rs:173:24 [INFO] [stdout] | [INFO] [stdout] 173 | if let Some(_) = scores.get(&p) { [INFO] [stdout] | -------^^^^^^^----------------- help: try: `if scores.get(&p).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_15.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `p` [INFO] [stdout] --> day_16.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | for j in 1..input.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] 13 - for j in 1..input.len() { [INFO] [stdout] 13 + for (j, ) in p.iter_mut().enumerate().take(input.len()).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `o` is only used to index `input` [INFO] [stdout] --> day_16.rs:16:26 [INFO] [stdout] | [INFO] [stdout] 16 | for o in start..end { [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] 16 - for o in start..end { [INFO] [stdout] 16 + for in input.iter().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day_20.rs:205:28 [INFO] [stdout] | [INFO] [stdout] 205 | if let Some(_) = scores.get(&p) { [INFO] [stdout] | -------^^^^^^^----------------- help: try: `if scores.get(&p).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day_20.rs:223:28 [INFO] [stdout] | [INFO] [stdout] 223 | if let Some(_) = scores.get(exit) { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if scores.get(exit).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&check_pos).is_none()` [INFO] [stdout] --> day_15.rs:154:32 [INFO] [stdout] | [INFO] [stdout] 154 | if map.get(&check_pos).is_none() { [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!map.contains_key(&check_pos)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> day_23.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | .filter_map(|o| o) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_17.rs:131:10 [INFO] [stdout] | [INFO] [stdout] 131 | .map(|(a, b)| vec![a.clone(), b.clone()]) [INFO] [stdout] | __________^ [INFO] [stdout] 132 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(a, b)| vec![a.clone(), b.clone()])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_20.rs:163:39 [INFO] [stdout] | [INFO] [stdout] 163 | walkers = walkers.into_iter().map(|(walker, distance)| { [INFO] [stdout] | _______________________________________^ [INFO] [stdout] 164 | | deltas.iter().filter_map(|&d| { [INFO] [stdout] 165 | | let p = walker + d; [INFO] [stdout] 166 | | let p = if map.paths.contains(&p) { [INFO] [stdout] ... | [INFO] [stdout] 179 | | }).collect::>() [INFO] [stdout] 180 | | }).flatten().collect(); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 163 ~ walkers = walkers.into_iter().flat_map(|(walker, distance)| { [INFO] [stdout] 164 + deltas.iter().filter_map(|&d| { [INFO] [stdout] 165 + let p = walker + d; [INFO] [stdout] 166 + let p = if map.paths.contains(&p) { [INFO] [stdout] 167 + p [INFO] [stdout] 168 + } else if let Some(&(_, exit)) = map.portals.get(&p) { [INFO] [stdout] 169 + exit [INFO] [stdout] 170 + } else { [INFO] [stdout] 171 + return None; [INFO] [stdout] 172 + }; [INFO] [stdout] 173 + if let Some(_) = scores.get(&p) { [INFO] [stdout] 174 + None [INFO] [stdout] 175 + } else { [INFO] [stdout] 176 + scores.insert(p, distance + 1); [INFO] [stdout] 177 + Some((p, distance + 1)) [INFO] [stdout] 178 + } [INFO] [stdout] 179 + }).collect::>() [INFO] [stdout] 180 ~ }).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day_20.rs:173:24 [INFO] [stdout] | [INFO] [stdout] 173 | if let Some(_) = scores.get(&p) { [INFO] [stdout] | -------^^^^^^^----------------- help: try: `if scores.get(&p).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_01.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - IoError(io::Error), [INFO] [stdout] 7 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_01.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 8 | ParseIntError(num::ParseIntError) [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 8 - ParseIntError(num::ParseIntError) [INFO] [stdout] 8 + ParseIntError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day_20.rs:205:28 [INFO] [stdout] | [INFO] [stdout] 205 | if let Some(_) = scores.get(&p) { [INFO] [stdout] | -------^^^^^^^----------------- help: try: `if scores.get(&p).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day_20.rs:223:28 [INFO] [stdout] | [INFO] [stdout] 223 | if let Some(_) = scores.get(exit) { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if scores.get(exit).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_08.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | IoError(io::Error) [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 6 - IoError(io::Error) [INFO] [stdout] 6 + IoError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 9 - IoError(io::Error), [INFO] [stdout] 9 + IoError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | ParseIntError(num::ParseIntError), [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 10 - ParseIntError(num::ParseIntError), [INFO] [stdout] 10 + ParseIntError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:11:19 [INFO] [stdout] | [INFO] [stdout] 11 | InvalidOpcode(isize), [INFO] [stdout] | ------------- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - InvalidOpcode(isize), [INFO] [stdout] 11 + InvalidOpcode(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_05.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | BadValueAtPosition(usize), [INFO] [stdout] | ------------------ ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 13 - BadValueAtPosition(usize), [INFO] [stdout] 13 + BadValueAtPosition(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_05.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip_while(

).next()` on an `Iterator` [INFO] [stdout] --> day_08.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | *input[i..] [INFO] [stdout] | ______________^ [INFO] [stdout] 19 | | .iter() [INFO] [stdout] 20 | | .step_by(size) [INFO] [stdout] 21 | | .skip_while(|&x| *x == 2) [INFO] [stdout] 22 | | .next() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: this is more succinctly expressed by calling `.find(!

)` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#skip_while_next [INFO] [stdout] = note: `#[warn(clippy::skip_while_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:12:38 [INFO] [stdout] | [INFO] [stdout] 12 | if i >= 5 && self & (1 << i - 5) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i - 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:19:38 [INFO] [stdout] | [INFO] [stdout] 19 | if i < 20 && self & (1 << i + 5) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i + 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:26:42 [INFO] [stdout] | [INFO] [stdout] 26 | if i % 5 != 0 && self & (1 << i - 1) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:33:42 [INFO] [stdout] | [INFO] [stdout] 33 | if i % 5 != 4 && self & (1 << i + 1) >= 1 { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i + 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | 1 & this >> i - 5 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i - 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | 1 & this >> i + 5 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i + 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | 1 & this >> i - 1 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> day_24.rs:92:25 [INFO] [stdout] | [INFO] [stdout] 92 | 1 & this >> i + 1 [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `this >> (i + 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> day_05.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | fs::read_to_string(&program)?.split(",").map(|x| { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> day_05.rs:63:22 [INFO] [stdout] | [INFO] [stdout] 63 | self.input = input.iter().map(|x| *x).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `input.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_08.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | IoError(io::Error) [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 6 - IoError(io::Error) [INFO] [stdout] 6 + IoError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip_while(

).next()` on an `Iterator` [INFO] [stdout] --> day_08.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | *input[i..] [INFO] [stdout] | ______________^ [INFO] [stdout] 19 | | .iter() [INFO] [stdout] 20 | | .step_by(size) [INFO] [stdout] 21 | | .skip_while(|&x| *x == 2) [INFO] [stdout] 22 | | .next() [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: this is more succinctly expressed by calling `.find(!

)` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#skip_while_next [INFO] [stdout] = note: `#[warn(clippy::skip_while_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_08.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_08.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> day_05.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | / loop { [INFO] [stdout] 69 | | match self.next() { [INFO] [stdout] 70 | | Some(res) => res?, [INFO] [stdout] 71 | | None => break [INFO] [stdout] 72 | | } [INFO] [stdout] 73 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(res) = self.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | fn find_start_pos(map: &Vec>) -> Option<(usize, usize)> { [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] 35 - fn find_start_pos(map: &Vec>) -> Option<(usize, usize)> { [INFO] [stdout] 35 + fn find_start_pos(map: &[Vec]) -> Option<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:46:28 [INFO] [stdout] | [INFO] [stdout] 46 | fn find_key_positions(map: &Vec>) -> HashMap { [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] 46 - fn find_key_positions(map: &Vec>) -> HashMap { [INFO] [stdout] 46 + fn find_key_positions(map: &[Vec]) -> HashMap { [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] --> day_18.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match p { [INFO] [stdout] 51 | | Point::Key(k) => { [INFO] [stdout] 52 | | keys.insert(*k, (x, y)); [INFO] [stdout] 53 | | }, [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#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Point::Key(k) = p { [INFO] [stdout] 51 + keys.insert(*k, (x, y)); [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:77:10 [INFO] [stdout] | [INFO] [stdout] 77 | map: &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] 77 - map: &Vec>, [INFO] [stdout] 77 + map: &[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] --> day_18.rs:79:19 [INFO] [stdout] | [INFO] [stdout] 79 | doors_passed: &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] 79 ~ doors_passed: &[char], [INFO] [stdout] 80 | keys_collected: &Vec [INFO] [stdout] ... [INFO] [stdout] 90 | distance: distance + 1, [INFO] [stdout] 91 ~ doors_passed: doors_passed.to_owned(), [INFO] [stdout] 92 | keys_collected: { [INFO] [stdout] ... [INFO] [stdout] 106 | doors_passed: { [INFO] [stdout] 107 ~ let mut doors = doors_passed.to_owned(); [INFO] [stdout] 108 | if !doors.contains(&k) { [INFO] [stdout] ... [INFO] [stdout] 120 | distance: distance + 1, [INFO] [stdout] 121 ~ doors_passed: doors_passed.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | keys_collected: &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] 80 ~ keys_collected: &[char] [INFO] [stdout] 81 | ) -> NewLeafResult { [INFO] [stdout] ... [INFO] [stdout] 92 | keys_collected: { [INFO] [stdout] 93 ~ let mut keys = keys_collected.to_owned(); [INFO] [stdout] 94 | if !keys.contains(&k) { [INFO] [stdout] ... [INFO] [stdout] 112 | }, [INFO] [stdout] 113 ~ keys_collected: keys_collected.to_owned() [INFO] [stdout] 114 | }) [INFO] [stdout] ... [INFO] [stdout] 121 | doors_passed: doors_passed.clone(), [INFO] [stdout] 122 ~ keys_collected: keys_collected.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> day_18.rs:218:26 [INFO] [stdout] | [INFO] [stdout] 218 | let reachable_keys = start_node.keys().map(|k| *k).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `start_node.keys().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day_18.rs:221:20 [INFO] [stdout] | [INFO] [stdout] 221 | let mut nodes: HashMap, Vec)>> = 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] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_09.rs:5:18 [INFO] [stdout] | [INFO] [stdout] 5 | IntCodeError(intcode::Error), [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 5 - IntCodeError(intcode::Error), [INFO] [stdout] 5 + IntCodeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day_24.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [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] 42 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 42 + if !(bug && count != 1 || count != 1 && count != 2) { [INFO] [stdout] | [INFO] [stdout] 42 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 42 + if (count == 2 || count == 1) && (count == 1 || !bug) { [INFO] [stdout] | [INFO] [stdout] 42 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 42 + if count == 1 || !bug && count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day_24.rs:101:16 [INFO] [stdout] | [INFO] [stdout] 101 | if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 101 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 101 + if !(bug && count != 1 || count != 1 && count != 2) { [INFO] [stdout] | [INFO] [stdout] 101 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 101 + if (count == 2 || count == 1) && (count == 1 || !bug) { [INFO] [stdout] | [INFO] [stdout] 101 - if (bug && count == 1) || (!bug && (count == 1 || count == 2)) { [INFO] [stdout] 101 + if count == 1 || !bug && count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> day_24.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 181 | let dup = find_duplicate(map); [INFO] [stdout] | ------------------------------ unnecessary `let` binding [INFO] [stdout] 182 | dup [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 181 ~ [INFO] [stdout] 182 ~ find_duplicate(map) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_21.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> day_22.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | .map(|line| Ok(line?)) [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 60 - .map(|line| Ok(line?)) [INFO] [stdout] 60 + .map(|line| line) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> day_22.rs:79:11 [INFO] [stdout] | [INFO] [stdout] 79 | steps.into_iter().fold(initial_deck, |mut current_deck, step| { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> day_21.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> day_22.rs:86:47 [INFO] [stdout] | [INFO] [stdout] 86 | current_deck.rotate_right(cut.abs() as _); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `cut.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | fn find_start_pos(map: &Vec>) -> Option<(usize, usize)> { [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] 35 - fn find_start_pos(map: &Vec>) -> Option<(usize, usize)> { [INFO] [stdout] 35 + fn find_start_pos(map: &[Vec]) -> Option<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> day_22.rs:116:11 [INFO] [stdout] | [INFO] [stdout] 116 | steps.into_iter().rev().fold((1, 0), |(a, b), step| { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:46:28 [INFO] [stdout] | [INFO] [stdout] 46 | fn find_key_positions(map: &Vec>) -> HashMap { [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] 46 - fn find_key_positions(map: &Vec>) -> HashMap { [INFO] [stdout] 46 + fn find_key_positions(map: &[Vec]) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | IoError(io::Error), [INFO] [stdout] | ------- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 10 - IoError(io::Error), [INFO] [stdout] 10 + IoError(()), [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] --> day_18.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match p { [INFO] [stdout] 51 | | Point::Key(k) => { [INFO] [stdout] 52 | | keys.insert(*k, (x, y)); [INFO] [stdout] 53 | | }, [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#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Point::Key(k) = p { [INFO] [stdout] 51 + keys.insert(*k, (x, y)); [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:77:10 [INFO] [stdout] | [INFO] [stdout] 77 | map: &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] 77 - map: &Vec>, [INFO] [stdout] 77 + map: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | InvalidLine(String), [INFO] [stdout] | ----------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 11 - InvalidLine(String), [INFO] [stdout] 11 + InvalidLine(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | InputHasMultipleDirectOrbits(String), [INFO] [stdout] | ---------------------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 12 - InputHasMultipleDirectOrbits(String), [INFO] [stdout] 12 + InputHasMultipleDirectOrbits(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> day_06.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | MissingObject(String) [INFO] [stdout] | ------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 13 - MissingObject(String) [INFO] [stdout] 13 + MissingObject(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> day_06.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | IoError(io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:79:19 [INFO] [stdout] | [INFO] [stdout] 79 | doors_passed: &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] 79 ~ doors_passed: &[char], [INFO] [stdout] 80 | keys_collected: &Vec [INFO] [stdout] ... [INFO] [stdout] 90 | distance: distance + 1, [INFO] [stdout] 91 ~ doors_passed: doors_passed.to_owned(), [INFO] [stdout] 92 | keys_collected: { [INFO] [stdout] ... [INFO] [stdout] 106 | doors_passed: { [INFO] [stdout] 107 ~ let mut doors = doors_passed.to_owned(); [INFO] [stdout] 108 | if !doors.contains(&k) { [INFO] [stdout] ... [INFO] [stdout] 120 | distance: distance + 1, [INFO] [stdout] 121 ~ doors_passed: doors_passed.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_18.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | keys_collected: &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] 80 ~ keys_collected: &[char] [INFO] [stdout] 81 | ) -> NewLeafResult { [INFO] [stdout] ... [INFO] [stdout] 92 | keys_collected: { [INFO] [stdout] 93 ~ let mut keys = keys_collected.to_owned(); [INFO] [stdout] 94 | if !keys.contains(&k) { [INFO] [stdout] ... [INFO] [stdout] 112 | }, [INFO] [stdout] 113 ~ keys_collected: keys_collected.to_owned() [INFO] [stdout] 114 | }) [INFO] [stdout] ... [INFO] [stdout] 121 | doors_passed: doors_passed.clone(), [INFO] [stdout] 122 ~ keys_collected: keys_collected.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> day_18.rs:218:26 [INFO] [stdout] | [INFO] [stdout] 218 | let reachable_keys = start_node.keys().map(|k| *k).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `start_node.keys().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day_18.rs:221:20 [INFO] [stdout] | [INFO] [stdout] 221 | let mut nodes: HashMap, Vec)>> = 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] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> day_06.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | / tree.iter().map(|(_k, n)| { [INFO] [stdout] 96 | | let orbits = n.borrow().count_orbits(); [INFO] [stdout] 97 | | orbits [INFO] [stdout] 98 | | }).sum() [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 95 ~ tree.values().map(|n| { [INFO] [stdout] 96 + let orbits = n.borrow().count_orbits(); [INFO] [stdout] 97 + orbits [INFO] [stdout] 98 ~ }).sum() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.64s [INFO] running `Command { std: "docker" "inspect" "8beff1c5883d26e6912c1cddeee792aaa34a5c8fce9066fdf34ccbd498bffdb1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8beff1c5883d26e6912c1cddeee792aaa34a5c8fce9066fdf34ccbd498bffdb1", kill_on_drop: false }` [INFO] [stdout] 8beff1c5883d26e6912c1cddeee792aaa34a5c8fce9066fdf34ccbd498bffdb1