[INFO] cloning repository https://github.com/Martinif/adventofcode2022 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Martinif/adventofcode2022" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMartinif%2Fadventofcode2022", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMartinif%2Fadventofcode2022'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 498c766d80cc2bdd3a243d0772a2cd937ee2d495 [INFO] linting Martinif/adventofcode2022 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMartinif%2Fadventofcode2022" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Martinif/adventofcode2022 [INFO] finished tweaking git repo https://github.com/Martinif/adventofcode2022 [INFO] tweaked toml for git repo https://github.com/Martinif/adventofcode2022 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Martinif/adventofcode2022 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/Martinif/adventofcode2022 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-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 99bdbc3a446f171f25e08ca938dce05338f3f9920fcca66b67449476a336c0ed [INFO] running `Command { std: "docker" "start" "-a" "99bdbc3a446f171f25e08ca938dce05338f3f9920fcca66b67449476a336c0ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "99bdbc3a446f171f25e08ca938dce05338f3f9920fcca66b67449476a336c0ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "99bdbc3a446f171f25e08ca938dce05338f3f9920fcca66b67449476a336c0ed", kill_on_drop: false }` [INFO] [stdout] 99bdbc3a446f171f25e08ca938dce05338f3f9920fcca66b67449476a336c0ed [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] a21f02a15b22de0b79a95f86a72448544203a53f9598f78e44e7283b0d4b08f0 [INFO] running `Command { std: "docker" "start" "-a" "a21f02a15b22de0b79a95f86a72448544203a53f9598f78e44e7283b0d4b08f0", kill_on_drop: false }` [INFO] [stderr] Compiling serde v1.0.151 [INFO] [stderr] Compiling serde_json v1.0.89 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking adventofcode2022 v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/bin/day07.rs:114:29 [INFO] [stdout] | [INFO] [stdout] 114 | .filter(|n| (n.borrow().name == dirname)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 114 - .filter(|n| (n.borrow().name == dirname)) [INFO] [stdout] 114 + .filter(|n| n.borrow().name == dirname ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day07.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / return Node { [INFO] [stdout] 34 | | size, [INFO] [stdout] 35 | | name, [INFO] [stdout] 36 | | parent, [INFO] [stdout] 37 | | children: vec![], [INFO] [stdout] 38 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 33 ~ Node { [INFO] [stdout] 34 + size, [INFO] [stdout] 35 + name, [INFO] [stdout] 36 + parent, [INFO] [stdout] 37 + children: vec![], [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day07.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - if self.children.is_empty() { // file sizes do not change [INFO] [stdout] 59 - return; [INFO] [stdout] 58 + if self.children.is_empty() { // file sizes do not change [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day07.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 69 - return 0; [INFO] [stdout] 69 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/bin/day07.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | current = Rc::clone(current_clone.borrow().children.iter() [INFO] [stdout] | _________________________________^ [INFO] [stdout] 114 | | .filter(|n| (n.borrow().name == dirname)) [INFO] [stdout] 115 | | .next() [INFO] [stdout] | |_______________________^ help: try: `current_clone.borrow().children.iter().find(|n| (n.borrow().name == dirname))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | "A Z" => 0 + 3, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | "B X" => 0 + 1, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | "C Y" => 0 + 2, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | "A X" => 0 + 3, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | "B X" => 0 + 1, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | "C X" => 0 + 2, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day02.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn part1(input: &String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn part1(input: &String) -> i32 { [INFO] [stdout] 35 + fn part1(input: &str) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day02.rs:37:14 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|l| game2points_part1(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `game2points_part1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day02.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | fn part2(input: &String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 41 - fn part2(input: &String) -> i32 { [INFO] [stdout] 41 + fn part2(input: &str) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day02.rs:43:14 [INFO] [stdout] | [INFO] [stdout] 43 | .map(|l| game2points_part2(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `game2points_part2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:16:30 [INFO] [stdout] | [INFO] [stdout] 16 | Value::Number(n) => {return Number(n.as_i64().unwrap() as i32)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 16 - Value::Number(n) => {return Number(n.as_i64().unwrap() as i32)} [INFO] [stdout] 16 + Value::Number(n) => {Number(n.as_i64().unwrap() as i32)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day13.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | .map(|m|parse(m)) [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the function itself: `parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:39:50 [INFO] [stdout] | [INFO] [stdout] 39 | (Number(n1), Number(n2)) if n1 < n2 => { return Some(true)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 - (Number(n1), Number(n2)) if n1 < n2 => { return Some(true)} [INFO] [stdout] 39 + (Number(n1), Number(n2)) if n1 < n2 => { Some(true)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:40:50 [INFO] [stdout] | [INFO] [stdout] 40 | (Number(n1), Number(n2)) if n1 == n2 => {return None} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 40 - (Number(n1), Number(n2)) if n1 == n2 => {return None} [INFO] [stdout] 40 + (Number(n1), Number(n2)) if n1 == n2 => {None} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:41:50 [INFO] [stdout] | [INFO] [stdout] 41 | (Number(n1), Number(n2)) if n1 > n2 => { return Some(false)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - (Number(n1), Number(n2)) if n1 > n2 => { return Some(false)} [INFO] [stdout] 41 + (Number(n1), Number(n2)) if n1 > n2 => { Some(false)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:42:78 [INFO] [stdout] | [INFO] [stdout] 42 | (List {l:l1 }, List {l:l2 }) if l1.is_empty() && !l2.is_empty() => { return Some(true)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - (List {l:l1 }, List {l:l2 }) if l1.is_empty() && !l2.is_empty() => { return Some(true)} [INFO] [stdout] 42 + (List {l:l1 }, List {l:l2 }) if l1.is_empty() && !l2.is_empty() => { Some(true)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:43:78 [INFO] [stdout] | [INFO] [stdout] 43 | (List {l:l1 }, List {l:l2 }) if !l1.is_empty() && l2.is_empty() => { return Some(false)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 43 - (List {l:l1 }, List {l:l2 }) if !l1.is_empty() && l2.is_empty() => { return Some(false)} [INFO] [stdout] 43 + (List {l:l1 }, List {l:l2 }) if !l1.is_empty() && l2.is_empty() => { Some(false)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:51:51 [INFO] [stdout] | [INFO] [stdout] 51 | if !(l1.is_empty() && l2.is_empty()) {return isrightorder(List {l:l1}, List {l:l2});} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - if !(l1.is_empty() && l2.is_empty()) {return isrightorder(List {l:l1}, List {l:l2});} [INFO] [stdout] 51 + if !(l1.is_empty() && l2.is_empty()) {isrightorder(List {l:l1}, List {l:l2})} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | else { return None } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - else { return None } [INFO] [stdout] 52 + else { None } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:54:41 [INFO] [stdout] | [INFO] [stdout] 54 | (List {l:l1 }, Number(n2)) => { return isrightorder(List {l:l1}, List {l: VecDeque::from(vec![Number(n2)])})} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 54 - (List {l:l1 }, Number(n2)) => { return isrightorder(List {l:l1}, List {l: VecDeque::from(vec![Number(n2)])})} [INFO] [stdout] 54 + (List {l:l1 }, Number(n2)) => { isrightorder(List {l:l1}, List {l: VecDeque::from(vec![Number(n2)])})} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:55:40 [INFO] [stdout] | [INFO] [stdout] 55 | (Number(n1), List {l:l2}) => { return isrightorder(List {l: VecDeque::from(vec![Number(n1)])}, List {l: l2})} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 55 - (Number(n1), List {l:l2}) => { return isrightorder(List {l: VecDeque::from(vec![Number(n1)])}, List {l: l2})} [INFO] [stdout] 55 + (Number(n1), List {l:l2}) => { isrightorder(List {l: VecDeque::from(vec![Number(n1)])}, List {l: l2})} [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/bin/day13.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | fn part1(pairs: &Vec<(Entry, Entry)> ) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 61 - fn part1(pairs: &Vec<(Entry, Entry)> ) -> i32 { [INFO] [stdout] 61 + fn part1(pairs: &[(Entry, Entry)] ) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13.rs:69:17 [INFO] [stdout] | [INFO] [stdout] 69 | fn part2(pairs: &Vec<(Entry, Entry)>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 69 - fn part2(pairs: &Vec<(Entry, Entry)>) -> i32 { [INFO] [stdout] 69 + fn part2(pairs: &[(Entry, Entry)]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day13.rs:74:47 [INFO] [stdout] | [INFO] [stdout] 74 | let mut flattened : Vec<_> = pairs.iter().map(|(e1,e2)|vec![e1,e2]).flatten().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(e1,e2)|vec![e1,e2])` [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:16:30 [INFO] [stdout] | [INFO] [stdout] 16 | Value::Number(n) => {return Number(n.as_i64().unwrap() as i32)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 16 - Value::Number(n) => {return Number(n.as_i64().unwrap() as i32)} [INFO] [stdout] 16 + Value::Number(n) => {Number(n.as_i64().unwrap() as i32)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day13.rs:70:19 [INFO] [stdout] | [INFO] [stdout] 70 | let divider = vec![ [INFO] [stdout] | ___________________^ [INFO] [stdout] 71 | | List {l: VecDeque::from([List {l: VecDeque::from([Number(2)])}])}, [INFO] [stdout] 72 | | List {l: VecDeque::from([List {l: VecDeque::from([Number(6)])}])}, [INFO] [stdout] 73 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 70 ~ let divider = [List {l: VecDeque::from([List {l: VecDeque::from([Number(2)])}])}, [INFO] [stdout] 71 ~ List {l: VecDeque::from([List {l: VecDeque::from([Number(6)])}])}]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day13.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | .map(|m|parse(m)) [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the function itself: `parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:39:50 [INFO] [stdout] | [INFO] [stdout] 39 | (Number(n1), Number(n2)) if n1 < n2 => { return Some(true)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 - (Number(n1), Number(n2)) if n1 < n2 => { return Some(true)} [INFO] [stdout] 39 + (Number(n1), Number(n2)) if n1 < n2 => { Some(true)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:40:50 [INFO] [stdout] | [INFO] [stdout] 40 | (Number(n1), Number(n2)) if n1 == n2 => {return None} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 40 - (Number(n1), Number(n2)) if n1 == n2 => {return None} [INFO] [stdout] 40 + (Number(n1), Number(n2)) if n1 == n2 => {None} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:41:50 [INFO] [stdout] | [INFO] [stdout] 41 | (Number(n1), Number(n2)) if n1 > n2 => { return Some(false)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - (Number(n1), Number(n2)) if n1 > n2 => { return Some(false)} [INFO] [stdout] 41 + (Number(n1), Number(n2)) if n1 > n2 => { Some(false)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:42:78 [INFO] [stdout] | [INFO] [stdout] 42 | (List {l:l1 }, List {l:l2 }) if l1.is_empty() && !l2.is_empty() => { return Some(true)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - (List {l:l1 }, List {l:l2 }) if l1.is_empty() && !l2.is_empty() => { return Some(true)} [INFO] [stdout] 42 + (List {l:l1 }, List {l:l2 }) if l1.is_empty() && !l2.is_empty() => { Some(true)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:43:78 [INFO] [stdout] | [INFO] [stdout] 43 | (List {l:l1 }, List {l:l2 }) if !l1.is_empty() && l2.is_empty() => { return Some(false)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 43 - (List {l:l1 }, List {l:l2 }) if !l1.is_empty() && l2.is_empty() => { return Some(false)} [INFO] [stdout] 43 + (List {l:l1 }, List {l:l2 }) if !l1.is_empty() && l2.is_empty() => { Some(false)} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:51:51 [INFO] [stdout] | [INFO] [stdout] 51 | if !(l1.is_empty() && l2.is_empty()) {return isrightorder(List {l:l1}, List {l:l2});} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - if !(l1.is_empty() && l2.is_empty()) {return isrightorder(List {l:l1}, List {l:l2});} [INFO] [stdout] 51 + if !(l1.is_empty() && l2.is_empty()) {isrightorder(List {l:l1}, List {l:l2})} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | else { return None } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - else { return None } [INFO] [stdout] 52 + else { None } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:54:41 [INFO] [stdout] | [INFO] [stdout] 54 | (List {l:l1 }, Number(n2)) => { return isrightorder(List {l:l1}, List {l: VecDeque::from(vec![Number(n2)])})} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 54 - (List {l:l1 }, Number(n2)) => { return isrightorder(List {l:l1}, List {l: VecDeque::from(vec![Number(n2)])})} [INFO] [stdout] 54 + (List {l:l1 }, Number(n2)) => { isrightorder(List {l:l1}, List {l: VecDeque::from(vec![Number(n2)])})} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day13.rs:55:40 [INFO] [stdout] | [INFO] [stdout] 55 | (Number(n1), List {l:l2}) => { return isrightorder(List {l: VecDeque::from(vec![Number(n1)])}, List {l: l2})} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 55 - (Number(n1), List {l:l2}) => { return isrightorder(List {l: VecDeque::from(vec![Number(n1)])}, List {l: l2})} [INFO] [stdout] 55 + (Number(n1), List {l:l2}) => { isrightorder(List {l: VecDeque::from(vec![Number(n1)])}, List {l: l2})} [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/bin/day13.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | fn part1(pairs: &Vec<(Entry, Entry)> ) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 61 - fn part1(pairs: &Vec<(Entry, Entry)> ) -> i32 { [INFO] [stdout] 61 + fn part1(pairs: &[(Entry, Entry)] ) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13.rs:69:17 [INFO] [stdout] | [INFO] [stdout] 69 | fn part2(pairs: &Vec<(Entry, Entry)>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 69 - fn part2(pairs: &Vec<(Entry, Entry)>) -> i32 { [INFO] [stdout] 69 + fn part2(pairs: &[(Entry, Entry)]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day13.rs:74:47 [INFO] [stdout] | [INFO] [stdout] 74 | let mut flattened : Vec<_> = pairs.iter().map(|(e1,e2)|vec![e1,e2]).flatten().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(e1,e2)|vec![e1,e2])` [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: useless use of `vec!` [INFO] [stdout] --> src/bin/day13.rs:70:19 [INFO] [stdout] | [INFO] [stdout] 70 | let divider = vec![ [INFO] [stdout] | ___________________^ [INFO] [stdout] 71 | | List {l: VecDeque::from([List {l: VecDeque::from([Number(2)])}])}, [INFO] [stdout] 72 | | List {l: VecDeque::from([List {l: VecDeque::from([Number(6)])}])}, [INFO] [stdout] 73 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 70 ~ let divider = [List {l: VecDeque::from([List {l: VecDeque::from([Number(2)])}])}, [INFO] [stdout] 71 ~ List {l: VecDeque::from([List {l: VecDeque::from([Number(6)])}])}]; [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/bin/day08.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | fn part1(forest: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - fn part1(forest: &Vec>) -> usize { [INFO] [stdout] 11 + fn part1(forest: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day08.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | fn part2(forest: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - fn part2(forest: &Vec>) -> usize { [INFO] [stdout] 27 + fn part2(forest: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day06.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | fn solver(message: &Vec, marker_len: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn solver(message: &Vec, marker_len: usize) -> usize { [INFO] [stdout] 19 + fn solver(message: &[char], marker_len: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day01.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | fn part1(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn part1(input: &Vec) -> i32 { [INFO] [stdout] 12 + fn part1(input: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day01.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | fn part2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn part2(input: &Vec) -> i32 { [INFO] [stdout] 16 + fn part2(input: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/day12.rs:16:21 [INFO] [stdout] | [INFO] [stdout] 16 | node_connected: fn((usize, usize), (usize, usize), &Vec>) -> bool) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/day12.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | -> (HashMap<(usize, usize), Vec<(usize, usize)>>, (usize, usize), (usize, usize)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/bin/day12.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | for j in 0..map[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 25 - for j in 0..map[0].len() { [INFO] [stdout] 25 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/bin/day12.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let node = waitlist.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] 34 ~ while let Some(node) = waitlist.pop() { [INFO] [stdout] 35 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&node).is_none()` [INFO] [stdout] --> src/bin/day12.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | if graph.get(&node).is_none() { [INFO] [stdout] | ------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!graph.contains_key(&node)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12.rs:39:74 [INFO] [stdout] | [INFO] [stdout] 39 | if node.0 != 0 && node_connected(node, (node.0 - 1, node.1), &map) { neighbours.push((node.0 - 1, node.1)) } // up [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:40:74 [INFO] [stdout] | [INFO] [stdout] 40 | if node.1 != 0 && node_connected(node, (node.0, node.1 - 1), &map) { neighbours.push((node.0, node.1 - 1)) } // left [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:41:86 [INFO] [stdout] | [INFO] [stdout] 41 | ... if node.0 != map.len() - 1 && node_connected(node, (node.0 + 1, node.1), &map) { neighbours.push((node.0 + 1, node.1)) } // down [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:42:89 [INFO] [stdout] | [INFO] [stdout] 42 | ... if node.1 != map[0].len() - 1 && node_connected(node, (node.0, node.1 + 1), &map) { neighbours.push((node.0, node.1 + 1)) } //... [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:53:71 [INFO] [stdout] | [INFO] [stdout] 53 | fn nodes_connected(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [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] 53 - fn nodes_connected(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [INFO] [stdout] 53 + fn nodes_connected(node1: (usize, usize), node2: (usize, usize), map: &[Vec]) -> bool { [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/bin/day12.rs:59:79 [INFO] [stdout] | [INFO] [stdout] 59 | fn nodes_connected_inverse(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [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] 59 - fn nodes_connected_inverse(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [INFO] [stdout] 59 + fn nodes_connected_inverse(node1: (usize, usize), node2: (usize, usize), map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12.rs:77:42 [INFO] [stdout] | [INFO] [stdout] 77 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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/bin/day12.rs:77:69 [INFO] [stdout] | [INFO] [stdout] 77 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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/bin/day12.rs:97:42 [INFO] [stdout] | [INFO] [stdout] 97 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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/bin/day12.rs:97:69 [INFO] [stdout] | [INFO] [stdout] 97 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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 conversion to the same type: `PairOfElfs` [INFO] [stdout] --> src/bin/day04.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | PairOfElfs::try_from(PairOfElfs(elfs[0].parse()?, elfs[1].parse()?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `PairOfElfs::try_from()` [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `Elf` [INFO] [stdout] --> src/bin/day04.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | Elf::try_from(Elf { lower: limits[0], upper: limits[1] }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `Elf::try_from()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day04.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | fn part1(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 49 - fn part1(input: &Vec) -> i32 { [INFO] [stdout] 49 + fn part1(input: &[PairOfElfs]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day04.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | fn part2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 53 - fn part2(input: &Vec) -> i32 { [INFO] [stdout] 53 + fn part2(input: &[PairOfElfs]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/day12.rs:16:21 [INFO] [stdout] | [INFO] [stdout] 16 | node_connected: fn((usize, usize), (usize, usize), &Vec>) -> bool) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/day12.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | -> (HashMap<(usize, usize), Vec<(usize, usize)>>, (usize, usize), (usize, usize)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/bin/day12.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | for j in 0..map[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 25 - for j in 0..map[0].len() { [INFO] [stdout] 25 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/bin/day12.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let node = waitlist.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] 34 ~ while let Some(node) = waitlist.pop() { [INFO] [stdout] 35 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | "A Z" => 0 + 3, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | "B X" => 0 + 1, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | "C Y" => 0 + 2, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | "A X" => 0 + 3, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | "B X" => 0 + 1, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bin/day02.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | "C X" => 0 + 2, [INFO] [stdout] | ^^^^^ help: consider reducing it to: `2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day02.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | fn part1(input: &String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn part1(input: &String) -> i32 { [INFO] [stdout] 35 + fn part1(input: &str) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day02.rs:37:14 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|l| game2points_part1(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `game2points_part1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day02.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | fn part2(input: &String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 41 - fn part2(input: &String) -> i32 { [INFO] [stdout] 41 + fn part2(input: &str) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day02.rs:43:14 [INFO] [stdout] | [INFO] [stdout] 43 | .map(|l| game2points_part2(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `game2points_part2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/bin/day09.rs:27:59 [INFO] [stdout] | [INFO] [stdout] 27 | fn check_and_move_tail(h: &(i32, i32), t: &mut (i32, i32)) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/bin/day07.rs:114:29 [INFO] [stdout] | [INFO] [stdout] 114 | .filter(|n| (n.borrow().name == dirname)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 114 - .filter(|n| (n.borrow().name == dirname)) [INFO] [stdout] 114 + .filter(|n| n.borrow().name == dirname ) [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/bin/day08.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | fn part1(forest: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - fn part1(forest: &Vec>) -> usize { [INFO] [stdout] 11 + fn part1(forest: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day09.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | let mut knots = vec![(0, 0); 10]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(0, 0); 10]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day08.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | fn part2(forest: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - fn part2(forest: &Vec>) -> usize { [INFO] [stdout] 27 + fn part2(forest: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/bin/day09.rs:27:59 [INFO] [stdout] | [INFO] [stdout] 27 | fn check_and_move_tail(h: &(i32, i32), t: &mut (i32, i32)) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day09.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | let mut knots = vec![(0, 0); 10]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(0, 0); 10]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&node).is_none()` [INFO] [stdout] --> src/bin/day12.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | if graph.get(&node).is_none() { [INFO] [stdout] | ------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!graph.contains_key(&node)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12.rs:39:74 [INFO] [stdout] | [INFO] [stdout] 39 | if node.0 != 0 && node_connected(node, (node.0 - 1, node.1), &map) { neighbours.push((node.0 - 1, node.1)) } // up [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:40:74 [INFO] [stdout] | [INFO] [stdout] 40 | if node.1 != 0 && node_connected(node, (node.0, node.1 - 1), &map) { neighbours.push((node.0, node.1 - 1)) } // left [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:41:86 [INFO] [stdout] | [INFO] [stdout] 41 | ... if node.0 != map.len() - 1 && node_connected(node, (node.0 + 1, node.1), &map) { neighbours.push((node.0 + 1, node.1)) } // down [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:42:89 [INFO] [stdout] | [INFO] [stdout] 42 | ... if node.1 != map[0].len() - 1 && node_connected(node, (node.0, node.1 + 1), &map) { neighbours.push((node.0, node.1 + 1)) } //... [INFO] [stdout] | ^^^^ help: change this to: `map` [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/bin/day12.rs:53:71 [INFO] [stdout] | [INFO] [stdout] 53 | fn nodes_connected(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [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] 53 - fn nodes_connected(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [INFO] [stdout] 53 + fn nodes_connected(node1: (usize, usize), node2: (usize, usize), map: &[Vec]) -> bool { [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/bin/day12.rs:59:79 [INFO] [stdout] | [INFO] [stdout] 59 | fn nodes_connected_inverse(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [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] 59 - fn nodes_connected_inverse(node1: (usize, usize), node2: (usize, usize), map: &Vec>) -> bool { [INFO] [stdout] 59 + fn nodes_connected_inverse(node1: (usize, usize), node2: (usize, usize), map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12.rs:77:42 [INFO] [stdout] | [INFO] [stdout] 77 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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/bin/day12.rs:77:69 [INFO] [stdout] | [INFO] [stdout] 77 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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/bin/day12.rs:97:42 [INFO] [stdout] | [INFO] [stdout] 97 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [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/bin/day12.rs:97:69 [INFO] [stdout] | [INFO] [stdout] 97 | if !pathlengths.contains_key(&neighbour) || pathlengths[&neighbour] > pathlengths[&node] + 1 { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `neighbour` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day10.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|x| match x { [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | "noop" => vec![0], [INFO] [stdout] 9 | | x => { vec![0, x.split_once(" ").unwrap().1.parse().unwrap()] } [INFO] [stdout] 10 | | }) [INFO] [stdout] 11 | | .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] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 7 ~ .flat_map(|x| match x { [INFO] [stdout] 8 + "noop" => vec![0], [INFO] [stdout] 9 + x => { vec![0, x.split_once(" ").unwrap().1.parse().unwrap()] } [INFO] [stdout] 10 + }) [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/bin/day10.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | fn part1(instructions: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 - fn part1(instructions: &Vec) -> i32 { [INFO] [stdout] 15 + fn part1(instructions: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day10.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | x_register = x_register + instructions[max(0, i - 40 - 1) as usize..i as usize - 1].iter().sum::(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x_register += instructions[max(0, i - 40 - 1) as usize..i as usize - 1].iter().sum::()` [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/bin/day10.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | fn part2(instructions: &Vec) -> String { [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] 26 - fn part2(instructions: &Vec) -> String { [INFO] [stdout] 26 + fn part2(instructions: &[i32]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `PairOfElfs` [INFO] [stdout] --> src/bin/day04.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | PairOfElfs::try_from(PairOfElfs(elfs[0].parse()?, elfs[1].parse()?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `PairOfElfs::try_from()` [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] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day10.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|x| match x { [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | "noop" => vec![0], [INFO] [stdout] 9 | | x => { vec![0, x.split_once(" ").unwrap().1.parse().unwrap()] } [INFO] [stdout] 10 | | }) [INFO] [stdout] 11 | | .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] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 7 ~ .flat_map(|x| match x { [INFO] [stdout] 8 + "noop" => vec![0], [INFO] [stdout] 9 + x => { vec![0, x.split_once(" ").unwrap().1.parse().unwrap()] } [INFO] [stdout] 10 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `Elf` [INFO] [stdout] --> src/bin/day04.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | Elf::try_from(Elf { lower: limits[0], upper: limits[1] }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `Elf::try_from()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day04.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | fn part1(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 49 - fn part1(input: &Vec) -> i32 { [INFO] [stdout] 49 + fn part1(input: &[PairOfElfs]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day04.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | fn part2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 53 - fn part2(input: &Vec) -> i32 { [INFO] [stdout] 53 + fn part2(input: &[PairOfElfs]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day03.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | fn get_line_prio(line: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 - fn get_line_prio(line: &Vec) -> i32 { [INFO] [stdout] 15 + fn get_line_prio(line: &[char]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/bin/day03.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day03.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | fn part1(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 - fn part1(input: &Vec>) -> i32 { [INFO] [stdout] 37 + fn part1(input: &[Vec]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day10.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | fn part1(instructions: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 - fn part1(instructions: &Vec) -> i32 { [INFO] [stdout] 15 + fn part1(instructions: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day10.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | x_register = x_register + instructions[max(0, i - 40 - 1) as usize..i as usize - 1].iter().sum::(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x_register += instructions[max(0, i - 40 - 1) as usize..i as usize - 1].iter().sum::()` [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/bin/day03.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | fn part2(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn part2(input: &Vec>) -> i32 { [INFO] [stdout] 43 + fn part2(input: &[Vec]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day10.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | fn part2(instructions: &Vec) -> String { [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] 26 - fn part2(instructions: &Vec) -> String { [INFO] [stdout] 26 + fn part2(instructions: &[i32]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day07.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | / return Node { [INFO] [stdout] 34 | | size, [INFO] [stdout] 35 | | name, [INFO] [stdout] 36 | | parent, [INFO] [stdout] 37 | | children: vec![], [INFO] [stdout] 38 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 33 ~ Node { [INFO] [stdout] 34 + size, [INFO] [stdout] 35 + name, [INFO] [stdout] 36 + parent, [INFO] [stdout] 37 + children: vec![], [INFO] [stdout] 38 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day07.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - if self.children.is_empty() { // file sizes do not change [INFO] [stdout] 59 - return; [INFO] [stdout] 58 + if self.children.is_empty() { // file sizes do not change [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day07.rs:69:13 [INFO] [stdout] | [INFO] [stdout] 69 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 69 - return 0; [INFO] [stdout] 69 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/bin/day07.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | current = Rc::clone(current_clone.borrow().children.iter() [INFO] [stdout] | _________________________________^ [INFO] [stdout] 114 | | .filter(|n| (n.borrow().name == dirname)) [INFO] [stdout] 115 | | .next() [INFO] [stdout] | |_______________________^ help: try: `current_clone.borrow().children.iter().find(|n| (n.borrow().name == dirname))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:31:32 [INFO] [stdout] | [INFO] [stdout] 31 | let s_x: i32 = parts[2].clone().strip_suffix(",").unwrap()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | let s_y: i32 = parts[3].clone().strip_suffix(":").unwrap()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | let b_x: i32 = parts[8].clone().strip_suffix(",").unwrap()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:34:32 [INFO] [stdout] | [INFO] [stdout] 34 | let b_y: i32 = parts[9].clone()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day03.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | fn get_line_prio(line: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 - fn get_line_prio(line: &Vec) -> i32 { [INFO] [stdout] 15 + fn get_line_prio(line: &[char]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/bin/day03.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day03.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | fn part1(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 - fn part1(input: &Vec>) -> i32 { [INFO] [stdout] 37 + fn part1(input: &[Vec]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day03.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | fn part2(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn part2(input: &Vec>) -> i32 { [INFO] [stdout] 43 + fn part2(input: &[Vec]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day14.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | while !part2 && sand.1 < lowest || part2 { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 42 - while !part2 && sand.1 < lowest || part2 { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] 42 + while !(!part2 && sand.1 >= lowest) { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] | [INFO] [stdout] 42 - while !part2 && sand.1 < lowest || part2 { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] 42 + while part2 || sand.1 < lowest { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/day14.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | let lowest = map.keys().map(|(_, y)| y).max().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*map.keys().map(|(_, y)| y).max().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day14.rs:19:35 [INFO] [stdout] | [INFO] [stdout] 19 | let mut ordered = vec![start_coords.1, end_coords.1]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[start_coords.1, end_coords.1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day14.rs:25:35 [INFO] [stdout] | [INFO] [stdout] 25 | let mut ordered = vec![start_coords.0, end_coords.0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[start_coords.0, end_coords.0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/day11.rs:26:46 [INFO] [stdout] | [INFO] [stdout] 26 | let (operation, operation_payload) : (Box) -> u64>, Option) = match op_arg { [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/bin/day11.rs:75:23 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|monkey| *monkey.activity.borrow() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*monkey.activity.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day01.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | fn part1(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn part1(input: &Vec) -> i32 { [INFO] [stdout] 12 + fn part1(input: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day01.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | fn part2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn part2(input: &Vec) -> i32 { [INFO] [stdout] 16 + fn part2(input: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:31:32 [INFO] [stdout] | [INFO] [stdout] 31 | let s_x: i32 = parts[2].clone().strip_suffix(",").unwrap()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | let s_y: i32 = parts[3].clone().strip_suffix(":").unwrap()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | let b_x: i32 = parts[8].clone().strip_suffix(",").unwrap()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/day15.rs:34:32 [INFO] [stdout] | [INFO] [stdout] 34 | let b_y: i32 = parts[9].clone()[2..].parse().unwrap(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day06.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | fn solver(message: &Vec, marker_len: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn solver(message: &Vec, marker_len: usize) -> usize { [INFO] [stdout] 19 + fn solver(message: &[char], marker_len: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day06.rs:63:38 [INFO] [stdout] | [INFO] [stdout] 63 | assert_eq!(inputs.iter().map(|i| part1(i)).collect::>(), vec![5, 6, 10, 11]); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the function itself: `part1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/day06.rs:81:38 [INFO] [stdout] | [INFO] [stdout] 81 | assert_eq!(inputs.iter().map(|i| part2(i)).collect::>(), vec![23, 23, 29, 26]); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the function itself: `part2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day06.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | let datas = vec!["bvwbjplbgvbhsrlpgdmjqwftvncz", [INFO] [stdout] | _____________________^ [INFO] [stdout] 59 | | "nppdvjthqldpwncqszvftbrmjlhg", [INFO] [stdout] 60 | | "nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg", [INFO] [stdout] 61 | | "zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw"]; [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 58 ~ let datas = ["bvwbjplbgvbhsrlpgdmjqwftvncz", [INFO] [stdout] 59 + "nppdvjthqldpwncqszvftbrmjlhg", [INFO] [stdout] 60 + "nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg", [INFO] [stdout] 61 ~ "zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day06.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | let datas = vec!["bvwbjplbgvbhsrlpgdmjqwftvncz", [INFO] [stdout] | _____________________^ [INFO] [stdout] 77 | | "nppdvjthqldpwncqszvftbrmjlhg", [INFO] [stdout] 78 | | "nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg", [INFO] [stdout] 79 | | "zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw"]; [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 76 ~ let datas = ["bvwbjplbgvbhsrlpgdmjqwftvncz", [INFO] [stdout] 77 + "nppdvjthqldpwncqszvftbrmjlhg", [INFO] [stdout] 78 + "nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg", [INFO] [stdout] 79 ~ "zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/day11.rs:26:46 [INFO] [stdout] | [INFO] [stdout] 26 | let (operation, operation_payload) : (Box) -> u64>, Option) = match op_arg { [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: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day14.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | while !part2 && sand.1 < lowest || part2 { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 42 - while !part2 && sand.1 < lowest || part2 { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] 42 + while !(!part2 && sand.1 >= lowest) { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] | [INFO] [stdout] 42 - while !part2 && sand.1 < lowest || part2 { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] 42 + while part2 || sand.1 < lowest { // if we are in part 1 then loop until sand.1 < lowest, else loop indefinitely [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/day14.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | let lowest = map.keys().map(|(_, y)| y).max().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*map.keys().map(|(_, y)| y).max().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/bin/day11.rs:75:23 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|monkey| *monkey.activity.borrow() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*monkey.activity.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day14.rs:19:35 [INFO] [stdout] | [INFO] [stdout] 19 | let mut ordered = vec![start_coords.1, end_coords.1]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[start_coords.1, end_coords.1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/bin/day14.rs:25:35 [INFO] [stdout] | [INFO] [stdout] 25 | let mut ordered = vec![start_coords.0, end_coords.0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[start_coords.0, end_coords.0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.12s [INFO] running `Command { std: "docker" "inspect" "a21f02a15b22de0b79a95f86a72448544203a53f9598f78e44e7283b0d4b08f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a21f02a15b22de0b79a95f86a72448544203a53f9598f78e44e7283b0d4b08f0", kill_on_drop: false }` [INFO] [stdout] a21f02a15b22de0b79a95f86a72448544203a53f9598f78e44e7283b0d4b08f0