[INFO] cloning repository https://github.com/Zacxalot/AOC_2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Zacxalot/AOC_2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZacxalot%2FAOC_2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZacxalot%2FAOC_2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b5f7f6f416c82a9b86db5e538645a30f802f6858 [INFO] linting Zacxalot/AOC_2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZacxalot%2FAOC_2021" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Zacxalot/AOC_2021 [INFO] finished tweaking git repo https://github.com/Zacxalot/AOC_2021 [INFO] tweaked toml for git repo https://github.com/Zacxalot/AOC_2021 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Zacxalot/AOC_2021 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/Zacxalot/AOC_2021 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded blake2b_simd v0.5.11 [INFO] [stderr] Downloaded redox_users v0.3.5 [INFO] [stderr] Downloaded dirs v1.0.5 [INFO] [stderr] Downloaded constant_time_eq v0.1.5 [INFO] [stderr] Downloaded autocfg v1.0.1 [INFO] [stderr] Downloaded crossbeam-utils v0.8.5 [INFO] [stderr] Downloaded matrixmultiply v0.3.2 [INFO] [stderr] Downloaded num-complex v0.4.0 [INFO] [stderr] Downloaded num-traits v0.2.14 [INFO] [stderr] Downloaded csv-core v0.1.10 [INFO] [stderr] Downloaded ryu v1.0.6 [INFO] [stderr] Downloaded serde v1.0.130 [INFO] [stderr] Downloaded base64 v0.13.0 [INFO] [stderr] Downloaded arrayref v0.3.6 [INFO] [stderr] Downloaded itoa v0.4.8 [INFO] [stderr] Downloaded encode_unicode v0.3.6 [INFO] [stderr] Downloaded redox_syscall v0.1.57 [INFO] [stderr] Downloaded rawpointer v0.2.1 [INFO] [stderr] Downloaded arrayvec v0.5.2 [INFO] [stderr] Downloaded num-integer v0.1.44 [INFO] [stderr] Downloaded bstr v0.2.17 [INFO] [stderr] Downloaded hermit-abi v0.1.19 [INFO] [stderr] Downloaded memchr v2.4.1 [INFO] [stderr] Downloaded term v0.5.2 [INFO] [stderr] Downloaded rust-argon2 v0.8.3 [INFO] [stderr] Downloaded unicode-width v0.1.9 [INFO] [stderr] Downloaded prettytable-rs v0.8.0 [INFO] [stderr] Downloaded libc v0.2.108 [INFO] [stderr] Downloaded csv v1.1.6 [INFO] [stderr] Downloaded ndarray v0.15.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 1f10726f08c9145479fe1971ae9537175fa5fc5634f6ddfa1d0e0a8aeaa364fc [INFO] running `Command { std: "docker" "start" "-a" "1f10726f08c9145479fe1971ae9537175fa5fc5634f6ddfa1d0e0a8aeaa364fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1f10726f08c9145479fe1971ae9537175fa5fc5634f6ddfa1d0e0a8aeaa364fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1f10726f08c9145479fe1971ae9537175fa5fc5634f6ddfa1d0e0a8aeaa364fc", kill_on_drop: false }` [INFO] [stdout] 1f10726f08c9145479fe1971ae9537175fa5fc5634f6ddfa1d0e0a8aeaa364fc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 89fb78143aad27d34c491a0ea3d6ba87d75ccecb5363bab95402d4d71b6a1c83 [INFO] running `Command { std: "docker" "start" "-a" "89fb78143aad27d34c491a0ea3d6ba87d75ccecb5363bab95402d4d71b6a1c83", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling libc v0.2.108 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Compiling ryu v1.0.6 [INFO] [stderr] Checking regex-automata v0.1.10 [INFO] [stderr] Checking byteorder v1.4.3 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Checking unicode-width v0.1.9 [INFO] [stderr] Checking encode_unicode v0.3.6 [INFO] [stderr] Checking matrixmultiply v0.3.2 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Checking dirs v1.0.5 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking term v0.5.2 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Checking num-complex v0.4.0 [INFO] [stderr] Checking ndarray v0.15.4 [INFO] [stderr] Checking bstr v0.2.17 [INFO] [stderr] Checking csv v1.1.6 [INFO] [stderr] Checking prettytable-rs v0.8.0 [INFO] [stderr] Checking aoc_2021 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_5/day_5.rs:73:73 [INFO] [stdout] | [INFO] [stdout] 73 | Answer{day:5, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_6/day_6.rs:54:73 [INFO] [stdout] | [INFO] [stdout] 54 | Answer{day:6, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_7/day_7.rs:57:73 [INFO] [stdout] | [INFO] [stdout] 57 | Answer{day:7, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_8/day_8.rs:32:73 [INFO] [stdout] | [INFO] [stdout] 32 | Answer{day:8, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_9/day_9.rs:97:73 [INFO] [stdout] | [INFO] [stdout] 97 | Answer{day:9, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_11/day_11.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | duration: duration, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_13/day_13.rs:73:74 [INFO] [stdout] | [INFO] [stdout] 73 | Answer{day:13, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_5/day_5.rs:73:73 [INFO] [stdout] | [INFO] [stdout] 73 | Answer{day:5, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_6/day_6.rs:54:73 [INFO] [stdout] | [INFO] [stdout] 54 | Answer{day:6, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_7/day_7.rs:57:73 [INFO] [stdout] | [INFO] [stdout] 57 | Answer{day:7, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_8/day_8.rs:32:73 [INFO] [stdout] | [INFO] [stdout] 32 | Answer{day:8, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_9/day_9.rs:97:73 [INFO] [stdout] | [INFO] [stdout] 97 | Answer{day:9, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_11/day_11.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | duration: duration, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_13/day_13.rs:73:74 [INFO] [stdout] | [INFO] [stdout] 73 | Answer{day:13, part_1:part_1.to_string(), part_2:part_2.to_string(), duration:duration} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `duration` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_1/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_1; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_2/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_2; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_3/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_3; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_3/day_3.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | fn vec_to_num(vals: &Vec) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 103 - fn vec_to_num(vals: &Vec) -> u32 { [INFO] [stdout] 103 + fn vec_to_num(vals: &[u32]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/days/day_3/day_3.rs:131:10 [INFO] [stdout] | [INFO] [stdout] 131 | .map(|line| line.chars().map(|chr| chr.to_digit(10).unwrap())) [INFO] [stdout] | __________^ [INFO] [stdout] 132 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|line| line.chars().map(|chr| chr.to_digit(10).unwrap()))` [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: module has the same name as its containing module [INFO] [stdout] --> src/days/day_1/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_1; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_4/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_4; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_2/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_2; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).any(identity)` [INFO] [stdout] --> src/days/day_4/day_4.rs:71:22 [INFO] [stdout] | [INFO] [stdout] 71 | .map(|line| line.iter().fold(true, fold_true)) [INFO] [stdout] | ______________________^ [INFO] [stdout] 72 | | .any(|x| x); [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.any(...)` instead [INFO] [stdout] | [INFO] [stdout] 71 - .map(|line| line.iter().fold(true, fold_true)) [INFO] [stdout] 72 - .any(|x| x); [INFO] [stdout] 71 + .any(|line| line.iter().fold(true, fold_true)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_5/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_5; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_3/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_3; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/days/day_5/day_5.rs:28:31 [INFO] [stdout] | [INFO] [stdout] 28 | ...e.split(|c| c == ' ' || c == '-' || c == '>' || c == ',').map(|val| val.trim()).filter(|c| c.len() > 0).map(|num| num.parse::', ',']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_5/day_5.rs:28:115 [INFO] [stdout] | [INFO] [stdout] 28 | ... val.trim()).filter(|c| c.len() > 0).map(|num| num.parse::().unwrap()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `vals.get(0)` [INFO] [stdout] --> src/days/day_5/day_5.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | x1:*vals.get(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^ help: try: `vals.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_5/day_5.rs:55:37 [INFO] [stdout] | [INFO] [stdout] 55 | for point in calculate_line(&line){ [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_3/day_3.rs:103:21 [INFO] [stdout] | [INFO] [stdout] 103 | fn vec_to_num(vals: &Vec) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 103 - fn vec_to_num(vals: &Vec) -> u32 { [INFO] [stdout] 103 + fn vec_to_num(vals: &[u32]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_6/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_6; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/days/day_3/day_3.rs:131:10 [INFO] [stdout] | [INFO] [stdout] 131 | .map(|line| line.chars().map(|chr| chr.to_digit(10).unwrap())) [INFO] [stdout] | __________^ [INFO] [stdout] 132 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|line| line.chars().map(|chr| chr.to_digit(10).unwrap()))` [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: module has the same name as its containing module [INFO] [stdout] --> src/days/day_7/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_7; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_4/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_4; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_8/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_8; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_8/day_8.rs:17:49 [INFO] [stdout] | [INFO] [stdout] 17 | ... .map(|val| digit_chars_to_num(val)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `digit_chars_to_num` [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/days/day_8/day_8.rs:28:38 [INFO] [stdout] | [INFO] [stdout] 28 | let part_2 = contents.iter().map(|digits| deduce_values(digits)).sum::(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `deduce_values` [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: usage of `.map(...).any(identity)` [INFO] [stdout] --> src/days/day_4/day_4.rs:71:22 [INFO] [stdout] | [INFO] [stdout] 71 | .map(|line| line.iter().fold(true, fold_true)) [INFO] [stdout] | ______________________^ [INFO] [stdout] 72 | | .any(|x| x); [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.any(...)` instead [INFO] [stdout] | [INFO] [stdout] 71 - .map(|line| line.iter().fold(true, fold_true)) [INFO] [stdout] 72 - .any(|x| x); [INFO] [stdout] 71 + .any(|line| line.iter().fold(true, fold_true)); [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/days/day_8/day_8.rs:35:25 [INFO] [stdout] | [INFO] [stdout] 35 | fn deduce_values(digits:&Vec<(u8,u8)>) -> u32{ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn deduce_values(digits:&Vec<(u8,u8)>) -> u32{ [INFO] [stdout] 35 + fn deduce_values(digits:&[(u8,u8)]) -> u32{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_5/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_5; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/days/day_5/day_5.rs:28:31 [INFO] [stdout] | [INFO] [stdout] 28 | ...e.split(|c| c == ' ' || c == '-' || c == '>' || c == ',').map(|val| val.trim()).filter(|c| c.len() > 0).map(|num| num.parse::', ',']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_5/day_5.rs:28:115 [INFO] [stdout] | [INFO] [stdout] 28 | ... val.trim()).filter(|c| c.len() > 0).map(|num| num.parse::().unwrap()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_9/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_9; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `vals.get(0)` [INFO] [stdout] --> src/days/day_5/day_5.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | x1:*vals.get(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^ help: try: `vals.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_5/day_5.rs:55:37 [INFO] [stdout] | [INFO] [stdout] 55 | for point in calculate_line(&line){ [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_9/day_9.rs:64:23 [INFO] [stdout] | [INFO] [stdout] 64 | while neighbors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!neighbors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_6/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_6; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_7/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_7; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_10/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_10; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_10/day_10.rs:26:34 [INFO] [stdout] | [INFO] [stdout] 26 | for line in lines.iter().map(|line| is_valid_line(line)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_valid_line` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_10/day_10.rs:59:24 [INFO] [stdout] | [INFO] [stdout] 59 | fn is_valid_line(line: &String) -> SyntaxLineResult { [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 is_valid_line(line: &String) -> SyntaxLineResult { [INFO] [stdout] 59 + fn is_valid_line(line: &str) -> SyntaxLineResult { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_8/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_8; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_8/day_8.rs:17:49 [INFO] [stdout] | [INFO] [stdout] 17 | ... .map(|val| digit_chars_to_num(val)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `digit_chars_to_num` [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: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:71:26 [INFO] [stdout] | [INFO] [stdout] 71 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '{') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:77:26 [INFO] [stdout] | [INFO] [stdout] 77 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '[') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:83:26 [INFO] [stdout] | [INFO] [stdout] 83 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '(') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_8/day_8.rs:28:38 [INFO] [stdout] | [INFO] [stdout] 28 | let part_2 = contents.iter().map(|digits| deduce_values(digits)).sum::(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `deduce_values` [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: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:89:26 [INFO] [stdout] | [INFO] [stdout] 89 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '<') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_8/day_8.rs:35:25 [INFO] [stdout] | [INFO] [stdout] 35 | fn deduce_values(digits:&Vec<(u8,u8)>) -> u32{ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn deduce_values(digits:&Vec<(u8,u8)>) -> u32{ [INFO] [stdout] 35 + fn deduce_values(digits:&[(u8,u8)]) -> u32{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_11/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_11; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/days/day_11/day_11.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | .map(|line| line.trim().chars()) [INFO] [stdout] | __________^ [INFO] [stdout] 17 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|line| line.trim().chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_9/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_9; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_12/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_12; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_9/day_9.rs:64:23 [INFO] [stdout] | [INFO] [stdout] 64 | while neighbors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!neighbors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_13/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_13; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day_13/day_13.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | .filter(|line| !(line.len() == 1)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(line.len() != 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_10/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_10; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_13/day_13.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | return points [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] 88 - return points [INFO] [stdout] 88 + points [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_10/day_10.rs:26:34 [INFO] [stdout] | [INFO] [stdout] 26 | for line in lines.iter().map(|line| is_valid_line(line)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_valid_line` [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/days/day_13/day_13.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | return points [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] 102 - return points [INFO] [stdout] 102 + points [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_10/day_10.rs:59:24 [INFO] [stdout] | [INFO] [stdout] 59 | fn is_valid_line(line: &String) -> SyntaxLineResult { [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 is_valid_line(line: &String) -> SyntaxLineResult { [INFO] [stdout] 59 + fn is_valid_line(line: &str) -> SyntaxLineResult { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_14/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_14; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:71:26 [INFO] [stdout] | [INFO] [stdout] 71 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '{') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:77:26 [INFO] [stdout] | [INFO] [stdout] 77 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '[') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:83:26 [INFO] [stdout] | [INFO] [stdout] 83 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '(') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/day_10/day_10.rs:89:26 [INFO] [stdout] | [INFO] [stdout] 89 | if !(last_open_vec.len() > 0 && last_open_vec.pop().unwrap() == '<') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!last_open_vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_11/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_11; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/days/day_11/day_11.rs:16:10 [INFO] [stdout] | [INFO] [stdout] 16 | .map(|line| line.trim().chars()) [INFO] [stdout] | __________^ [INFO] [stdout] 17 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|line| line.trim().chars())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / let mut answers: Vec = Vec::new(); [INFO] [stdout] 46 | | [INFO] [stdout] 47 | | answers.push(day_1_main()); [INFO] [stdout] 48 | | answers.push(day_2_main()); [INFO] [stdout] ... | [INFO] [stdout] 59 | | answers.push(day_13_main()); [INFO] [stdout] 60 | | answers.push(day_14_main()); [INFO] [stdout] | |________________________________^ help: consider using the `vec![]` macro: `let answers: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_12/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_12; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_13/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_13; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day_13/day_13.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | .filter(|line| !(line.len() == 1)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(line.len() != 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_13/day_13.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | return points [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] 88 - return points [INFO] [stdout] 88 + points [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_13/day_13.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | return points [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] 102 - return points [INFO] [stdout] 102 + points [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/days/day_14/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod day_14; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / let mut answers: Vec = Vec::new(); [INFO] [stdout] 46 | | [INFO] [stdout] 47 | | answers.push(day_1_main()); [INFO] [stdout] 48 | | answers.push(day_2_main()); [INFO] [stdout] ... | [INFO] [stdout] 59 | | answers.push(day_13_main()); [INFO] [stdout] 60 | | answers.push(day_14_main()); [INFO] [stdout] | |________________________________^ help: consider using the `vec![]` macro: `let answers: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.43s [INFO] running `Command { std: "docker" "inspect" "89fb78143aad27d34c491a0ea3d6ba87d75ccecb5363bab95402d4d71b6a1c83", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89fb78143aad27d34c491a0ea3d6ba87d75ccecb5363bab95402d4d71b6a1c83", kill_on_drop: false }` [INFO] [stdout] 89fb78143aad27d34c491a0ea3d6ba87d75ccecb5363bab95402d4d71b6a1c83