[INFO] cloning repository https://github.com/eistaa/AdventOfCode2020 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/eistaa/AdventOfCode2020" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feistaa%2FAdventOfCode2020", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feistaa%2FAdventOfCode2020'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 51f9c1340d414ccd192f26ca0746ebfcfcb9700b [INFO] linting eistaa/AdventOfCode2020 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feistaa%2FAdventOfCode2020" "/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/eistaa/AdventOfCode2020 [INFO] finished tweaking git repo https://github.com/eistaa/AdventOfCode2020 [INFO] tweaked toml for git repo https://github.com/eistaa/AdventOfCode2020 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/eistaa/AdventOfCode2020 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/eistaa/AdventOfCode2020 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] 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] 579654866b588457b0be4332eeb687b3c0d9b4994bc78d0a62a5dfd9783da265 [INFO] running `Command { std: "docker" "start" "-a" "579654866b588457b0be4332eeb687b3c0d9b4994bc78d0a62a5dfd9783da265", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "579654866b588457b0be4332eeb687b3c0d9b4994bc78d0a62a5dfd9783da265", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "579654866b588457b0be4332eeb687b3c0d9b4994bc78d0a62a5dfd9783da265", kill_on_drop: false }` [INFO] [stdout] 579654866b588457b0be4332eeb687b3c0d9b4994bc78d0a62a5dfd9783da265 [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] 25f5717473f7f9a16b5e35c6d9d0fde0bf0866629fb49f4230aef690792f9af3 [INFO] running `Command { std: "docker" "start" "-a" "25f5717473f7f9a16b5e35c6d9d0fde0bf0866629fb49f4230aef690792f9af3", kill_on_drop: false }` [INFO] [stderr] Compiling memchr v2.3.4 [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] Checking regex v1.4.2 [INFO] [stderr] Checking aoc2020 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: fields `edges` and `interior` are never read [INFO] [stdout] --> src/day20.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 182 | struct Classification { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 183 | pub corners: HashSet, [INFO] [stdout] 184 | pub edges: HashSet, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 185 | pub interior: HashSet, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Classification` has derived impls for the traits `Debug` and `Clone`, but these are 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: the loop variable `k` is only used to index `numbers` [INFO] [stdout] --> src/day01.rs:49:26 [INFO] [stdout] | [INFO] [stdout] 49 | for k in 0..numbers.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 49 - for k in 0..numbers.len() { [INFO] [stdout] 49 + for in &numbers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day02.rs:29:23 [INFO] [stdout] | [INFO] [stdout] 29 | char: captures.get(3).unwrap().as_str().chars().nth(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `captures.get(3).unwrap().as_str().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/day02.rs:42:28 [INFO] [stdout] | [INFO] [stdout] 42 | let len: i32 = data [INFO] [stdout] | ____________________________^ [INFO] [stdout] 43 | | .password [INFO] [stdout] 44 | | .chars() [INFO] [stdout] 45 | | .into_iter() [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 42 ~ let len: i32 = data [INFO] [stdout] 43 + .password [INFO] [stdout] 44 + .chars() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day03.rs:38:27 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_feature(landscape: &Vec>, y: usize, x: usize) -> Result { [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] 38 - fn get_feature(landscape: &Vec>, y: usize, x: usize) -> Result { [INFO] [stdout] 38 + fn get_feature(landscape: &[Vec], y: usize, x: usize) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day03.rs:51:39 [INFO] [stdout] | [INFO] [stdout] 51 | .map(|(col, row)| get_feature(&landscape, row, col * dx)) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `landscape` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day04.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | (is_cm && 150 <= height && height <= 193) || (!is_cm && 59 <= height && height <= 76) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&height)` [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/day04.rs:47:73 [INFO] [stdout] | [INFO] [stdout] 47 | (is_cm && 150 <= height && height <= 193) || (!is_cm && 59 <= height && height <= 76) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&height)` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day06.rs:12:18 [INFO] [stdout] | [INFO] [stdout] 12 | .map(|line| line.chars()) [INFO] [stdout] | __________________^ [INFO] [stdout] 13 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|line| line.chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/day07.rs:52:41 [INFO] [stdout] | [INFO] [stdout] 52 | reversed.entry(node.to_owned()).or_insert(Vec::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day07.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let frame = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 78 ~ while let Some(frame) = stack.pop() { [INFO] [stdout] 79 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day07.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | cumulative_weights = cumulative_weights + frame.1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cumulative_weights += frame.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day08.rs:39:25 [INFO] [stdout] | [INFO] [stdout] 39 | fn interpreter(program: &Vec) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 39 - fn interpreter(program: &Vec) -> Result { [INFO] [stdout] 39 + fn interpreter(program: &[Instruction]) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/day08.rs:53:27 [INFO] [stdout] | [INFO] [stdout] 53 | let instruction = *&program[pc as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `program[pc as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day08.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | pc = pc + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `pc += 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/day08.rs:57:36 [INFO] [stdout] | [INFO] [stdout] 57 | Instruction::Acc(v) => accumulator = accumulator + v, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `accumulator += v` [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/day08.rs:64:33 [INFO] [stdout] | [INFO] [stdout] 64 | fn replace_instruction(program: &Vec, idx: usize, instruction: &Instruction) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 64 - fn replace_instruction(program: &Vec, idx: usize, instruction: &Instruction) -> Vec { [INFO] [stdout] 64 + fn replace_instruction(program: &[Instruction], idx: usize, instruction: &Instruction) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day08.rs:78:75 [INFO] [stdout] | [INFO] [stdout] 78 | if let Ok(accumulator) = interpreter(&replace_instruction(&program, i, &Instruction::Nop(*v))) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day08.rs:83:75 [INFO] [stdout] | [INFO] [stdout] 83 | if let Ok(accumulator) = interpreter(&replace_instruction(&program, i, &Instruction::Jmp(*v))) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day09.rs:16:28 [INFO] [stdout] | [INFO] [stdout] 16 | fn find_trailing_sum(data: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn find_trailing_sum(data: &Vec) -> Option { [INFO] [stdout] 16 + fn find_trailing_sum(data: &[i64]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `next` after checking its variant with `is_none` [INFO] [stdout] --> src/day09.rs:46:35 [INFO] [stdout] | [INFO] [stdout] 43 | if next.is_none() { [INFO] [stdout] | ----------------- help: try: `if let Some() = next` [INFO] [stdout] ... [INFO] [stdout] 46 | buffer.push_back(*next.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` 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/day09.rs:27:35 [INFO] [stdout] | [INFO] [stdout] 27 | fn find_encryption_weakness(data: &Vec, target: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - fn find_encryption_weakness(data: &Vec, target: i64) -> Option { [INFO] [stdout] 27 + fn find_encryption_weakness(data: &[i64], target: i64) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/day11.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / impl Default for Cell { [INFO] [stdout] 17 | | fn default() -> Self { [INFO] [stdout] 18 | | Cell::Floor [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 10 + #[derive(Default)] [INFO] [stdout] 11 | enum Cell { [INFO] [stdout] 12 ~ #[default] [INFO] [stdout] 13 ~ Floor, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `edges` and `interior` are never read [INFO] [stdout] --> src/day20.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 182 | struct Classification { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 183 | pub corners: HashSet, [INFO] [stdout] 184 | pub edges: HashSet, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 185 | pub interior: HashSet, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Classification` has derived impls for the traits `Debug` and `Clone`, but these are 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 implementation of an assign operation [INFO] [stdout] --> src/day11.rs:128:21 [INFO] [stdout] | [INFO] [stdout] 128 | x = x + delta.x; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `x += delta.x` [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/day11.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | y = y + delta.y; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `y += delta.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `numbers` [INFO] [stdout] --> src/day01.rs:49:26 [INFO] [stdout] | [INFO] [stdout] 49 | for k in 0..numbers.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 49 - for k in 0..numbers.len() { [INFO] [stdout] 49 + for in &numbers { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | &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: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/day11.rs:205:20 [INFO] [stdout] | [INFO] [stdout] 205 | if grid.adjacent_next(&at).iter().any(|&cell| cell == Some(&Cell::Taken)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid.adjacent_next(&at).contains(&Some(&Cell::Taken))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day02.rs:29:23 [INFO] [stdout] | [INFO] [stdout] 29 | char: captures.get(3).unwrap().as_str().chars().nth(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `captures.get(3).unwrap().as_str().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/day11.rs:241:20 [INFO] [stdout] | [INFO] [stdout] 241 | if grid [INFO] [stdout] | ____________________^ [INFO] [stdout] 242 | | .adjacent_nearest(&at, |&cell| cell != Cell::Floor) [INFO] [stdout] 243 | | .iter() [INFO] [stdout] 244 | | .any(|&cell| cell == Some(&Cell::Taken)) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 241 ~ if grid [INFO] [stdout] 242 + .adjacent_nearest(&at, |&cell| cell != Cell::Floor).contains(&Some(&Cell::Taken)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/day02.rs:42:28 [INFO] [stdout] | [INFO] [stdout] 42 | let len: i32 = data [INFO] [stdout] | ____________________________^ [INFO] [stdout] 43 | | .password [INFO] [stdout] 44 | | .chars() [INFO] [stdout] 45 | | .into_iter() [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 42 ~ let len: i32 = data [INFO] [stdout] 43 + .password [INFO] [stdout] 44 + .chars() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day03.rs:38:27 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_feature(landscape: &Vec>, y: usize, x: usize) -> Result { [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] 38 - fn get_feature(landscape: &Vec>, y: usize, x: usize) -> Result { [INFO] [stdout] 38 + fn get_feature(landscape: &[Vec], y: usize, x: usize) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day03.rs:51:39 [INFO] [stdout] | [INFO] [stdout] 51 | .map(|(col, row)| get_feature(&landscape, row, col * dx)) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `landscape` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:168:70 [INFO] [stdout] | [INFO] [stdout] 168 | let ship = data.iter().fold(ship, |ship, action| ship.update_pt1(&action)); [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:177:70 [INFO] [stdout] | [INFO] [stdout] 177 | let ship = data.iter().fold(ship, |ship, action| ship.update_pt2(&action)); [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [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: accessing first element with `lines.get(0)` [INFO] [stdout] --> src/day13.rs:20:32 [INFO] [stdout] | [INFO] [stdout] 20 | arrival: i64::from_str(lines.get(0).ok_or("Failed to read arrival".to_string())?) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day04.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | (is_cm && 150 <= height && height <= 193) || (!is_cm && 59 <= height && height <= 76) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&height)` [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/day04.rs:47:73 [INFO] [stdout] | [INFO] [stdout] 47 | (is_cm && 150 <= height && height <= 193) || (!is_cm && 59 <= height && height <= 76) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&height)` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day16.rs:25:30 [INFO] [stdout] | [INFO] [stdout] 25 | fn parse(filename: &Path) -> Result<(Vec, Vec, Vec>), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input_blocks.get(0)` [INFO] [stdout] --> src/day16.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | let rules = input_blocks [INFO] [stdout] | _________________^ [INFO] [stdout] 36 | | .get(0) [INFO] [stdout] | |_______________^ help: try: `input_blocks.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day06.rs:12:18 [INFO] [stdout] | [INFO] [stdout] 12 | .map(|line| line.chars()) [INFO] [stdout] | __________________^ [INFO] [stdout] 13 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|line| line.chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day17.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | .map(|(y, line)| { [INFO] [stdout] | __________^ [INFO] [stdout] 13 | | line.chars() [INFO] [stdout] 14 | | .enumerate() [INFO] [stdout] 15 | | .filter(|&(_, cell)| cell == '#') [INFO] [stdout] 16 | | .map(move |(x, _)| (x as i8, y as i8, 0, 0)) [INFO] [stdout] 17 | | }) [INFO] [stdout] 18 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 12 ~ .flat_map(|(y, line)| { [INFO] [stdout] 13 + line.chars() [INFO] [stdout] 14 + .enumerate() [INFO] [stdout] 15 + .filter(|&(_, cell)| cell == '#') [INFO] [stdout] 16 + .map(move |(x, _)| (x as i8, y as i8, 0, 0)) [INFO] [stdout] 17 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/day07.rs:52:41 [INFO] [stdout] | [INFO] [stdout] 52 | reversed.entry(node.to_owned()).or_insert(Vec::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day17.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|coord| neighboring(coord, three)) [INFO] [stdout] | __________^ [INFO] [stdout] 39 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|coord| neighboring(coord, three))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day17.rs:45:25 [INFO] [stdout] | [INFO] [stdout] 45 | (*el).0 |= count == 0; [INFO] [stdout] | ^^^^^ help: try: `el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day17.rs:46:25 [INFO] [stdout] | [INFO] [stdout] 46 | (*el).1 += count; [INFO] [stdout] | ^^^^^ help: try: `el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day07.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let frame = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 78 ~ while let Some(frame) = stack.pop() { [INFO] [stdout] 79 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day17.rs:53:41 [INFO] [stdout] | [INFO] [stdout] 53 | .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 - .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] 53 + .filter(|&(_, (active, count))| !(!active && count != 3 || count != 3 && count != 2)) [INFO] [stdout] | [INFO] [stdout] 53 - .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] 53 + .filter(|&(_, (active, count))| (count == 2 || count == 3) && (count == 3 || active)) [INFO] [stdout] | [INFO] [stdout] 53 - .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] 53 + .filter(|&(_, (active, count))| count == 3 || active && count == 2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day07.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | cumulative_weights = cumulative_weights + frame.1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cumulative_weights += frame.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day08.rs:39:25 [INFO] [stdout] | [INFO] [stdout] 39 | fn interpreter(program: &Vec) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 39 - fn interpreter(program: &Vec) -> Result { [INFO] [stdout] 39 + fn interpreter(program: &[Instruction]) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/day08.rs:53:27 [INFO] [stdout] | [INFO] [stdout] 53 | let instruction = *&program[pc as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `program[pc as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day08.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | pc = pc + 1; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `pc += 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/day08.rs:57:36 [INFO] [stdout] | [INFO] [stdout] 57 | Instruction::Acc(v) => accumulator = accumulator + v, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `accumulator += v` [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/day08.rs:64:33 [INFO] [stdout] | [INFO] [stdout] 64 | fn replace_instruction(program: &Vec, idx: usize, instruction: &Instruction) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 64 - fn replace_instruction(program: &Vec, idx: usize, instruction: &Instruction) -> Vec { [INFO] [stdout] 64 + fn replace_instruction(program: &[Instruction], idx: usize, instruction: &Instruction) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day08.rs:78:75 [INFO] [stdout] | [INFO] [stdout] 78 | if let Ok(accumulator) = interpreter(&replace_instruction(&program, i, &Instruction::Nop(*v))) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day08.rs:83:75 [INFO] [stdout] | [INFO] [stdout] 83 | if let Ok(accumulator) = interpreter(&replace_instruction(&program, i, &Instruction::Jmp(*v))) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:168:39 [INFO] [stdout] | [INFO] [stdout] 168 | .map(|expr| shunting_yard(&expr, |token| { [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:186:39 [INFO] [stdout] | [INFO] [stdout] 186 | .map(|expr| shunting_yard(&expr, |token| { [INFO] [stdout] | ^^^^^ help: change this to: `expr` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day09.rs:16:28 [INFO] [stdout] | [INFO] [stdout] 16 | fn find_trailing_sum(data: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn find_trailing_sum(data: &Vec) -> Option { [INFO] [stdout] 16 + fn find_trailing_sum(data: &[i64]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `next` after checking its variant with `is_none` [INFO] [stdout] --> src/day09.rs:46:35 [INFO] [stdout] | [INFO] [stdout] 43 | if next.is_none() { [INFO] [stdout] | ----------------- help: try: `if let Some() = next` [INFO] [stdout] ... [INFO] [stdout] 46 | buffer.push_back(*next.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` 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/day09.rs:27:35 [INFO] [stdout] | [INFO] [stdout] 27 | fn find_encryption_weakness(data: &Vec, target: i64) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - fn find_encryption_weakness(data: &Vec, target: i64) -> Option { [INFO] [stdout] 27 + fn find_encryption_weakness(data: &[i64], target: i64) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/day11.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | / impl Default for Cell { [INFO] [stdout] 17 | | fn default() -> Self { [INFO] [stdout] 18 | | Cell::Floor [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 10 + #[derive(Default)] [INFO] [stdout] 11 | enum Cell { [INFO] [stdout] 12 ~ #[default] [INFO] [stdout] 13 ~ Floor, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:128:21 [INFO] [stdout] | [INFO] [stdout] 128 | x = x + delta.x; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `x += delta.x` [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/day11.rs:129:21 [INFO] [stdout] | [INFO] [stdout] 129 | y = y + delta.y; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `y += delta.y` [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] --> src/day11.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | &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: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/day11.rs:205:20 [INFO] [stdout] | [INFO] [stdout] 205 | if grid.adjacent_next(&at).iter().any(|&cell| cell == Some(&Cell::Taken)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid.adjacent_next(&at).contains(&Some(&Cell::Taken))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/day11.rs:241:20 [INFO] [stdout] | [INFO] [stdout] 241 | if grid [INFO] [stdout] | ____________________^ [INFO] [stdout] 242 | | .adjacent_nearest(&at, |&cell| cell != Cell::Floor) [INFO] [stdout] 243 | | .iter() [INFO] [stdout] 244 | | .any(|&cell| cell == Some(&Cell::Taken)) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 241 ~ if grid [INFO] [stdout] 242 + .adjacent_nearest(&at, |&cell| cell != Cell::Floor).contains(&Some(&Cell::Taken)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:103:44 [INFO] [stdout] | [INFO] [stdout] 103 | if !processed.contains_key(&r1) { [INFO] [stdout] | ^^^ help: change this to: `r1` [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: useless use of `format!` [INFO] [stdout] --> src/day19.rs:107:42 [INFO] [stdout] | [INFO] [stdout] 107 | processed.insert(id, format!("{}", processed.get(r1).unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `processed.get(r1).unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` 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/day19.rs:111:44 [INFO] [stdout] | [INFO] [stdout] 111 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:111:76 [INFO] [stdout] | [INFO] [stdout] 111 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:112:48 [INFO] [stdout] | [INFO] [stdout] 112 | if !processed.contains_key(&r1) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:115:48 [INFO] [stdout] | [INFO] [stdout] 115 | if !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:127:44 [INFO] [stdout] | [INFO] [stdout] 127 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:127:76 [INFO] [stdout] | [INFO] [stdout] 127 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:128:48 [INFO] [stdout] | [INFO] [stdout] 128 | if !processed.contains_key(&r1) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:131:48 [INFO] [stdout] | [INFO] [stdout] 131 | if !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:143:44 [INFO] [stdout] | [INFO] [stdout] 143 | if !processed.contains_key(&r11) [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:144:48 [INFO] [stdout] | [INFO] [stdout] 144 | || !processed.contains_key(&r12) [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:145:48 [INFO] [stdout] | [INFO] [stdout] 145 | || !processed.contains_key(&r21) [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:146:48 [INFO] [stdout] | [INFO] [stdout] 146 | || !processed.contains_key(&r22) [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:148:48 [INFO] [stdout] | [INFO] [stdout] 148 | if !processed.contains_key(&r11) { [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:151:48 [INFO] [stdout] | [INFO] [stdout] 151 | if !processed.contains_key(&r12) { [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:154:48 [INFO] [stdout] | [INFO] [stdout] 154 | if !processed.contains_key(&r21) { [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:157:48 [INFO] [stdout] | [INFO] [stdout] 157 | if !processed.contains_key(&r22) { [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:168:70 [INFO] [stdout] | [INFO] [stdout] 168 | let ship = data.iter().fold(ship, |ship, action| ship.update_pt1(&action)); [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:175:44 [INFO] [stdout] | [INFO] [stdout] 175 | if !processed.contains_key(&r11) [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:176:48 [INFO] [stdout] | [INFO] [stdout] 176 | || !processed.contains_key(&r21) [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:177:49 [INFO] [stdout] | [INFO] [stdout] 177 | || (!processed.contains_key(&r22) && *r22 != id) [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:177:70 [INFO] [stdout] | [INFO] [stdout] 177 | let ship = data.iter().fold(ship, |ship, action| ship.update_pt2(&action)); [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:179:48 [INFO] [stdout] | [INFO] [stdout] 179 | if !processed.contains_key(&r11) { [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:182:48 [INFO] [stdout] | [INFO] [stdout] 182 | if !processed.contains_key(&r21) { [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:185:48 [INFO] [stdout] | [INFO] [stdout] 185 | if !processed.contains_key(&r22) && *r22 != id { [INFO] [stdout] | ^^^^ help: change this to: `r22` [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: accessing first element with `lines.get(0)` [INFO] [stdout] --> src/day13.rs:20:32 [INFO] [stdout] | [INFO] [stdout] 20 | arrival: i64::from_str(lines.get(0).ok_or("Failed to read arrival".to_string())?) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` 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/day19.rs:213:44 [INFO] [stdout] | [INFO] [stdout] 213 | if !processed.contains_key(&r11) [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:214:49 [INFO] [stdout] | [INFO] [stdout] 214 | || (!processed.contains_key(&r12) && *r12 != id) [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:215:48 [INFO] [stdout] | [INFO] [stdout] 215 | || !processed.contains_key(&r21) [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:216:49 [INFO] [stdout] | [INFO] [stdout] 216 | || (!processed.contains_key(&r22) && *r22 != id) [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:217:49 [INFO] [stdout] | [INFO] [stdout] 217 | || (!processed.contains_key(&r23) && *r23 != id) [INFO] [stdout] | ^^^^ help: change this to: `r23` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:219:48 [INFO] [stdout] | [INFO] [stdout] 219 | if !processed.contains_key(&r11) { [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:222:48 [INFO] [stdout] | [INFO] [stdout] 222 | if !processed.contains_key(&r12) && *r12 != id { [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:225:48 [INFO] [stdout] | [INFO] [stdout] 225 | if !processed.contains_key(&r21) { [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:228:48 [INFO] [stdout] | [INFO] [stdout] 228 | if !processed.contains_key(&r22) && *r22 != id { [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:231:48 [INFO] [stdout] | [INFO] [stdout] 231 | if !processed.contains_key(&r23) && *r23 != id { [INFO] [stdout] | ^^^^ help: change this to: `r23` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `map()` won't have an effect on the call to `count()` [INFO] [stdout] --> src/day19.rs:306:9 [INFO] [stdout] | [INFO] [stdout] 306 | text.iter().filter(|line| re.is_match(line)).map(|line| line).count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_map [INFO] [stdout] = note: `#[warn(clippy::suspicious_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/day19.rs:306:53 [INFO] [stdout] | [INFO] [stdout] 306 | text.iter().filter(|line| re.is_match(line)).map(|line| line).count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day16.rs:25:30 [INFO] [stdout] | [INFO] [stdout] 25 | fn parse(filename: &Path) -> Result<(Vec, Vec, Vec>), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input_blocks.get(0)` [INFO] [stdout] --> src/day16.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | let rules = input_blocks [INFO] [stdout] | _________________^ [INFO] [stdout] 36 | | .get(0) [INFO] [stdout] | |_______________^ help: try: `input_blocks.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day17.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | .map(|(y, line)| { [INFO] [stdout] | __________^ [INFO] [stdout] 13 | | line.chars() [INFO] [stdout] 14 | | .enumerate() [INFO] [stdout] 15 | | .filter(|&(_, cell)| cell == '#') [INFO] [stdout] 16 | | .map(move |(x, _)| (x as i8, y as i8, 0, 0)) [INFO] [stdout] 17 | | }) [INFO] [stdout] 18 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 12 ~ .flat_map(|(y, line)| { [INFO] [stdout] 13 + line.chars() [INFO] [stdout] 14 + .enumerate() [INFO] [stdout] 15 + .filter(|&(_, cell)| cell == '#') [INFO] [stdout] 16 + .map(move |(x, _)| (x as i8, y as i8, 0, 0)) [INFO] [stdout] 17 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day17.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|coord| neighboring(coord, three)) [INFO] [stdout] | __________^ [INFO] [stdout] 39 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|coord| neighboring(coord, three))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day17.rs:45:25 [INFO] [stdout] | [INFO] [stdout] 45 | (*el).0 |= count == 0; [INFO] [stdout] | ^^^^^ help: try: `el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day17.rs:46:25 [INFO] [stdout] | [INFO] [stdout] 46 | (*el).1 += count; [INFO] [stdout] | ^^^^^ help: try: `el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day17.rs:53:41 [INFO] [stdout] | [INFO] [stdout] 53 | .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 - .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] 53 + .filter(|&(_, (active, count))| !(!active && count != 3 || count != 3 && count != 2)) [INFO] [stdout] | [INFO] [stdout] 53 - .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] 53 + .filter(|&(_, (active, count))| (count == 2 || count == 3) && (count == 3 || active)) [INFO] [stdout] | [INFO] [stdout] 53 - .filter(|&(_, (active, count))| (!active && count == 3) || (active && (count == 2 || count == 3))) [INFO] [stdout] 53 + .filter(|&(_, (active, count))| count == 3 || active && count == 2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `assembly.get(0)` [INFO] [stdout] --> src/day20.rs:389:30 [INFO] [stdout] | [INFO] [stdout] 389 | let mut line_1 = assembly.get(0).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `assembly.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/day20.rs:408:46 [INFO] [stdout] | [INFO] [stdout] 408 | ... re_1.replace(&line_1[range.clone()].to_owned(), repl_1.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&line_1[range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/day20.rs:413:46 [INFO] [stdout] | [INFO] [stdout] 413 | ... re_2.replace(&line_2[range.clone()].to_owned(), repl_2.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&line_2[range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/day20.rs:418:46 [INFO] [stdout] | [INFO] [stdout] 418 | ... re_3.replace(&line_3[range.clone()].to_owned(), repl_3.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&line_3[range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | if value < 0 || 25 < value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=25).contains(&value)` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:168:39 [INFO] [stdout] | [INFO] [stdout] 168 | .map(|expr| shunting_yard(&expr, |token| { [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:186:39 [INFO] [stdout] | [INFO] [stdout] 186 | .map(|expr| shunting_yard(&expr, |token| { [INFO] [stdout] | ^^^^^ help: change this to: `expr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:103:44 [INFO] [stdout] | [INFO] [stdout] 103 | if !processed.contains_key(&r1) { [INFO] [stdout] | ^^^ help: change this to: `r1` [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: useless use of `format!` [INFO] [stdout] --> src/day19.rs:107:42 [INFO] [stdout] | [INFO] [stdout] 107 | processed.insert(id, format!("{}", processed.get(r1).unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `processed.get(r1).unwrap().to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` 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/day19.rs:111:44 [INFO] [stdout] | [INFO] [stdout] 111 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:111:76 [INFO] [stdout] | [INFO] [stdout] 111 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:112:48 [INFO] [stdout] | [INFO] [stdout] 112 | if !processed.contains_key(&r1) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:115:48 [INFO] [stdout] | [INFO] [stdout] 115 | if !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:127:44 [INFO] [stdout] | [INFO] [stdout] 127 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:127:76 [INFO] [stdout] | [INFO] [stdout] 127 | if !processed.contains_key(&r1) || !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:128:48 [INFO] [stdout] | [INFO] [stdout] 128 | if !processed.contains_key(&r1) { [INFO] [stdout] | ^^^ help: change this to: `r1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:131:48 [INFO] [stdout] | [INFO] [stdout] 131 | if !processed.contains_key(&r2) { [INFO] [stdout] | ^^^ help: change this to: `r2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:143:44 [INFO] [stdout] | [INFO] [stdout] 143 | if !processed.contains_key(&r11) [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:144:48 [INFO] [stdout] | [INFO] [stdout] 144 | || !processed.contains_key(&r12) [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:145:48 [INFO] [stdout] | [INFO] [stdout] 145 | || !processed.contains_key(&r21) [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:146:48 [INFO] [stdout] | [INFO] [stdout] 146 | || !processed.contains_key(&r22) [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:148:48 [INFO] [stdout] | [INFO] [stdout] 148 | if !processed.contains_key(&r11) { [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:151:48 [INFO] [stdout] | [INFO] [stdout] 151 | if !processed.contains_key(&r12) { [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:154:48 [INFO] [stdout] | [INFO] [stdout] 154 | if !processed.contains_key(&r21) { [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:157:48 [INFO] [stdout] | [INFO] [stdout] 157 | if !processed.contains_key(&r22) { [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:175:44 [INFO] [stdout] | [INFO] [stdout] 175 | if !processed.contains_key(&r11) [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:176:48 [INFO] [stdout] | [INFO] [stdout] 176 | || !processed.contains_key(&r21) [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:177:49 [INFO] [stdout] | [INFO] [stdout] 177 | || (!processed.contains_key(&r22) && *r22 != id) [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:179:48 [INFO] [stdout] | [INFO] [stdout] 179 | if !processed.contains_key(&r11) { [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:182:48 [INFO] [stdout] | [INFO] [stdout] 182 | if !processed.contains_key(&r21) { [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:185:48 [INFO] [stdout] | [INFO] [stdout] 185 | if !processed.contains_key(&r22) && *r22 != id { [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:213:44 [INFO] [stdout] | [INFO] [stdout] 213 | if !processed.contains_key(&r11) [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:214:49 [INFO] [stdout] | [INFO] [stdout] 214 | || (!processed.contains_key(&r12) && *r12 != id) [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:215:48 [INFO] [stdout] | [INFO] [stdout] 215 | || !processed.contains_key(&r21) [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:216:49 [INFO] [stdout] | [INFO] [stdout] 216 | || (!processed.contains_key(&r22) && *r22 != id) [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:217:49 [INFO] [stdout] | [INFO] [stdout] 217 | || (!processed.contains_key(&r23) && *r23 != id) [INFO] [stdout] | ^^^^ help: change this to: `r23` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:219:48 [INFO] [stdout] | [INFO] [stdout] 219 | if !processed.contains_key(&r11) { [INFO] [stdout] | ^^^^ help: change this to: `r11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:222:48 [INFO] [stdout] | [INFO] [stdout] 222 | if !processed.contains_key(&r12) && *r12 != id { [INFO] [stdout] | ^^^^ help: change this to: `r12` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:225:48 [INFO] [stdout] | [INFO] [stdout] 225 | if !processed.contains_key(&r21) { [INFO] [stdout] | ^^^^ help: change this to: `r21` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:228:48 [INFO] [stdout] | [INFO] [stdout] 228 | if !processed.contains_key(&r22) && *r22 != id { [INFO] [stdout] | ^^^^ help: change this to: `r22` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:231:48 [INFO] [stdout] | [INFO] [stdout] 231 | if !processed.contains_key(&r23) && *r23 != id { [INFO] [stdout] | ^^^^ help: change this to: `r23` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `map()` won't have an effect on the call to `count()` [INFO] [stdout] --> src/day19.rs:306:9 [INFO] [stdout] | [INFO] [stdout] 306 | text.iter().filter(|line| re.is_match(line)).map(|line| line).count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_map [INFO] [stdout] = note: `#[warn(clippy::suspicious_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/day19.rs:306:53 [INFO] [stdout] | [INFO] [stdout] 306 | text.iter().filter(|line| re.is_match(line)).map(|line| line).count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `assembly.get(0)` [INFO] [stdout] --> src/day20.rs:389:30 [INFO] [stdout] | [INFO] [stdout] 389 | let mut line_1 = assembly.get(0).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `assembly.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/day20.rs:408:46 [INFO] [stdout] | [INFO] [stdout] 408 | ... re_1.replace(&line_1[range.clone()].to_owned(), repl_1.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&line_1[range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/day20.rs:413:46 [INFO] [stdout] | [INFO] [stdout] 413 | ... re_2.replace(&line_2[range.clone()].to_owned(), repl_2.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&line_2[range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> src/day20.rs:418:46 [INFO] [stdout] | [INFO] [stdout] 418 | ... re_3.replace(&line_3[range.clone()].to_owned(), repl_3.as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&line_3[range.clone()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | if value < 0 || 25 < value { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=25).contains(&value)` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.09s [INFO] running `Command { std: "docker" "inspect" "25f5717473f7f9a16b5e35c6d9d0fde0bf0866629fb49f4230aef690792f9af3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "25f5717473f7f9a16b5e35c6d9d0fde0bf0866629fb49f4230aef690792f9af3", kill_on_drop: false }` [INFO] [stdout] 25f5717473f7f9a16b5e35c6d9d0fde0bf0866629fb49f4230aef690792f9af3