[INFO] cloning repository https://github.com/balintbalazs/advent-of-code-2020 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/balintbalazs/advent-of-code-2020" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbalintbalazs%2Fadvent-of-code-2020", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbalintbalazs%2Fadvent-of-code-2020'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a4d61a71442e88c05f01062db2194a9792ceb5ce [INFO] linting balintbalazs/advent-of-code-2020 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbalintbalazs%2Fadvent-of-code-2020" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/balintbalazs/advent-of-code-2020 [INFO] finished tweaking git repo https://github.com/balintbalazs/advent-of-code-2020 [INFO] tweaked toml for git repo https://github.com/balintbalazs/advent-of-code-2020 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/balintbalazs/advent-of-code-2020 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/balintbalazs/advent-of-code-2020 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded scan_fmt v0.2.5 [INFO] [stderr] Downloaded syn v1.0.53 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0432496c46760532fd399aeb5b985ec59791e84f66cb928ec9b32028d9c9c7cb [INFO] running `Command { std: "docker" "start" "-a" "0432496c46760532fd399aeb5b985ec59791e84f66cb928ec9b32028d9c9c7cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0432496c46760532fd399aeb5b985ec59791e84f66cb928ec9b32028d9c9c7cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0432496c46760532fd399aeb5b985ec59791e84f66cb928ec9b32028d9c9c7cb", kill_on_drop: false }` [INFO] [stdout] 0432496c46760532fd399aeb5b985ec59791e84f66cb928ec9b32028d9c9c7cb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e5ad0171359194da9b787965c11fa26bf23a9322b87e4c54b499e3c52892911f [INFO] running `Command { std: "docker" "start" "-a" "e5ad0171359194da9b787965c11fa26bf23a9322b87e4c54b499e3c52892911f", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.24 [INFO] [stderr] Compiling syn v1.0.53 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling serde_derive v1.0.117 [INFO] [stderr] Compiling serde v1.0.117 [INFO] [stderr] Checking regex-syntax v0.6.21 [INFO] [stderr] Checking thread_local v1.0.1 [INFO] [stderr] Checking aho-corasick v0.7.15 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Checking regex v1.4.2 [INFO] [stderr] Checking scan_fmt v0.2.5 [INFO] [stderr] Checking pp v0.1.0 (/opt/rustwide/workdir/pp) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> pp/src/error.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use std; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> pp/src/error.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | use std; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> pp/src/de.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn from_str(input: &'de str) -> Self { [INFO] [stdout] 22 | | Deserializer { [INFO] [stdout] 23 | | input, [INFO] [stdout] 24 | | pos: 0, [INFO] [stdout] ... | [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | self.pos = self.pos + ch.len_utf8(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += ch.len_utf8()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | self.pos = self.pos + "true".len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += "true".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | self.pos = self.pos + "false".len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += "false".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | self.pos = self.pos + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | self.pos = self.pos + len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/de.rs:151:11 [INFO] [stdout] | [INFO] [stdout] 151 | impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 151 - impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { [INFO] [stdout] 151 + impl<'de> de::Deserializer<'de> for &mut Deserializer<'de> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:316:13 [INFO] [stdout] | [INFO] [stdout] 316 | self.pos = self.pos + "null".len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += "null".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> pp/src/de.rs:357:59 [INFO] [stdout] | [INFO] [stdout] 357 | let value = visitor.visit_seq(SpaceSeparated::new(&mut self))?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self` [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: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:359:12 [INFO] [stdout] | [INFO] [stdout] 359 | if self.input.len() == 0 || self.next_char()? == '\n' && self.next_char()? == '\n' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> pp/src/de.rs:400:59 [INFO] [stdout] | [INFO] [stdout] 400 | let value = visitor.visit_map(SpaceSeparated::new(&mut self))?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self` [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: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:402:12 [INFO] [stdout] | [INFO] [stdout] 402 | if self.input.len() == 0 || self.input.chars().take(2).collect::() == "\n\n" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> pp/src/de.rs:501:12 [INFO] [stdout] | [INFO] [stdout] 501 | if !self.first && !(self.de.next_char()? == '\n' && self.de.next_char()? == '\n') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(self.first || self.de.next_char()? == '\n' && self.de.next_char()? == '\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:494:12 [INFO] [stdout] | [INFO] [stdout] 494 | if self.de.input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.de.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:523:12 [INFO] [stdout] | [INFO] [stdout] 523 | if self.de.input.len() == 0 || self.de.input.chars().take(2).collect::() == "\n\n" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.de.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> pp/src/de.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / pub fn from_str(input: &'de str) -> Self { [INFO] [stdout] 22 | | Deserializer { [INFO] [stdout] 23 | | input, [INFO] [stdout] 24 | | pos: 0, [INFO] [stdout] ... | [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:26:6 [INFO] [stdout] | [INFO] [stdout] 26 | impl<'a> ser::Serializer for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 - impl<'a> ser::Serializer for &'a mut Serializer { [INFO] [stdout] 26 + impl ser::Serializer for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | self.pos = self.pos + ch.len_utf8(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += ch.len_utf8()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | self.pos = self.pos + "true".len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += "true".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | self.pos = self.pos + "false".len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += "false".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:275:6 [INFO] [stdout] | [INFO] [stdout] 275 | impl<'a> ser::SerializeSeq for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 275 - impl<'a> ser::SerializeSeq for &'a mut Serializer { [INFO] [stdout] 275 + impl ser::SerializeSeq for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:286:44 [INFO] [stdout] | [INFO] [stdout] 286 | if !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:299:6 [INFO] [stdout] | [INFO] [stdout] 299 | impl<'a> ser::SerializeTuple for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 299 - impl<'a> ser::SerializeTuple for &'a mut Serializer { [INFO] [stdout] 299 + impl ser::SerializeTuple for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:307:44 [INFO] [stdout] | [INFO] [stdout] 307 | if !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | self.pos = self.pos + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:319:6 [INFO] [stdout] | [INFO] [stdout] 319 | impl<'a> ser::SerializeTupleStruct for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 319 - impl<'a> ser::SerializeTupleStruct for &'a mut Serializer { [INFO] [stdout] 319 + impl ser::SerializeTupleStruct for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:327:44 [INFO] [stdout] | [INFO] [stdout] 327 | if !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:347:6 [INFO] [stdout] | [INFO] [stdout] 347 | impl<'a> ser::SerializeTupleVariant for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 347 - impl<'a> ser::SerializeTupleVariant for &'a mut Serializer { [INFO] [stdout] 347 + impl ser::SerializeTupleVariant for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:371:6 [INFO] [stdout] | [INFO] [stdout] 371 | impl<'a> ser::SerializeMap for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 371 - impl<'a> ser::SerializeMap for &'a mut Serializer { [INFO] [stdout] 371 + impl ser::SerializeMap for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | self.pos = self.pos + len; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:387:75 [INFO] [stdout] | [INFO] [stdout] 387 | if !self.output.ends_with(' ') && !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/de.rs:151:11 [INFO] [stdout] | [INFO] [stdout] 151 | impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 151 - impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> { [INFO] [stdout] 151 + impl<'de> de::Deserializer<'de> for &mut Deserializer<'de> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:412:6 [INFO] [stdout] | [INFO] [stdout] 412 | impl<'a> ser::SerializeStruct for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 412 - impl<'a> ser::SerializeStruct for &'a mut Serializer { [INFO] [stdout] 412 + impl ser::SerializeStruct for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:420:75 [INFO] [stdout] | [INFO] [stdout] 420 | if !self.output.ends_with(' ') && !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:436:6 [INFO] [stdout] | [INFO] [stdout] 436 | impl<'a> ser::SerializeStructVariant for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 436 - impl<'a> ser::SerializeStructVariant for &'a mut Serializer { [INFO] [stdout] 436 + impl ser::SerializeStructVariant for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> pp/src/de.rs:316:13 [INFO] [stdout] | [INFO] [stdout] 316 | self.pos = self.pos + "null".len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pos += "null".len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> pp/src/de.rs:357:59 [INFO] [stdout] | [INFO] [stdout] 357 | let value = visitor.visit_seq(SpaceSeparated::new(&mut self))?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self` [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: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:359:12 [INFO] [stdout] | [INFO] [stdout] 359 | if self.input.len() == 0 || self.next_char()? == '\n' && self.next_char()? == '\n' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> pp/src/de.rs:400:59 [INFO] [stdout] | [INFO] [stdout] 400 | let value = visitor.visit_map(SpaceSeparated::new(&mut self))?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `self` [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: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:402:12 [INFO] [stdout] | [INFO] [stdout] 402 | if self.input.len() == 0 || self.input.chars().take(2).collect::() == "\n\n" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> pp/src/de.rs:501:12 [INFO] [stdout] | [INFO] [stdout] 501 | if !self.first && !(self.de.next_char()? == '\n' && self.de.next_char()? == '\n') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(self.first || self.de.next_char()? == '\n' && self.de.next_char()? == '\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:494:12 [INFO] [stdout] | [INFO] [stdout] 494 | if self.de.input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.de.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/de.rs:523:12 [INFO] [stdout] | [INFO] [stdout] 523 | if self.de.input.len() == 0 || self.de.input.chars().take(2).collect::() == "\n\n" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.de.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking advent-of-code-2020 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:26:6 [INFO] [stdout] | [INFO] [stdout] 26 | impl<'a> ser::Serializer for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 - impl<'a> ser::Serializer for &'a mut Serializer { [INFO] [stdout] 26 + impl ser::Serializer for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:275:6 [INFO] [stdout] | [INFO] [stdout] 275 | impl<'a> ser::SerializeSeq for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 275 - impl<'a> ser::SerializeSeq for &'a mut Serializer { [INFO] [stdout] 275 + impl ser::SerializeSeq for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:286:44 [INFO] [stdout] | [INFO] [stdout] 286 | if !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:299:6 [INFO] [stdout] | [INFO] [stdout] 299 | impl<'a> ser::SerializeTuple for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 299 - impl<'a> ser::SerializeTuple for &'a mut Serializer { [INFO] [stdout] 299 + impl ser::SerializeTuple for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:307:44 [INFO] [stdout] | [INFO] [stdout] 307 | if !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:319:6 [INFO] [stdout] | [INFO] [stdout] 319 | impl<'a> ser::SerializeTupleStruct for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 319 - impl<'a> ser::SerializeTupleStruct for &'a mut Serializer { [INFO] [stdout] 319 + impl ser::SerializeTupleStruct for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:327:44 [INFO] [stdout] | [INFO] [stdout] 327 | if !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:347:6 [INFO] [stdout] | [INFO] [stdout] 347 | impl<'a> ser::SerializeTupleVariant for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 347 - impl<'a> ser::SerializeTupleVariant for &'a mut Serializer { [INFO] [stdout] 347 + impl ser::SerializeTupleVariant for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:371:6 [INFO] [stdout] | [INFO] [stdout] 371 | impl<'a> ser::SerializeMap for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 371 - impl<'a> ser::SerializeMap for &'a mut Serializer { [INFO] [stdout] 371 + impl ser::SerializeMap for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:387:75 [INFO] [stdout] | [INFO] [stdout] 387 | if !self.output.ends_with(' ') && !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:412:6 [INFO] [stdout] | [INFO] [stdout] 412 | impl<'a> ser::SerializeStruct for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 412 - impl<'a> ser::SerializeStruct for &'a mut Serializer { [INFO] [stdout] 412 + impl ser::SerializeStruct for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> pp/src/ser.rs:420:75 [INFO] [stdout] | [INFO] [stdout] 420 | if !self.output.ends_with(' ') && !self.output.ends_with('\n') && self.output.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.output.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> pp/src/ser.rs:436:6 [INFO] [stdout] | [INFO] [stdout] 436 | impl<'a> ser::SerializeStructVariant for &'a mut Serializer { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 436 - impl<'a> ser::SerializeStructVariant for &'a mut Serializer { [INFO] [stdout] 436 + impl ser::SerializeStructVariant for &mut Serializer { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day9.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | if None == find_pairs(target, &nums[i-WINDOW..i]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `find_pairs(target, &nums[i-WINDOW..i]).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day9.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | first = first + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `first += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day9.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | last = last + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `last += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day3.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | / if line_number % slopes[i].1 == 0 { [INFO] [stdout] 15 | | if line[(slopes[i].0 * line_number / slopes[i].1) % width] == '#' as u8 { [INFO] [stdout] 16 | | trees[i] = trees[i] + 1; [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 14 ~ if line_number % slopes[i].1 == 0 [INFO] [stdout] 15 ~ && line[(slopes[i].0 * line_number / slopes[i].1) % width] == '#' as u8 { [INFO] [stdout] 16 | trees[i] = trees[i] + 1; [INFO] [stdout] 17 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day3.rs:15:79 [INFO] [stdout] | [INFO] [stdout] 15 | if line[(slopes[i].0 * line_number / slopes[i].1) % width] == '#' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'#'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day3.rs:16:21 [INFO] [stdout] | [INFO] [stdout] 16 | trees[i] = trees[i] + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `trees[i] += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day3.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | line_number = line_number + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `line_number += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day3.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | let slopes = vec![(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:18:20 [INFO] [stdout] | [INFO] [stdout] 18 | 'N' => north = north + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | 'S' => north = north - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:20:20 [INFO] [stdout] | [INFO] [stdout] 20 | 'E' => east = east + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:21:20 [INFO] [stdout] | [INFO] [stdout] 21 | 'W' => east = east - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | 0 => east = east + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | 90 => north = north + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:27:24 [INFO] [stdout] | [INFO] [stdout] 27 | 180 => east = east - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | 270 => north = north - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:44:20 [INFO] [stdout] | [INFO] [stdout] 44 | 'N' => heading.1 = heading.1 + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.1 += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | 'S' => heading.1 = heading.1 - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.1 -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:46:20 [INFO] [stdout] | [INFO] [stdout] 46 | 'E' => heading.0 = heading.0 + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.0 += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | 'W' => heading.0 = heading.0 - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.0 -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | north = north + n * heading.1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `north += n * heading.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | east = east + n * heading.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `east += n * heading.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:18:20 [INFO] [stdout] | [INFO] [stdout] 18 | 'N' => north = north + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | 'S' => north = north - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:20:20 [INFO] [stdout] | [INFO] [stdout] 20 | 'E' => east = east + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:21:20 [INFO] [stdout] | [INFO] [stdout] 21 | 'W' => east = east - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | 0 => east = east + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | 90 => north = north + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:27:24 [INFO] [stdout] | [INFO] [stdout] 27 | 180 => east = east - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `east -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | 270 => north = north - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `north -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:44:20 [INFO] [stdout] | [INFO] [stdout] 44 | 'N' => heading.1 = heading.1 + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.1 += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | 'S' => heading.1 = heading.1 - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.1 -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:46:20 [INFO] [stdout] | [INFO] [stdout] 46 | 'E' => heading.0 = heading.0 + n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.0 += n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | 'W' => heading.0 = heading.0 - n, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heading.0 -= n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | north = north + n * heading.1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `north += n * heading.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day12.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | east = east + n * heading.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `east += n * heading.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day8.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn run_code(instructions: &Vec<(&str, isize)>) -> (bool, isize) { [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] 41 - fn run_code(instructions: &Vec<(&str, isize)>) -> (bool, isize) { [INFO] [stdout] 41 + fn run_code(instructions: &[(&str, isize)]) -> (bool, isize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:54:26 [INFO] [stdout] | [INFO] [stdout] 54 | "nop" => instruction_pointer = instruction_pointer + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instruction_pointer += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | accumulator = accumulator + instructions[instruction_pointer].1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `accumulator += instructions[instruction_pointer].1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | instruction_pointer = instruction_pointer + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instruction_pointer += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/day13.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | while (time + ids[curr].1) % ids[curr].0 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!(time + ids[curr].1).is_multiple_of(ids[curr].0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day13.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | time = time + step; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `time += step` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day13.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | step = step * ids[curr].0; // all bus ids are prime, otherwise step = lcm(step, ids[curr].0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `step *= ids[curr].0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day13.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | curr = curr + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `curr += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/bin/day2.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | / for line in read_lines("inputs/day2_in.txt")? { [INFO] [stdout] 9 | | if let Ok(line) = line { [INFO] [stdout] 10 | | if check_rule1(&line) { [INFO] [stdout] 11 | | valid.0 = valid.0 + 1; [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/bin/day2.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / if let Ok(line) = line { [INFO] [stdout] 10 | | if check_rule1(&line) { [INFO] [stdout] 11 | | valid.0 = valid.0 + 1; [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 8 ~ for line in read_lines("inputs/day2_in.txt")?.flatten() { [INFO] [stdout] 9 + if check_rule1(&line) { [INFO] [stdout] 10 + valid.0 = valid.0 + 1; [INFO] [stdout] 11 + } [INFO] [stdout] 12 + if check_rule2(&line) { [INFO] [stdout] 13 + valid.1 = valid.1 + 1; [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day2.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | valid.0 = valid.0 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `valid.0 += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day2.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | valid.1 = valid.1 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `valid.1 += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/bin/day11.rs:173:4 [INFO] [stdout] | [INFO] [stdout] 173 | fn print(a: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | counter = counter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day11.rs:52:47 [INFO] [stdout] | [INFO] [stdout] 52 | let occupied = occupant_count(&seats, i, j); [INFO] [stdout] | ^^^^^^ help: change this to: `seats` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day11.rs:64:26 [INFO] [stdout] | [INFO] [stdout] 64 | fn occupant_count(seats: &Vec>, i: usize, j: usize) -> u32 { [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] 64 - fn occupant_count(seats: &Vec>, i: usize, j: usize) -> u32 { [INFO] [stdout] 64 + fn occupant_count(seats: &[Vec], i: usize, j: usize) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day2.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/day13.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | while (time + ids[curr].1) % ids[curr].0 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!(time + ids[curr].1).is_multiple_of(ids[curr].0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day13.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | time = time + step; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `time += step` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day13.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | step = step * ids[curr].0; // all bus ids are prime, otherwise step = lcm(step, ids[curr].0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `step *= ids[curr].0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day13.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | curr = curr + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `curr += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day9.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | if None == find_pairs(target, &nums[i-WINDOW..i]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `find_pairs(target, &nums[i-WINDOW..i]).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day9.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | first = first + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `first += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day9.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | last = last + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `last += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/bin/day2.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | / for line in read_lines("inputs/day2_in.txt")? { [INFO] [stdout] 9 | | if let Ok(line) = line { [INFO] [stdout] 10 | | if check_rule1(&line) { [INFO] [stdout] 11 | | valid.0 = valid.0 + 1; [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/bin/day2.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | / if let Ok(line) = line { [INFO] [stdout] 10 | | if check_rule1(&line) { [INFO] [stdout] 11 | | valid.0 = valid.0 + 1; [INFO] [stdout] ... | [INFO] [stdout] 16 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 8 ~ for line in read_lines("inputs/day2_in.txt")?.flatten() { [INFO] [stdout] 9 + if check_rule1(&line) { [INFO] [stdout] 10 + valid.0 = valid.0 + 1; [INFO] [stdout] 11 + } [INFO] [stdout] 12 + if check_rule2(&line) { [INFO] [stdout] 13 + valid.1 = valid.1 + 1; [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day2.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | valid.0 = valid.0 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `valid.0 += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day2.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | valid.1 = valid.1 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `valid.1 += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day2.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/bin/day11.rs:173:4 [INFO] [stdout] | [INFO] [stdout] 173 | fn print(a: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | counter = counter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day11.rs:52:47 [INFO] [stdout] | [INFO] [stdout] 52 | let occupied = occupant_count(&seats, i, j); [INFO] [stdout] | ^^^^^^ help: change this to: `seats` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day11.rs:64:26 [INFO] [stdout] | [INFO] [stdout] 64 | fn occupant_count(seats: &Vec>, i: usize, j: usize) -> u32 { [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] 64 - fn occupant_count(seats: &Vec>, i: usize, j: usize) -> u32 { [INFO] [stdout] 64 + fn occupant_count(seats: &[Vec], i: usize, j: usize) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | count = count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | di = di + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `di += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day11.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | dj = dj + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `dj += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day3.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | / if line_number % slopes[i].1 == 0 { [INFO] [stdout] 15 | | if line[(slopes[i].0 * line_number / slopes[i].1) % width] == '#' as u8 { [INFO] [stdout] 16 | | trees[i] = trees[i] + 1; [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 14 ~ if line_number % slopes[i].1 == 0 [INFO] [stdout] 15 ~ && line[(slopes[i].0 * line_number / slopes[i].1) % width] == '#' as u8 { [INFO] [stdout] 16 | trees[i] = trees[i] + 1; [INFO] [stdout] 17 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day3.rs:15:79 [INFO] [stdout] | [INFO] [stdout] 15 | if line[(slopes[i].0 * line_number / slopes[i].1) % width] == '#' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'#'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day3.rs:16:21 [INFO] [stdout] | [INFO] [stdout] 16 | trees[i] = trees[i] + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `trees[i] += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day3.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | line_number = line_number + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `line_number += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day3.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | let slopes = vec![(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cid` is never read [INFO] [stdout] --> src/bin/day4.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 8 | struct Passport { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 16 | cid: Option, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Passport` 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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day8.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn run_code(instructions: &Vec<(&str, isize)>) -> (bool, isize) { [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] 41 - fn run_code(instructions: &Vec<(&str, isize)>) -> (bool, isize) { [INFO] [stdout] 41 + fn run_code(instructions: &[(&str, isize)]) -> (bool, isize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:54:26 [INFO] [stdout] | [INFO] [stdout] 54 | "nop" => instruction_pointer = instruction_pointer + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instruction_pointer += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | accumulator = accumulator + instructions[instruction_pointer].1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `accumulator += instructions[instruction_pointer].1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | instruction_pointer = instruction_pointer + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instruction_pointer += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cid` is never read [INFO] [stdout] --> src/bin/day4.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 8 | struct Passport { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 16 | cid: Option, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Passport` 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] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day4.rs:61:28 [INFO] [stdout] | [INFO] [stdout] 61 | if hgt < 150 || hgt > 193 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(150..=193).contains(&hgt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day4.rs:69:28 [INFO] [stdout] | [INFO] [stdout] 69 | if hgt < 59 || hgt > 76 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(59..=76).contains(&hgt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day4.rs:90:22 [INFO] [stdout] | [INFO] [stdout] 90 | let colors = vec!["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day4.rs:61:28 [INFO] [stdout] | [INFO] [stdout] 61 | if hgt < 150 || hgt > 193 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(150..=193).contains(&hgt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day4.rs:69:28 [INFO] [stdout] | [INFO] [stdout] 69 | if hgt < 59 || hgt > 76 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(59..=76).contains(&hgt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day4.rs:90:22 [INFO] [stdout] | [INFO] [stdout] 90 | let colors = vec!["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.58s [INFO] running `Command { std: "docker" "inspect" "e5ad0171359194da9b787965c11fa26bf23a9322b87e4c54b499e3c52892911f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e5ad0171359194da9b787965c11fa26bf23a9322b87e4c54b499e3c52892911f", kill_on_drop: false }` [INFO] [stdout] e5ad0171359194da9b787965c11fa26bf23a9322b87e4c54b499e3c52892911f