[INFO] cloning repository https://github.com/khairizalkhalid/aoc_2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/khairizalkhalid/aoc_2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkhairizalkhalid%2Faoc_2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkhairizalkhalid%2Faoc_2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 265afdf88bf0fdbac5374b2045f958f36057ace9 [INFO] linting khairizalkhalid/aoc_2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkhairizalkhalid%2Faoc_2024" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/khairizalkhalid/aoc_2024 [INFO] finished tweaking git repo https://github.com/khairizalkhalid/aoc_2024 [INFO] tweaked toml for git repo https://github.com/khairizalkhalid/aoc_2024 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/khairizalkhalid/aoc_2024 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/khairizalkhalid/aoc_2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded curl v0.4.47 [INFO] [stderr] Downloaded openssl-sys v0.9.106 [INFO] [stderr] Downloaded libz-sys v1.1.21 [INFO] [stderr] Downloaded curl-sys v0.4.80+curl-8.12.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] e2d46a46f49e69089067a445898b902d25adf2c3b33df0085e64c25e023407b3 [INFO] running `Command { std: "docker" "start" "-a" "e2d46a46f49e69089067a445898b902d25adf2c3b33df0085e64c25e023407b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e2d46a46f49e69089067a445898b902d25adf2c3b33df0085e64c25e023407b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e2d46a46f49e69089067a445898b902d25adf2c3b33df0085e64c25e023407b3", kill_on_drop: false }` [INFO] [stdout] e2d46a46f49e69089067a445898b902d25adf2c3b33df0085e64c25e023407b3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 89f18a3519af4a4d27322e61d5021aaf4ae7f453bf0a6330e740954049d3970f [INFO] running `Command { std: "docker" "start" "-a" "89f18a3519af4a4d27322e61d5021aaf4ae7f453bf0a6330e740954049d3970f", kill_on_drop: false }` [INFO] [stderr] Compiling cc v1.2.16 [INFO] [stderr] Compiling libc v0.2.170 [INFO] [stderr] Compiling curl v0.4.47 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Compiling openssl-sys v0.9.106 [INFO] [stderr] Compiling libz-sys v1.1.21 [INFO] [stderr] Compiling curl-sys v0.4.80+curl-8.12.1 [INFO] [stderr] Checking aoc_2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the loop variable `i` is only used to index `vec` [INFO] [stdout] --> src/days/day1_part1.rs:69:14 [INFO] [stdout] | [INFO] [stdout] 69 | for i in 0..max { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 69 - for i in 0..max { [INFO] [stdout] 69 + for in vec.iter().take(max) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/days/day1_part2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::i32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day2_part2.rs:6:36 [INFO] [stdout] | [INFO] [stdout] 6 | fn enhanced_safety_check(readings: &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] 6 - fn enhanced_safety_check(readings: &Vec) -> bool { [INFO] [stdout] 6 + fn enhanced_safety_check(readings: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `splitted.get(0)` [INFO] [stdout] --> src/days/day3_part2.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | doos.push(splitted.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `splitted.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 operation has no effect [INFO] [stdout] --> src/days/day4_part2.rs:47:40 [INFO] [stdout] | [INFO] [stdout] 47 | let new_x = x_i as isize - (1 * dx) + i as isize * dx; [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `*dx` [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/days/day4_part2.rs:48:40 [INFO] [stdout] | [INFO] [stdout] 48 | let new_y = y_i as isize - (1 * dy) + i as isize * dy; [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `*dy` [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: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/days/day5_part1.rs:25:38 [INFO] [stdout] | [INFO] [stdout] 25 | let pages_vecs: Vec> = pages_str [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 26 | | .lines() [INFO] [stdout] 27 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 25 ~ let pages_vecs: Vec> = pages_str [INFO] [stdout] 26 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day5_part1.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | !is_against_rule == is_follow_rule [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_against_rule != is_follow_rule` [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/day6_part1.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | return 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - return true; [INFO] [stdout] 47 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | return 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] 55 - return true; [INFO] [stdout] 55 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | return 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] 63 - return true; [INFO] [stdout] 63 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | return 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] 71 - return true; [INFO] [stdout] 71 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | return 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] 86 - return false; [INFO] [stdout] 86 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | return 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] 93 - return false; [INFO] [stdout] 93 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | return 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] 100 - return false; [INFO] [stdout] 100 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | return 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] 107 - return false; [INFO] [stdout] 107 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/days/day6_part2.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | looping_marker.iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `looping_marker.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/days/day6_v2.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 58 | / let visited = match dir { [INFO] [stdout] 59 | | 0 => (0..y).rev().map(|i| (x, i, dir)).collect(), // Up [INFO] [stdout] 60 | | 90 => ((x + 1)..canvas_x_max).map(|i| (i, y, dir)).collect(), // Right [INFO] [stdout] 61 | | 180 => ((y + 1)..canvas_y_max).map(|i| (x, i, dir)).collect(), // Down [INFO] [stdout] 62 | | 270 => (0..x).rev().map(|i| (i, y, dir)).collect(), // Left [INFO] [stdout] 63 | | _ => Vec::new(), [INFO] [stdout] 64 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 65 | [INFO] [stdout] 66 | visited [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 58 ~ [INFO] [stdout] 59 | [INFO] [stdout] 60 ~ match dir { [INFO] [stdout] 61 + 0 => (0..y).rev().map(|i| (x, i, dir)).collect(), // Up [INFO] [stdout] 62 + 90 => ((x + 1)..canvas_x_max).map(|i| (i, y, dir)).collect(), // Right [INFO] [stdout] 63 + 180 => ((y + 1)..canvas_y_max).map(|i| (x, i, dir)).collect(), // Down [INFO] [stdout] 64 + 270 => (0..x).rev().map(|i| (i, y, dir)).collect(), // Left [INFO] [stdout] 65 + _ => Vec::new(), [INFO] [stdout] 66 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day6_v2.rs:82:22 [INFO] [stdout] | [INFO] [stdout] 82 | entity = visited.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*visited.last().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: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/days/day6_v2.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | part1_vec(canvas).iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `part1_vec(canvas).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day6_v2.rs:139:26 [INFO] [stdout] | [INFO] [stdout] 139 | entity = visited.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*visited.last().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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day7_part1.rs:7:41 [INFO] [stdout] | [INFO] [stdout] 7 | fn is_valid_config(calib: i64, configs: &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] 7 - fn is_valid_config(calib: i64, configs: &Vec) -> bool { [INFO] [stdout] 7 + fn is_valid_config(calib: i64, configs: &[i64]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/days/day7_part1.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:35:30 [INFO] [stdout] | [INFO] [stdout] 35 | functions.insert("d1p1", || days::day1_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day1_part1::run` [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/main.rs:36:30 [INFO] [stdout] | [INFO] [stdout] 36 | functions.insert("d1p2", || days::day1_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day1_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:37:29 [INFO] [stdout] | [INFO] [stdout] 37 | functions.insert("d2t", || days::day2_part1::test_run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day2_part1::test_run` [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: redundant closure [INFO] [stdout] --> src/main.rs:38:30 [INFO] [stdout] | [INFO] [stdout] 38 | functions.insert("d2p1", || days::day2_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day2_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:39:30 [INFO] [stdout] | [INFO] [stdout] 39 | functions.insert("d2p2", || days::day2_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day2_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:40:30 [INFO] [stdout] | [INFO] [stdout] 40 | functions.insert("d3pt", || days::day3_part1::test_run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day3_part1::test_run` [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: redundant closure [INFO] [stdout] --> src/main.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | functions.insert("d3p1", || days::day3_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day3_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | functions.insert("d3p2", || days::day3_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day3_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:43:30 [INFO] [stdout] | [INFO] [stdout] 43 | functions.insert("d4pt", || days::day4_part1::test_run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day4_part1::test_run` [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: redundant closure [INFO] [stdout] --> src/main.rs:44:30 [INFO] [stdout] | [INFO] [stdout] 44 | functions.insert("d4p1", || days::day4_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day4_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:45:30 [INFO] [stdout] | [INFO] [stdout] 45 | functions.insert("d4p2", || days::day4_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day4_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | functions.insert("d5p1", || days::day5_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day5_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:47:30 [INFO] [stdout] | [INFO] [stdout] 47 | functions.insert("d5p2", || days::day5_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day5_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | functions.insert("d6p1", || days::day6_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day6_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | functions.insert("d6p2", || days::day6_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day6_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:52:30 [INFO] [stdout] | [INFO] [stdout] 52 | functions.insert("d7p1", || days::day7_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day7_part1::run` [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/days/day2_part1.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | let test_case = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 59 | | vec![7, 6, 4, 2, 1], //Safe because the levels are all decreasing by 1 or 2. [INFO] [stdout] 60 | | vec![1, 2, 7, 8, 9], //Unsafe because 2 7 is an increase of 5. [INFO] [stdout] 61 | | vec![9, 7, 6, 2, 1], //Unsafe because 6 2 is a decrease of 4. [INFO] [stdout] ... | [INFO] [stdout] 64 | | vec![1, 3, 6, 7, 9], //Safe because the levels are all increasing by 1, 2, or 3. [INFO] [stdout] 65 | | ]; [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 test_case = [vec![7, 6, 4, 2, 1], //Safe because the levels are all decreasing by 1 or 2. [INFO] [stdout] 59 + vec![1, 2, 7, 8, 9], //Unsafe because 2 7 is an increase of 5. [INFO] [stdout] 60 + vec![9, 7, 6, 2, 1], //Unsafe because 6 2 is a decrease of 4. [INFO] [stdout] 61 + vec![1, 3, 2, 4, 5], //Unsafe because 1 3 is increasing but 3 2 is decreasing. [INFO] [stdout] 62 + vec![8, 6, 4, 4, 1], //Unsafe because 4 4 is neither an increase or a decrease. [INFO] [stdout] 63 ~ vec![1, 3, 6, 7, 9]]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day6_part1.rs:22:27 [INFO] [stdout] | [INFO] [stdout] 22 | let entity_form_dir = vec![('^', 0), ('>', 90), ('v', 180), ('<', 270)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[('^', 0), ('>', 90), ('v', 180), ('<', 270)]` [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: the loop variable `i` is only used to index `vec` [INFO] [stdout] --> src/days/day1_part1.rs:69:14 [INFO] [stdout] | [INFO] [stdout] 69 | for i in 0..max { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 69 - for i in 0..max { [INFO] [stdout] 69 + for in vec.iter().take(max) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/days/day1_part2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::i32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | assert_eq!(true, safety_check(vec![1, 2, 3, 4, 5])); // safe: increase max 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 120 - assert_eq!(true, safety_check(vec![1, 2, 3, 4, 5])); // safe: increase max 1 [INFO] [stdout] 120 + assert!(safety_check(vec![1, 2, 3, 4, 5])); // safe: increase max 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | assert_eq!(true, safety_check(vec![1, 2, 3, 4, 6])); // safe: increase max 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 121 - assert_eq!(true, safety_check(vec![1, 2, 3, 4, 6])); // safe: increase max 2 [INFO] [stdout] 121 + assert!(safety_check(vec![1, 2, 3, 4, 6])); // safe: increase max 2 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | assert_eq!(true, safety_check(vec![1, 2, 3, 4, 7])); // safe: increase max 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 122 - assert_eq!(true, safety_check(vec![1, 2, 3, 4, 7])); // safe: increase max 3 [INFO] [stdout] 122 + assert!(safety_check(vec![1, 2, 3, 4, 7])); // safe: increase max 3 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | assert_eq!(true, safety_check(vec![5, 4, 3, 2, 1])); // safe: decrease max 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 123 - assert_eq!(true, safety_check(vec![5, 4, 3, 2, 1])); // safe: decrease max 1 [INFO] [stdout] 123 + assert!(safety_check(vec![5, 4, 3, 2, 1])); // safe: decrease max 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | assert_eq!(true, safety_check(vec![6, 4, 3, 2, 1])); // safe: decrease max 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 124 - assert_eq!(true, safety_check(vec![6, 4, 3, 2, 1])); // safe: decrease max 2 [INFO] [stdout] 124 + assert!(safety_check(vec![6, 4, 3, 2, 1])); // safe: decrease max 2 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | assert_eq!(true, safety_check(vec![7, 4, 3, 2, 1])); // safe: decrease max 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 125 - assert_eq!(true, safety_check(vec![7, 4, 3, 2, 1])); // safe: decrease max 3 [INFO] [stdout] 125 + assert!(safety_check(vec![7, 4, 3, 2, 1])); // safe: decrease max 3 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | assert_eq!(false, safety_check(vec![1, 2, 3, 4, 8])); // unsafe: increase more than 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 126 - assert_eq!(false, safety_check(vec![1, 2, 3, 4, 8])); // unsafe: increase more than 3 [INFO] [stdout] 126 + assert!(!safety_check(vec![1, 2, 3, 4, 8])); // unsafe: increase more than 3 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | assert_eq!(false, safety_check(vec![1, 2, 3, 2, 5])); // unsafe: increase then decrease [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 127 - assert_eq!(false, safety_check(vec![1, 2, 3, 2, 5])); // unsafe: increase then decrease [INFO] [stdout] 127 + assert!(!safety_check(vec![1, 2, 3, 2, 5])); // unsafe: increase then decrease [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | assert_eq!(false, safety_check(vec![1, 1, 3, 4, 5])); // unsafe: neither increase/decrease [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 128 - assert_eq!(false, safety_check(vec![1, 1, 3, 4, 5])); // unsafe: neither increase/decrease [INFO] [stdout] 128 + assert!(!safety_check(vec![1, 1, 3, 4, 5])); // unsafe: neither increase/decrease [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day2_part1.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(false, safety_check(vec![2, 1, 3, 4, 5])); // unsafe: decrease then increase [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 129 - assert_eq!(false, safety_check(vec![2, 1, 3, 4, 5])); // unsafe: decrease then increase [INFO] [stdout] 129 + assert!(!safety_check(vec![2, 1, 3, 4, 5])); // unsafe: decrease then increase [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/day2_part2.rs:6:36 [INFO] [stdout] | [INFO] [stdout] 6 | fn enhanced_safety_check(readings: &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] 6 - fn enhanced_safety_check(readings: &Vec) -> bool { [INFO] [stdout] 6 + fn enhanced_safety_check(readings: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `splitted.get(0)` [INFO] [stdout] --> src/days/day3_part2.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | doos.push(splitted.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `splitted.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 operation has no effect [INFO] [stdout] --> src/days/day4_part2.rs:47:40 [INFO] [stdout] | [INFO] [stdout] 47 | let new_x = x_i as isize - (1 * dx) + i as isize * dx; [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `*dx` [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/days/day4_part2.rs:48:40 [INFO] [stdout] | [INFO] [stdout] 48 | let new_y = y_i as isize - (1 * dy) + i as isize * dy; [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `*dy` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day4_part2.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | / assert_eq!( [INFO] [stdout] 146 | | is_half_cross( [INFO] [stdout] 147 | | &[(1, 1), (-1, -1)], [INFO] [stdout] 148 | | &TARGET_WORD.chars().collect::>(), [INFO] [stdout] ... | [INFO] [stdout] 152 | | true [INFO] [stdout] 153 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 145 ~ assert!( [INFO] [stdout] 146 | is_half_cross( [INFO] [stdout] ... [INFO] [stdout] 150 | &str_coordinate [INFO] [stdout] 151 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day4_part2.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | / assert_eq!( [INFO] [stdout] 173 | | is_match_x( [INFO] [stdout] 174 | | &TARGET_WORD.chars().collect::>(), [INFO] [stdout] 175 | | (2, 1), [INFO] [stdout] ... | [INFO] [stdout] 178 | | true [INFO] [stdout] 179 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 172 ~ assert!( [INFO] [stdout] 173 | is_match_x( [INFO] [stdout] ... [INFO] [stdout] 176 | &str_coordinate [INFO] [stdout] 177 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/days/day5_part1.rs:25:38 [INFO] [stdout] | [INFO] [stdout] 25 | let pages_vecs: Vec> = pages_str [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 26 | | .lines() [INFO] [stdout] 27 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 25 ~ let pages_vecs: Vec> = pages_str [INFO] [stdout] 26 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day5_part1.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | !is_against_rule == is_follow_rule [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_against_rule != is_follow_rule` [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/day6_part1.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | return 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - return true; [INFO] [stdout] 47 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | return 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] 55 - return true; [INFO] [stdout] 55 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | return 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] 63 - return true; [INFO] [stdout] 63 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | return 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] 71 - return true; [INFO] [stdout] 71 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | return 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] 86 - return false; [INFO] [stdout] 86 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | return 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] 93 - return false; [INFO] [stdout] 93 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | return 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] 100 - return false; [INFO] [stdout] 100 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6_part1.rs:107:13 [INFO] [stdout] | [INFO] [stdout] 107 | return 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] 107 - return false; [INFO] [stdout] 107 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:317:9 [INFO] [stdout] | [INFO] [stdout] 317 | assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 317 - assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] 317 + assert!(is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:323:9 [INFO] [stdout] | [INFO] [stdout] 323 | assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 323 - assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] 323 + assert!(is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 329 - assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] 329 + assert!(is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 335 - assert_eq!(is_front_clear(entity, obstacles), true); [INFO] [stdout] 335 + assert!(is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:344:9 [INFO] [stdout] | [INFO] [stdout] 344 | assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 344 - assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] 344 + assert!(!is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 350 - assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] 350 + assert!(!is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:356:9 [INFO] [stdout] | [INFO] [stdout] 356 | assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 356 - assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] 356 + assert!(!is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:362:9 [INFO] [stdout] | [INFO] [stdout] 362 | assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 362 - assert_eq!(is_front_clear(entity, obstacles), false); [INFO] [stdout] 362 + assert!(!is_front_clear(entity, obstacles)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:374:9 [INFO] [stdout] | [INFO] [stdout] 374 | assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 374 - assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] 374 + assert!(is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 383 - assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] 383 + assert!(is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:392:9 [INFO] [stdout] | [INFO] [stdout] 392 | assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 392 - assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] 392 + assert!(is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:401:9 [INFO] [stdout] | [INFO] [stdout] 401 | assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 401 - assert_eq!(is_front_out_of_bounds(entity, canvas), true); [INFO] [stdout] 401 + assert!(is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:413:9 [INFO] [stdout] | [INFO] [stdout] 413 | assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 413 - assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] 413 + assert!(!is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:422:9 [INFO] [stdout] | [INFO] [stdout] 422 | assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 422 - assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] 422 + assert!(!is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:431:9 [INFO] [stdout] | [INFO] [stdout] 431 | assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 431 - assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] 431 + assert!(!is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part1.rs:440:9 [INFO] [stdout] | [INFO] [stdout] 440 | assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 440 - assert_eq!(is_front_out_of_bounds(entity, canvas), false); [INFO] [stdout] 440 + assert!(!is_front_out_of_bounds(entity, canvas)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/days/day6_part2.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | looping_marker.iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `looping_marker.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part2.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 120 - assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] 120 + assert!(is_looping(entity, &items)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part2.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 125 - assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] 125 + assert!(is_looping(entity, &items)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part2.rs:130:9 [INFO] [stdout] | [INFO] [stdout] 130 | assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 130 - assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] 130 + assert!(is_looping(entity, &items)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day6_part2.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 135 - assert_eq!(is_looping(entity, &items), true); [INFO] [stdout] 135 + assert!(is_looping(entity, &items)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/days/day6_v2.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 58 | / let visited = match dir { [INFO] [stdout] 59 | | 0 => (0..y).rev().map(|i| (x, i, dir)).collect(), // Up [INFO] [stdout] 60 | | 90 => ((x + 1)..canvas_x_max).map(|i| (i, y, dir)).collect(), // Right [INFO] [stdout] 61 | | 180 => ((y + 1)..canvas_y_max).map(|i| (x, i, dir)).collect(), // Down [INFO] [stdout] 62 | | 270 => (0..x).rev().map(|i| (i, y, dir)).collect(), // Left [INFO] [stdout] 63 | | _ => Vec::new(), [INFO] [stdout] 64 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 65 | [INFO] [stdout] 66 | visited [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 58 ~ [INFO] [stdout] 59 | [INFO] [stdout] 60 ~ match dir { [INFO] [stdout] 61 + 0 => (0..y).rev().map(|i| (x, i, dir)).collect(), // Up [INFO] [stdout] 62 + 90 => ((x + 1)..canvas_x_max).map(|i| (i, y, dir)).collect(), // Right [INFO] [stdout] 63 + 180 => ((y + 1)..canvas_y_max).map(|i| (x, i, dir)).collect(), // Down [INFO] [stdout] 64 + 270 => (0..x).rev().map(|i| (i, y, dir)).collect(), // Left [INFO] [stdout] 65 + _ => Vec::new(), [INFO] [stdout] 66 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day6_v2.rs:82:22 [INFO] [stdout] | [INFO] [stdout] 82 | entity = visited.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*visited.last().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: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/days/day6_v2.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | part1_vec(canvas).iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `part1_vec(canvas).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day6_v2.rs:139:26 [INFO] [stdout] | [INFO] [stdout] 139 | entity = visited.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*visited.last().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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day7_part1.rs:7:41 [INFO] [stdout] | [INFO] [stdout] 7 | fn is_valid_config(calib: i64, configs: &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] 7 - fn is_valid_config(calib: i64, configs: &Vec) -> bool { [INFO] [stdout] 7 + fn is_valid_config(calib: i64, configs: &[i64]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/days/day7_part1.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | assert_eq!(is_valid_config(190, &vec![10, 19]), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 103 - assert_eq!(is_valid_config(190, &vec![10, 19]), true); [INFO] [stdout] 103 + assert!(is_valid_config(190, &vec![10, 19])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | assert_eq!(is_valid_config(3267, &vec![81, 40, 27]), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 104 - assert_eq!(is_valid_config(3267, &vec![81, 40, 27]), true); [INFO] [stdout] 104 + assert!(is_valid_config(3267, &vec![81, 40, 27])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | assert_eq!(is_valid_config(83, &vec![17, 5]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 105 - assert_eq!(is_valid_config(83, &vec![17, 5]), false); [INFO] [stdout] 105 + assert!(!is_valid_config(83, &vec![17, 5])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | assert_eq!(is_valid_config(156, &vec![15, 6]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 106 - assert_eq!(is_valid_config(156, &vec![15, 6]), false); [INFO] [stdout] 106 + assert!(!is_valid_config(156, &vec![15, 6])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | assert_eq!(is_valid_config(7290, &vec![6, 8, 6, 15]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 107 - assert_eq!(is_valid_config(7290, &vec![6, 8, 6, 15]), false); [INFO] [stdout] 107 + assert!(!is_valid_config(7290, &vec![6, 8, 6, 15])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | assert_eq!(is_valid_config(161011, &vec![16, 10, 13]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 108 - assert_eq!(is_valid_config(161011, &vec![16, 10, 13]), false); [INFO] [stdout] 108 + assert!(!is_valid_config(161011, &vec![16, 10, 13])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(is_valid_config(192, &vec![17, 8, 14]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 109 - assert_eq!(is_valid_config(192, &vec![17, 8, 14]), false); [INFO] [stdout] 109 + assert!(!is_valid_config(192, &vec![17, 8, 14])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | assert_eq!(is_valid_config(292, &vec![11, 6, 16, 20]), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 110 - assert_eq!(is_valid_config(292, &vec![11, 6, 16, 20]), true); [INFO] [stdout] 110 + assert!(is_valid_config(292, &vec![11, 6, 16, 20])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day7_part1.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | assert_eq!(is_valid_config(21037, &vec![9, 7, 18, 13]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 111 - assert_eq!(is_valid_config(21037, &vec![9, 7, 18, 13]), false); [INFO] [stdout] 111 + assert!(!is_valid_config(21037, &vec![9, 7, 18, 13])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:35:30 [INFO] [stdout] | [INFO] [stdout] 35 | functions.insert("d1p1", || days::day1_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day1_part1::run` [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/main.rs:36:30 [INFO] [stdout] | [INFO] [stdout] 36 | functions.insert("d1p2", || days::day1_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day1_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:37:29 [INFO] [stdout] | [INFO] [stdout] 37 | functions.insert("d2t", || days::day2_part1::test_run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day2_part1::test_run` [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: redundant closure [INFO] [stdout] --> src/main.rs:38:30 [INFO] [stdout] | [INFO] [stdout] 38 | functions.insert("d2p1", || days::day2_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day2_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:39:30 [INFO] [stdout] | [INFO] [stdout] 39 | functions.insert("d2p2", || days::day2_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day2_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:40:30 [INFO] [stdout] | [INFO] [stdout] 40 | functions.insert("d3pt", || days::day3_part1::test_run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day3_part1::test_run` [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: redundant closure [INFO] [stdout] --> src/main.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | functions.insert("d3p1", || days::day3_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day3_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | functions.insert("d3p2", || days::day3_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day3_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:43:30 [INFO] [stdout] | [INFO] [stdout] 43 | functions.insert("d4pt", || days::day4_part1::test_run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day4_part1::test_run` [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: redundant closure [INFO] [stdout] --> src/main.rs:44:30 [INFO] [stdout] | [INFO] [stdout] 44 | functions.insert("d4p1", || days::day4_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day4_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:45:30 [INFO] [stdout] | [INFO] [stdout] 45 | functions.insert("d4p2", || days::day4_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day4_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | functions.insert("d5p1", || days::day5_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day5_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:47:30 [INFO] [stdout] | [INFO] [stdout] 47 | functions.insert("d5p2", || days::day5_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day5_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | functions.insert("d6p1", || days::day6_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day6_part1::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | functions.insert("d6p2", || days::day6_part2::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day6_part2::run` [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: redundant closure [INFO] [stdout] --> src/main.rs:52:30 [INFO] [stdout] | [INFO] [stdout] 52 | functions.insert("d7p1", || days::day7_part1::run()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `days::day7_part1::run` [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/days/day2_part1.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | let test_case = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 59 | | vec![7, 6, 4, 2, 1], //Safe because the levels are all decreasing by 1 or 2. [INFO] [stdout] 60 | | vec![1, 2, 7, 8, 9], //Unsafe because 2 7 is an increase of 5. [INFO] [stdout] 61 | | vec![9, 7, 6, 2, 1], //Unsafe because 6 2 is a decrease of 4. [INFO] [stdout] ... | [INFO] [stdout] 64 | | vec![1, 3, 6, 7, 9], //Safe because the levels are all increasing by 1, 2, or 3. [INFO] [stdout] 65 | | ]; [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 test_case = [vec![7, 6, 4, 2, 1], //Safe because the levels are all decreasing by 1 or 2. [INFO] [stdout] 59 + vec![1, 2, 7, 8, 9], //Unsafe because 2 7 is an increase of 5. [INFO] [stdout] 60 + vec![9, 7, 6, 2, 1], //Unsafe because 6 2 is a decrease of 4. [INFO] [stdout] 61 + vec![1, 3, 2, 4, 5], //Unsafe because 1 3 is increasing but 3 2 is decreasing. [INFO] [stdout] 62 + vec![8, 6, 4, 4, 1], //Unsafe because 4 4 is neither an increase or a decrease. [INFO] [stdout] 63 ~ vec![1, 3, 6, 7, 9]]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day5_part1.rs:159:21 [INFO] [stdout] | [INFO] [stdout] 159 | let pages = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 160 | | vec!["97", "75", "47", "61", "53"], [INFO] [stdout] 161 | | vec!["61", "29", "13"], [INFO] [stdout] 162 | | vec!["97", "75", "47", "29", "13"], [INFO] [stdout] 163 | | ]; [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] 159 ~ let pages = [vec!["97", "75", "47", "61", "53"], [INFO] [stdout] 160 + vec!["61", "29", "13"], [INFO] [stdout] 161 ~ vec!["97", "75", "47", "29", "13"]]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day6_part1.rs:22:27 [INFO] [stdout] | [INFO] [stdout] 22 | let entity_form_dir = vec![('^', 0), ('>', 90), ('v', 180), ('<', 270)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[('^', 0), ('>', 90), ('v', 180), ('<', 270)]` [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 4.93s [INFO] running `Command { std: "docker" "inspect" "89f18a3519af4a4d27322e61d5021aaf4ae7f453bf0a6330e740954049d3970f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89f18a3519af4a4d27322e61d5021aaf4ae7f453bf0a6330e740954049d3970f", kill_on_drop: false }` [INFO] [stdout] 89f18a3519af4a4d27322e61d5021aaf4ae7f453bf0a6330e740954049d3970f