[INFO] cloning repository https://github.com/Sundin/aoc_2020_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Sundin/aoc_2020_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSundin%2Faoc_2020_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSundin%2Faoc_2020_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a30a80244e5d42059822324cdd1ff5eddf665419 [INFO] linting Sundin/aoc_2020_rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSundin%2Faoc_2020_rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Sundin/aoc_2020_rust [INFO] finished tweaking git repo https://github.com/Sundin/aoc_2020_rust [INFO] tweaked toml for git repo https://github.com/Sundin/aoc_2020_rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Sundin/aoc_2020_rust 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/Sundin/aoc_2020_rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] de5dda5ea3cec28d8c04031a77655125bf3d5b4e4cb0c7b4026289db3061bd21 [INFO] running `Command { std: "docker" "start" "-a" "de5dda5ea3cec28d8c04031a77655125bf3d5b4e4cb0c7b4026289db3061bd21", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "de5dda5ea3cec28d8c04031a77655125bf3d5b4e4cb0c7b4026289db3061bd21", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "de5dda5ea3cec28d8c04031a77655125bf3d5b4e4cb0c7b4026289db3061bd21", kill_on_drop: false }` [INFO] [stdout] de5dda5ea3cec28d8c04031a77655125bf3d5b4e4cb0c7b4026289db3061bd21 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] dbc0be86e51109e01dd517d35b232b5c6f42ac5493f68d7d4f8ed594992a965d [INFO] running `Command { std: "docker" "start" "-a" "dbc0be86e51109e01dd517d35b232b5c6f42ac5493f68d7d4f8ed594992a965d", kill_on_drop: false }` [INFO] [stderr] Checking regex v1.4.2 [INFO] [stderr] Checking aoc_2020_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day2.rs:23:93 [INFO] [stdout] | [INFO] [stdout] 23 | Ok(PasswordPolicy { password: password.to_string(), position1: min, position2: max, letter: letter }) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `letter` [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/day2.rs:23:93 [INFO] [stdout] | [INFO] [stdout] 23 | Ok(PasswordPolicy { password: password.to_string(), position1: min, position2: max, letter: letter }) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `letter` [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/day3.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | Ok(Row { trees: trees }) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `trees` [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/day3.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | Ok(Row { trees: trees }) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `trees` [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/day5.rs:22:54 [INFO] [stdout] | [INFO] [stdout] 22 | Ok(BoardingPass { binary: input.to_string(), seat_id: seat_id }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `seat_id` [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/day8.rs:24:60 [INFO] [stdout] | [INFO] [stdout] 24 | Ok(Instruction { operation: operation.to_string(), argument: argument }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `argument` [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/day8.rs:44:75 [INFO] [stdout] | [INFO] [stdout] 44 | let instruction = Instruction { operation: "jmp".to_string(), argument: argument }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `argument` [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/day8.rs:49:75 [INFO] [stdout] | [INFO] [stdout] 49 | let instruction = Instruction { operation: "nop".to_string(), argument: argument }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `argument` [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/day5.rs:22:54 [INFO] [stdout] | [INFO] [stdout] 22 | Ok(BoardingPass { binary: input.to_string(), seat_id: seat_id }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `seat_id` [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/day8.rs:24:60 [INFO] [stdout] | [INFO] [stdout] 24 | Ok(Instruction { operation: operation.to_string(), argument: argument }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `argument` [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/day8.rs:44:75 [INFO] [stdout] | [INFO] [stdout] 44 | let instruction = Instruction { operation: "jmp".to_string(), argument: argument }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `argument` [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/day8.rs:49:75 [INFO] [stdout] | [INFO] [stdout] 49 | let instruction = Instruction { operation: "nop".to_string(), argument: argument }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `argument` [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: unused variable: `input` [INFO] [stdout] --> src/day7.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn part_2(input: &str) -> i32 { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/day8.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | for (i, line) in input.lines().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/day9.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | for (i, number) in input.iter().enumerate() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/day10.rs:24:15 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn part_2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/files.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | contents.lines().map(|x| to_number(x)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `to_number` [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/files.rs:13:26 [INFO] [stdout] | [INFO] [stdout] 13 | contents.lines().map(|x| to_number_64(x)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `to_number_64` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:1:40 [INFO] [stdout] | [INFO] [stdout] 1 | fn find_two_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1 - fn find_two_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32) { [INFO] [stdout] 1 + fn find_two_entries_with_sum(contents: &[i32], sum: i32) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:14:42 [INFO] [stdout] | [INFO] [stdout] 14 | fn find_three_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32, i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn find_three_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32, i32) { [INFO] [stdout] 14 + fn find_three_entries_with_sum(contents: &[i32], sum: i32) -> (i32, i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/day7.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn part_2(input: &str) -> i32 { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) 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/day1.rs:30:44 [INFO] [stdout] | [INFO] [stdout] 30 | let (x, y) = find_two_entries_with_sum(&contents, sum); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1.rs:35:49 [INFO] [stdout] | [INFO] [stdout] 35 | let (x, y, z) = find_three_entries_with_sum(&contents, sum); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/day8.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | for (i, line) in input.lines().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/day2.rs:28:22 [INFO] [stdout] | [INFO] [stdout] 28 | let occurences = password_policy.password.matches(password_policy.letter).count() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `password_policy.password.matches(password_policy.letter).count()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | check_slope(&input, 3) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:33:25 [INFO] [stdout] | [INFO] [stdout] 33 | let a = check_slope(&input, 1); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:34:25 [INFO] [stdout] | [INFO] [stdout] 34 | let b = check_slope(&input, 3); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:35:25 [INFO] [stdout] | [INFO] [stdout] 35 | let c = check_slope(&input, 5); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | let d = check_slope(&input, 7); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:37:32 [INFO] [stdout] | [INFO] [stdout] 37 | let e = check_slope_down_2(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/day9.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | for (i, number) in input.iter().enumerate() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/day10.rs:24:15 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn part_2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:18:22 [INFO] [stdout] | [INFO] [stdout] 18 | birth_year_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:19:22 [INFO] [stdout] | [INFO] [stdout] 19 | issue_year_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:20:27 [INFO] [stdout] | [INFO] [stdout] 20 | expiration_year_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | height_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | hair_color_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | eye_color_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | passport_id_valid(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | let byr = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/files.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | contents.lines().map(|x| to_number(x)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `to_number` [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/files.rs:13:26 [INFO] [stdout] | [INFO] [stdout] 13 | contents.lines().map(|x| to_number_64(x)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `to_number_64` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | byr >= 1920 && byr <= 2002 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&byr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:1:40 [INFO] [stdout] | [INFO] [stdout] 1 | fn find_two_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1 - fn find_two_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32) { [INFO] [stdout] 1 + fn find_two_entries_with_sum(contents: &[i32], sum: i32) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | let iyr = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | iyr >= 2010 && iyr <= 2020 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&iyr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:14:42 [INFO] [stdout] | [INFO] [stdout] 14 | fn find_three_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32, i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn find_three_entries_with_sum(contents: &Vec, sum: i32) -> (i32, i32, i32) { [INFO] [stdout] 14 + fn find_three_entries_with_sum(contents: &[i32], sum: i32) -> (i32, i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:66:15 [INFO] [stdout] | [INFO] [stdout] 66 | let eyr = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | eyr >= 2020 && eyr <= 2030 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&eyr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | valid_centimeters(&input) || valid_inches(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:73:47 [INFO] [stdout] | [INFO] [stdout] 73 | valid_centimeters(&input) || valid_inches(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1.rs:30:44 [INFO] [stdout] | [INFO] [stdout] 30 | let (x, y) = find_two_entries_with_sum(&contents, sum); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1.rs:35:49 [INFO] [stdout] | [INFO] [stdout] 35 | let (x, y, z) = find_three_entries_with_sum(&contents, sum); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:85:14 [INFO] [stdout] | [INFO] [stdout] 85 | let cm = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | cm >= 150 && cm <= 193 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&cm)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 100 | let inches = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | inches >= 59 && inches <= 76 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&inches)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | REGEX.find_iter(input).nth(0).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:121:5 [INFO] [stdout] | [INFO] [stdout] 121 | REGEX.find_iter(input).nth(0).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 130 | REGEX.find_iter(input).nth(0).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day4.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day4.rs:156:12 [INFO] [stdout] | [INFO] [stdout] 156 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/day2.rs:28:22 [INFO] [stdout] | [INFO] [stdout] 28 | let occurences = password_policy.password.matches(password_policy.letter).count() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `password_policy.password.matches(password_policy.letter).count()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day5.rs:27:48 [INFO] [stdout] | [INFO] [stdout] 27 | let boarding_passes = sort_boarding_passes(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day5.rs:32:48 [INFO] [stdout] | [INFO] [stdout] 32 | let boarding_passes = sort_boarding_passes(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/day5.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | boarding_passes.sort_by(|a, b| a.seat_id.cmp(&b.seat_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 49 - boarding_passes.sort_by(|a, b| a.seat_id.cmp(&b.seat_id)); [INFO] [stdout] 49 + boarding_passes.sort_by_key(|a| a.seat_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day6.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | assert_eq!(true, check_password_policy(p)); [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] 79 - assert_eq!(true, check_password_policy(p)); [INFO] [stdout] 79 + assert!(check_password_policy(p)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day6.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | assert_eq!(true, check_password_policy(p)); [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] 81 - assert_eq!(true, check_password_policy(p)); [INFO] [stdout] 81 + assert!(check_password_policy(p)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | assert_eq!(false, check_password_policy(p)); [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] 83 - assert_eq!(false, check_password_policy(p)); [INFO] [stdout] 83 + assert!(!check_password_policy(p)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | assert_eq!(true, check_password_policy_2(p)); [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] 89 - assert_eq!(true, check_password_policy_2(p)); [INFO] [stdout] 89 + assert!(check_password_policy_2(p)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | assert_eq!(false, check_password_policy_2(p)); [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] 91 - assert_eq!(false, check_password_policy_2(p)); [INFO] [stdout] 91 + assert!(!check_password_policy_2(p)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:13:55 [INFO] [stdout] | [INFO] [stdout] 13 | let (found, found_color) = bag_contains_color(&line, &color); [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:13:62 [INFO] [stdout] | [INFO] [stdout] 13 | let (found, found_color) = bag_contains_color(&line, &color); [INFO] [stdout] | ^^^^^^ help: change this to: `color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:16:48 [INFO] [stdout] | [INFO] [stdout] 16 | for bag in count_bags_that_contain(&input, &found_color) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | assert_eq!(false, check_password_policy_2(p)); [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] 93 - assert_eq!(false, check_password_policy_2(p)); [INFO] [stdout] 93 + assert!(!check_password_policy_2(p)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day7.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 30 | let bag_color = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day8.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | if (&input[4..5]).eq("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `input[4..5]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | check_slope(&input, 3) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day8.rs:29:50 [INFO] [stdout] | [INFO] [stdout] 29 | let (_, accumulator) = parse_and_run_program(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:33:25 [INFO] [stdout] | [INFO] [stdout] 33 | let a = check_slope(&input, 1); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:34:25 [INFO] [stdout] | [INFO] [stdout] 34 | let b = check_slope(&input, 3); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:35:25 [INFO] [stdout] | [INFO] [stdout] 35 | let c = check_slope(&input, 5); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | let d = check_slope(&input, 7); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day3.rs:37:32 [INFO] [stdout] | [INFO] [stdout] 37 | let e = check_slope_down_2(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day9.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part_1(input: &Vec, preamble: usize) -> i64 { [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] 3 - pub fn part_1(input: &Vec, preamble: usize) -> i64 { [INFO] [stdout] 3 + pub fn part_1(input: &[i64], preamble: usize) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day9.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | for vpair in input.into_iter().combinations(2) { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | assert_eq!(false, has_tree_at(row, 0)); [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] 82 - assert_eq!(false, has_tree_at(row, 0)); [INFO] [stdout] 82 + assert!(!has_tree_at(row, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | assert_eq!(true, has_tree_at(row, 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] 84 - assert_eq!(true, has_tree_at(row, 2)); [INFO] [stdout] 84 + assert!(has_tree_at(row, 2)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | assert_eq!(true, has_tree_at(row, 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] 86 - assert_eq!(true, has_tree_at(row, 2)); [INFO] [stdout] 86 + assert!(has_tree_at(row, 2)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day9.rs:29:29 [INFO] [stdout] | [INFO] [stdout] 29 | let target_sum = part_1(&input, preamble); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | assert_eq!(false, has_tree_at(row, 5)); [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] 88 - assert_eq!(false, has_tree_at(row, 5)); [INFO] [stdout] 88 + assert!(!has_tree_at(row, 5)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort` [INFO] [stdout] --> src/day9.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] 40 + contiguous.sort(); [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/day10.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part_1(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 ~ pub fn part_1(input: &[i32]) -> i32 { [INFO] [stdout] 4 ~ let mut contiguous = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort` [INFO] [stdout] --> src/day10.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 6 - contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] 6 + contiguous.sort(); [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/day10.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn part_2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - pub fn part_2(input: &Vec) -> i32 { [INFO] [stdout] 24 + pub fn part_2(input: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:66:45 [INFO] [stdout] | [INFO] [stdout] 66 | let answer = day2::count_valid_password(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:68:47 [INFO] [stdout] | [INFO] [stdout] 68 | let answer = day2::count_valid_occurences(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:73:31 [INFO] [stdout] | [INFO] [stdout] 73 | let answer = day3::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:18:22 [INFO] [stdout] | [INFO] [stdout] 18 | birth_year_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:75:31 [INFO] [stdout] | [INFO] [stdout] 75 | let answer = day3::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:19:22 [INFO] [stdout] | [INFO] [stdout] 19 | issue_year_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:20:27 [INFO] [stdout] | [INFO] [stdout] 20 | expiration_year_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | height_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:80:31 [INFO] [stdout] | [INFO] [stdout] 80 | let answer = day4::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | hair_color_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | eye_color_valid(&input) && [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | passport_id_valid(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:82:31 [INFO] [stdout] | [INFO] [stdout] 82 | let answer = day4::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:87:31 [INFO] [stdout] | [INFO] [stdout] 87 | let answer = day5::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | let answer = day5::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | let byr = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:94:31 [INFO] [stdout] | [INFO] [stdout] 94 | let answer = day6::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | byr >= 1920 && byr <= 2002 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&byr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:96:31 [INFO] [stdout] | [INFO] [stdout] 96 | let answer = day6::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:101:31 [INFO] [stdout] | [INFO] [stdout] 101 | let answer = day7::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:103:31 [INFO] [stdout] | [INFO] [stdout] 103 | let answer = day7::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | let iyr = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | iyr >= 2010 && iyr <= 2020 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&iyr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:108:31 [INFO] [stdout] | [INFO] [stdout] 108 | let answer = day8::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:110:31 [INFO] [stdout] | [INFO] [stdout] 110 | let answer = day8::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:66:15 [INFO] [stdout] | [INFO] [stdout] 66 | let eyr = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | eyr >= 2020 && eyr <= 2030 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&eyr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | valid_centimeters(&input) || valid_inches(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:73:47 [INFO] [stdout] | [INFO] [stdout] 73 | valid_centimeters(&input) || valid_inches(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:85:14 [INFO] [stdout] | [INFO] [stdout] 85 | let cm = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | cm >= 150 && cm <= 193 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&cm)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day4.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `REGEX.find_iter(input).nth(0).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | if !REGEX.find_iter(input).nth(0).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 100 | let inches = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day4.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | inches >= 59 && inches <= 76 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&inches)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:112:5 [INFO] [stdout] | [INFO] [stdout] 112 | REGEX.find_iter(input).nth(0).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:121:5 [INFO] [stdout] | [INFO] [stdout] 121 | REGEX.find_iter(input).nth(0).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day4.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 130 | REGEX.find_iter(input).nth(0).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.find_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day4.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day4.rs:156:12 [INFO] [stdout] | [INFO] [stdout] 156 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day4.rs:181:9 [INFO] [stdout] | [INFO] [stdout] 181 | assert_eq!(true, is_valid(&input)); [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] 181 - assert_eq!(true, is_valid(&input)); [INFO] [stdout] 181 + assert!(is_valid(&input)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:181:35 [INFO] [stdout] | [INFO] [stdout] 181 | assert_eq!(true, is_valid(&input)); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day4.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | assert_eq!(false, is_valid(&input)); [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] 185 - assert_eq!(false, is_valid(&input)); [INFO] [stdout] 185 + assert!(!is_valid(&input)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:185:36 [INFO] [stdout] | [INFO] [stdout] 185 | assert_eq!(false, is_valid(&input)); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day4.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | assert_eq!(true, is_valid(&input)); [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] 191 - assert_eq!(true, is_valid(&input)); [INFO] [stdout] 191 + assert!(is_valid(&input)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:191:35 [INFO] [stdout] | [INFO] [stdout] 191 | assert_eq!(true, is_valid(&input)); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day4.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | assert_eq!(false, is_valid(&input)); [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] 195 - assert_eq!(false, is_valid(&input)); [INFO] [stdout] 195 + assert!(!is_valid(&input)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:195:36 [INFO] [stdout] | [INFO] [stdout] 195 | assert_eq!(false, is_valid(&input)); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day4.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | assert_eq!(true, passport_id_valid(&input)); [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] 201 - assert_eq!(true, passport_id_valid(&input)); [INFO] [stdout] 201 + assert!(passport_id_valid(&input)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:201:44 [INFO] [stdout] | [INFO] [stdout] 201 | assert_eq!(true, passport_id_valid(&input)); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day4.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | assert_eq!(false, passport_id_valid(&input)); [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] 203 - assert_eq!(false, passport_id_valid(&input)); [INFO] [stdout] 203 + assert!(!passport_id_valid(&input)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:203:45 [INFO] [stdout] | [INFO] [stdout] 203 | assert_eq!(false, passport_id_valid(&input)); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day5.rs:27:48 [INFO] [stdout] | [INFO] [stdout] 27 | let boarding_passes = sort_boarding_passes(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day5.rs:32:48 [INFO] [stdout] | [INFO] [stdout] 32 | let boarding_passes = sort_boarding_passes(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/day5.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | boarding_passes.sort_by(|a, b| a.seat_id.cmp(&b.seat_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 49 - boarding_passes.sort_by(|a, b| a.seat_id.cmp(&b.seat_id)); [INFO] [stdout] 49 + boarding_passes.sort_by_key(|a| a.seat_id); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day6.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day6.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if line == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:13:55 [INFO] [stdout] | [INFO] [stdout] 13 | let (found, found_color) = bag_contains_color(&line, &color); [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:13:62 [INFO] [stdout] | [INFO] [stdout] 13 | let (found, found_color) = bag_contains_color(&line, &color); [INFO] [stdout] | ^^^^^^ help: change this to: `color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:16:48 [INFO] [stdout] | [INFO] [stdout] 16 | for bag in count_bags_that_contain(&input, &found_color) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day7.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 30 | let bag_color = REGEX.captures_iter(input).nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `REGEX.captures_iter(input).next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day8.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | if (&input[4..5]).eq("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `input[4..5]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day8.rs:29:50 [INFO] [stdout] | [INFO] [stdout] 29 | let (_, accumulator) = parse_and_run_program(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day9.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part_1(input: &Vec, preamble: usize) -> i64 { [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] 3 - pub fn part_1(input: &Vec, preamble: usize) -> i64 { [INFO] [stdout] 3 + pub fn part_1(input: &[i64], preamble: usize) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day9.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | for vpair in input.into_iter().combinations(2) { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day9.rs:29:29 [INFO] [stdout] | [INFO] [stdout] 29 | let target_sum = part_1(&input, preamble); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort` [INFO] [stdout] --> src/day9.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 40 - contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] 40 + contiguous.sort(); [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/day10.rs:3:22 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part_1(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 ~ pub fn part_1(input: &[i32]) -> i32 { [INFO] [stdout] 4 ~ let mut contiguous = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort` [INFO] [stdout] --> src/day10.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 6 - contiguous.sort_by(|a, b| a.cmp(b)); [INFO] [stdout] 6 + contiguous.sort(); [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/day10.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn part_2(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - pub fn part_2(input: &Vec) -> i32 { [INFO] [stdout] 24 + pub fn part_2(input: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:66:45 [INFO] [stdout] | [INFO] [stdout] 66 | let answer = day2::count_valid_password(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:68:47 [INFO] [stdout] | [INFO] [stdout] 68 | let answer = day2::count_valid_occurences(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:73:31 [INFO] [stdout] | [INFO] [stdout] 73 | let answer = day3::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:75:31 [INFO] [stdout] | [INFO] [stdout] 75 | let answer = day3::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:80:31 [INFO] [stdout] | [INFO] [stdout] 80 | let answer = day4::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:82:31 [INFO] [stdout] | [INFO] [stdout] 82 | let answer = day4::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:87:31 [INFO] [stdout] | [INFO] [stdout] 87 | let answer = day5::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | let answer = day5::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:94:31 [INFO] [stdout] | [INFO] [stdout] 94 | let answer = day6::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:96:31 [INFO] [stdout] | [INFO] [stdout] 96 | let answer = day6::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:101:31 [INFO] [stdout] | [INFO] [stdout] 101 | let answer = day7::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:103:31 [INFO] [stdout] | [INFO] [stdout] 103 | let answer = day7::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:108:31 [INFO] [stdout] | [INFO] [stdout] 108 | let answer = day8::part_1(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:110:31 [INFO] [stdout] | [INFO] [stdout] 110 | let answer = day8::part_2(&contents); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `contents` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.53s [INFO] running `Command { std: "docker" "inspect" "dbc0be86e51109e01dd517d35b232b5c6f42ac5493f68d7d4f8ed594992a965d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dbc0be86e51109e01dd517d35b232b5c6f42ac5493f68d7d4f8ed594992a965d", kill_on_drop: false }` [INFO] [stdout] dbc0be86e51109e01dd517d35b232b5c6f42ac5493f68d7d4f8ed594992a965d