[INFO] cloning repository https://github.com/Yeah69/AdventOfCodeRust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Yeah69/AdventOfCodeRust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FYeah69%2FAdventOfCodeRust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FYeah69%2FAdventOfCodeRust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b9c37a7f35d75354067e7d632e50efdf1a8eb2dc [INFO] linting Yeah69/AdventOfCodeRust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FYeah69%2FAdventOfCodeRust" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Yeah69/AdventOfCodeRust [INFO] finished tweaking git repo https://github.com/Yeah69/AdventOfCodeRust [INFO] tweaked toml for git repo https://github.com/Yeah69/AdventOfCodeRust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Yeah69/AdventOfCodeRust 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 20 packages to latest compatible versions [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded num-complex v0.2.4 [INFO] [stderr] Downloaded mod_exp v1.0.1 [INFO] [stderr] Downloaded permutohedron v0.2.4 [INFO] [stderr] Downloaded num v0.2.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] ecea26deab2edaec0b2184c974235bc86828b259d62de6ae8754722df02fda99 [INFO] running `Command { std: "docker" "start" "-a" "ecea26deab2edaec0b2184c974235bc86828b259d62de6ae8754722df02fda99", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ecea26deab2edaec0b2184c974235bc86828b259d62de6ae8754722df02fda99", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ecea26deab2edaec0b2184c974235bc86828b259d62de6ae8754722df02fda99", kill_on_drop: false }` [INFO] [stdout] ecea26deab2edaec0b2184c974235bc86828b259d62de6ae8754722df02fda99 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 93f46d74fe4634686e22dba536748adf234ea5be6f78aa08e8c6340e9a0450bf [INFO] running `Command { std: "docker" "start" "-a" "93f46d74fe4634686e22dba536748adf234ea5be6f78aa08e8c6340e9a0450bf", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling num-rational v0.2.4 [INFO] [stderr] Compiling num-complex v0.2.4 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking colored v3.1.1 [INFO] [stderr] Checking permutohedron v0.2.4 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking num v0.2.1 [INFO] [stderr] Checking mod_exp v1.0.1 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking advent_of_code_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_12.rs:18:33 [INFO] [stdout] | [INFO] [stdout] 18 | let mut moons = Moons { moons: moons}; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `moons` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_12.rs:30:33 [INFO] [stdout] | [INFO] [stdout] 30 | let mut moons = Moons { moons: moons}; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `moons` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:134:110 [INFO] [stdout] | [INFO] [stdout] 134 | heap.push(PathState1 { position: node_position, distance: current_state.distance + distance, floor: floor }); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `floor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | map: map, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:369:9 [INFO] [stdout] | [INFO] [stdout] 369 | pos_to_label_and_layer: pos_to_label_and_layer, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pos_to_label_and_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:370:9 [INFO] [stdout] | [INFO] [stdout] 370 | inner_layer_to_port_position: inner_layer_to_port_position, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inner_layer_to_port_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | outer_layer_to_port_position: outer_layer_to_port_position [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `outer_layer_to_port_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_23.rs:102:15 [INFO] [stdout] | [INFO] [stdout] 102 | Network { programs: programs } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `programs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_12.rs:18:33 [INFO] [stdout] | [INFO] [stdout] 18 | let mut moons = Moons { moons: moons}; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `moons` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_12.rs:30:33 [INFO] [stdout] | [INFO] [stdout] 30 | let mut moons = Moons { moons: moons}; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `moons` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:134:110 [INFO] [stdout] | [INFO] [stdout] 134 | heap.push(PathState1 { position: node_position, distance: current_state.distance + distance, floor: floor }); [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `floor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | map: map, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:369:9 [INFO] [stdout] | [INFO] [stdout] 369 | pos_to_label_and_layer: pos_to_label_and_layer, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pos_to_label_and_layer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:370:9 [INFO] [stdout] | [INFO] [stdout] 370 | inner_layer_to_port_position: inner_layer_to_port_position, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inner_layer_to_port_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_20.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | outer_layer_to_port_position: outer_layer_to_port_position [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `outer_layer_to_port_position` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/days/day_23.rs:102:15 [INFO] [stdout] | [INFO] [stdout] 102 | Network { programs: programs } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `programs` [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: use of deprecated method `itertools::Itertools::group_by`: Use .chunk_by() instead [INFO] [stdout] --> src/days/day_06.rs:62:10 [INFO] [stdout] | [INFO] [stdout] 62 | .group_by(|(key, _)| key.to_string()) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `itertools::Itertools::group_by`: Use .chunk_by() instead [INFO] [stdout] --> src/days/day_06.rs:62:10 [INFO] [stdout] | [INFO] [stdout] 62 | .group_by(|(key, _)| key.to_string()) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day01` is never constructed [INFO] [stdout] --> src/days/day_01.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Day01; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fuel_calculation` is never used [INFO] [stdout] --> src/days/day_01.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn fuel_calculation(mass : i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day02` is never constructed [INFO] [stdout] --> src/days/day_02.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day02; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_output` is never used [INFO] [stdout] --> src/days/day_02.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn find_output (text_code: &String, seeked_output: i128) -> (i128, i128) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration` is never used [INFO] [stdout] --> src/days/day_02.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | fn iteration(text_code: &String, noun: i128, verb: i128) -> i128 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day03` is never constructed [INFO] [stdout] --> src/days/day_03.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Day03; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day_03.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Instruction` is never constructed [INFO] [stdout] --> src/days/day_03.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Instruction { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_distances_to_intersections` is never used [INFO] [stdout] --> src/days/day_03.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn get_distances_to_intersections (path: &Vec<(i32, i32)>, intersections: &HashSet<&(i32, i32)>) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_paths` is never used [INFO] [stdout] --> src/days/day_03.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_paths (input: &str) -> (Vec<(i32, i32)>, Vec<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_points` is never used [INFO] [stdout] --> src/days/day_03.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn get_points(instructions: &Vec) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_instruction` is never used [INFO] [stdout] --> src/days/day_03.rs:114:4 [INFO] [stdout] | [INFO] [stdout] 114 | fn parse_to_instruction(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day04` is never constructed [INFO] [stdout] --> src/days/day_04.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day04; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `task_impl` is never used [INFO] [stdout] --> src/days/day_04.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn task_impl (input: &String, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_of_possible_passwords` is never used [INFO] [stdout] --> src/days/day_04.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn count_of_possible_passwords (range: RangeInclusive, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_range` is never used [INFO] [stdout] --> src/days/day_04.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn parse_to_range(text: &str) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day05` is never constructed [INFO] [stdout] --> src/days/day_05.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day05; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration` is never used [INFO] [stdout] --> src/days/day_05.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn iteration(text_code: &String, input: i128) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day06` is never constructed [INFO] [stdout] --> src/days/day_06.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day06; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `determine_orbital_transfers_to_santa` is never used [INFO] [stdout] --> src/days/day_06.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn determine_orbital_transfers_to_santa(adjacency_map: &HashMap>, current_node: String) -> (Option, Option<... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_connections` is never used [INFO] [stdout] --> src/days/day_06.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn count_connections(adjacency_map: &HashMap>, current_node: String) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_adjacency_map` is never used [INFO] [stdout] --> src/days/day_06.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn generate_adjacency_map (input: &String) -> HashMap> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_tuple` is never used [INFO] [stdout] --> src/days/day_06.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | fn parse_to_tuple(text: &str) -> Option<(String, String)> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day07` is never constructed [INFO] [stdout] --> src/days/day_07.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day07; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `amplifier_sequence` is never used [INFO] [stdout] --> src/days/day_07.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn amplifier_sequence( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration_1` is never used [INFO] [stdout] --> src/days/day_07.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn iteration_1 (text_code: &String, phase_setting: Vec) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration_0` is never used [INFO] [stdout] --> src/days/day_07.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn iteration_0 (text_code: &String, phase_setting: Vec) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_all_possible_phase_settings` is never used [INFO] [stdout] --> src/days/day_07.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_all_possible_phase_settings (data: &mut [i128]) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day08` is never constructed [INFO] [stdout] --> src/days/day_08.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day08; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day09` is never constructed [INFO] [stdout] --> src/days/day_09.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day09; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `task_impl` is never used [INFO] [stdout] --> src/days/day_09.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn task_impl (input: &String, input_number: i128) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day10` is never constructed [INFO] [stdout] --> src/days/day_10.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day10; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_asteroid_points` is never used [INFO] [stdout] --> src/days/day_10.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_asteroid_points (input: &String) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_sightable_asteroids` is never used [INFO] [stdout] --> src/days/day_10.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn count_sightable_asteroids (position: (i32, i32), all_asteroid_positions: &Vec<(i32, i32)>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_visible_aseteroids` is never used [INFO] [stdout] --> src/days/day_10.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn get_visible_aseteroids (position: (i32, i32), all_asteroid_positions: &Vec<(i32, i32)>) -> HashSet<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day11` is never constructed [INFO] [stdout] --> src/days/day_11.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Day11; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day_11.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `change_direction` is never used [INFO] [stdout] --> src/days/day_11.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn change_direction (current_direction: &Direction, value: i128) -> Direction { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step` is never used [INFO] [stdout] --> src/days/day_11.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn step (position: (i32, i32), direction: &Direction) -> (i32, i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_painting_robot` is never used [INFO] [stdout] --> src/days/day_11.rs:87:4 [INFO] [stdout] | [INFO] [stdout] 87 | fn run_painting_robot (input: &String, first_input: i128) -> (HashSet<(i32, i32)>, HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day12` is never constructed [INFO] [stdout] --> src/days/day_12.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day12; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lowest_common_multiple` is never used [INFO] [stdout] --> src/days/day_12.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn lowest_common_multiple (set: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Moons` is never constructed [INFO] [stdout] --> src/days/day_12.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | struct Moons { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `apply_gravity`, `apply_velocity`, `calculate_energy`, `check_for_sequence`, and `collect_rates` are never used [INFO] [stdout] --> src/days/day_12.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 63 | impl Moons { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 64 | fn apply_gravity (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | fn apply_velocity (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn calculate_energy (&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | fn check_for_sequence (&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | fn collect_rates (&self, set: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Moon` is never constructed [INFO] [stdout] --> src/days/day_12.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | struct Moon { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `apply_gravity`, `apply_velocity`, `calculate_energy`, `check_for_sequence`, and `collect_rates` are never used [INFO] [stdout] --> src/days/day_12.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 110 | impl Moon { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 111 | fn apply_gravity (&mut self, other: &Moon) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | fn apply_velocity (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | fn calculate_energy (&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | fn check_for_sequence (&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 165 | fn collect_rates (&self, set: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_moon` is never used [INFO] [stdout] --> src/days/day_12.rs:172:4 [INFO] [stdout] | [INFO] [stdout] 172 | fn parse_to_moon(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day13` is never constructed [INFO] [stdout] --> src/days/day_13.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day13; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day14` is never constructed [INFO] [stdout] --> src/days/day_14.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day14; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_required_ore` is never used [INFO] [stdout] --> src/days/day_14.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn get_required_ore ( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_recipe` is never used [INFO] [stdout] --> src/days/day_14.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn parse_to_recipe(line: &str) -> Option<(String, (Vec<(String, i64)>, i64))> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day15` is never constructed [INFO] [stdout] --> src/days/day_15.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day15; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fill_room_with_oxygen` is never used [INFO] [stdout] --> src/days/day_15.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn fill_room_with_oxygen (start: (i32, i32), map: &HashMap<(i32, i32), i128>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_length_of_shortest_path_to_oxygen_system` is never used [INFO] [stdout] --> src/days/day_15.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn get_length_of_shortest_path_to_oxygen_system (map: &HashMap<(i32, i32), i128>) -> Option<((i32, i32), i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `explore_map` is never used [INFO] [stdout] --> src/days/day_15.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn explore_map (program: &mut int_code::IntCodeProgram, map: &mut HashMap<(i32, i32), i128>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day16` is never constructed [INFO] [stdout] --> src/days/day_16.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day16; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_digity` is never used [INFO] [stdout] --> src/days/day_16.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn get_digity (index: usize, iteration: i32, signal: &Vec, pattern: &[i32; 4], cache: &mut HashMap<(usize, i32), i32>, length: ... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_numbers` is never used [INFO] [stdout] --> src/days/day_16.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn generate_numbers (mut input: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day17` is never constructed [INFO] [stdout] --> src/days/day_17.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day17; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prepare_input_sequence_for_specific_machine` is never used [INFO] [stdout] --> src/days/day_17.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn prepare_input_sequence_for_specific_machine (original_sequence: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_input_sequence` is never used [INFO] [stdout] --> src/days/day_17.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn get_input_sequence (start_position: (i128, i128), start_direction: i32, map: &HashSet<(i128,i128)>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_map_and_robot_status` is never used [INFO] [stdout] --> src/days/day_17.rs:169:4 [INFO] [stdout] | [INFO] [stdout] 169 | fn get_map_and_robot_status (text_code: &String, ) -> (HashSet<(i128,i128)>, (i128, i128), i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day18` is never constructed [INFO] [stdout] --> src/days/day_18.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day18; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/days/day_18.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathState` is never constructed [INFO] [stdout] --> src/days/day_18.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct PathState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `NodeType` is never used [INFO] [stdout] --> src/days/day_18.rs:35:6 [INFO] [stdout] | [INFO] [stdout] 35 | enum NodeType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `determine_shortest_round_trip_quadriple` is never used [INFO] [stdout] --> src/days/day_18.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn determine_shortest_round_trip_quadriple (whole_map: &HashMap<(i32, i32), Node>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day01` is never constructed [INFO] [stdout] --> src/days/day_01.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Day01; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fuel_calculation` is never used [INFO] [stdout] --> src/days/day_01.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn fuel_calculation(mass : i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `determine_shortest_round_trip_single` is never used [INFO] [stdout] --> src/days/day_18.rs:159:4 [INFO] [stdout] | [INFO] [stdout] 159 | fn determine_shortest_round_trip_single (whole_map: &HashMap<(i32, i32), Node>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/days/day_18.rs:218:4 [INFO] [stdout] | [INFO] [stdout] 218 | fn parse (input: &String) -> HashMap<(i32, i32), Node> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day19` is never constructed [INFO] [stdout] --> src/days/day_19.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day19; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_position` is never used [INFO] [stdout] --> src/days/day_19.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn check_position (x: i128, y: i128, text_code: &String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day20` is never constructed [INFO] [stdout] --> src/days/day_20.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day20; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shortest_path` is never used [INFO] [stdout] --> src/days/day_20.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn shortest_path ( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathState` is never constructed [INFO] [stdout] --> src/days/day_20.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | struct PathState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathState1` is never constructed [INFO] [stdout] --> src/days/day_20.rs:65:8 [INFO] [stdout] | [INFO] [stdout] 65 | struct PathState1 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day_20.rs:84:6 [INFO] [stdout] | [INFO] [stdout] 84 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Layer` is never used [INFO] [stdout] --> src/days/day_20.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum Layer { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/days/day_20.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Maze` is never constructed [INFO] [stdout] --> src/days/day_20.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | struct Maze { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `shortest_path` and `get_port` are never used [INFO] [stdout] --> src/days/day_20.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 114 | impl Maze { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 115 | fn shortest_path (&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 140 | fn get_port (&self, next_node: &Option<((i32, i32), i32)>, possible_label_position: (i32, i32), current_floor: i32) -> Option<(... [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_1` is never used [INFO] [stdout] --> src/days/day_20.rs:158:4 [INFO] [stdout] | [INFO] [stdout] 158 | fn parse_1 (input: &String) -> Maze { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/days/day_20.rs:375:4 [INFO] [stdout] | [INFO] [stdout] 375 | fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (i32, i32), (i32, i32)) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day21` is never constructed [INFO] [stdout] --> src/days/day_21.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day21; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day23` is never constructed [INFO] [stdout] --> src/days/day_23.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day23; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Network` is never constructed [INFO] [stdout] --> src/days/day_23.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | struct Network { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `do_task` is never used [INFO] [stdout] --> src/days/day_23.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl Network { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 26 | fn do_task (&mut self, is_task_0: bool) -> i128 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_network` is never used [INFO] [stdout] --> src/days/day_23.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn create_network (text_code: &String) -> Network { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day24` is never constructed [INFO] [stdout] --> src/days/day_24.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day24; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_bugs_count` is never used [INFO] [stdout] --> src/days/day_24.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn get_bugs_count (initial_layout: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_biodiversity_of_recurring_layout` is never used [INFO] [stdout] --> src/days/day_24.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn get_biodiversity_of_recurring_layout (initial_layout: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_1` is never used [INFO] [stdout] --> src/days/day_24.rs:132:4 [INFO] [stdout] | [INFO] [stdout] 132 | fn parse_1 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_0` is never used [INFO] [stdout] --> src/days/day_24.rs:141:4 [INFO] [stdout] | [INFO] [stdout] 141 | fn parse_0 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day25` is never constructed [INFO] [stdout] --> src/days/day_25.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day25; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `brute_force_weight_check` is never used [INFO] [stdout] --> src/days/day_25.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn brute_force_weight_check (program: &mut ascii_code::AsciiCodeProgram, items: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IntCodeProgram` is never constructed [INFO] [stdout] --> src/days/int_code.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct IntCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `IntCodeProgramStatus` is never used [INFO] [stdout] --> src/days/int_code.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | pub enum IntCodeProgramStatus { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ParameterMode` is never used [INFO] [stdout] --> src/days/int_code.rs:20:6 [INFO] [stdout] | [INFO] [stdout] 20 | enum ParameterMode { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Instruction` is never used [INFO] [stdout] --> src/days/int_code.rs:27:6 [INFO] [stdout] | [INFO] [stdout] 27 | enum Instruction { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/days/int_code.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 40 | impl IntCodeProgram { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] 41 | pub fn run_until_stopped (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn run_until_next_output (&mut self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn get_last_output (&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn get_status (&self) -> IntCodeProgramStatus { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 63 | pub fn push_input (&mut self, input: i128) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn day_02_initialize (&mut self, noun: i128, verb: i128) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | pub fn day_02_result (&self) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn day_13_part_two_initialize (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn day_17_part_two_initialize (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn step (&mut self) -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 178 | fn allocate_space_if_necessary (&mut self, until_position: usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | fn get_int_code(&mut self, position: usize) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn set_int_code(&mut self, position: usize, value: i128) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 197 | fn fetch_operator (&mut self, initial_position: usize, parameter_mode: ParameterMode) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 206 | fn get_parameter_position (&mut self, initial_position: usize, parameter_mode: ParameterMode) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_program` is never used [INFO] [stdout] --> src/days/int_code.rs:216:8 [INFO] [stdout] | [INFO] [stdout] 216 | pub fn create_program (text_code: &String) -> IntCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_into_int_code` is never used [INFO] [stdout] --> src/days/int_code.rs:226:4 [INFO] [stdout] | [INFO] [stdout] 226 | fn parse_into_int_code (text_code: &String) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AsciiCodeProgram` is never constructed [INFO] [stdout] --> src/days/ascii_code.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct AsciiCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `run_script`, `push_script_as_input`, and `run_and_prompt_user_input` are never used [INFO] [stdout] --> src/days/ascii_code.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl AsciiCodeProgram { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] 9 | pub fn run_script (&mut self, script: &String) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn push_script_as_input (&mut self, script: &String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn run_and_prompt_user_input (&mut self, user_input_mapping: &dyn Fn(&String) -> String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_program` is never used [INFO] [stdout] --> src/days/ascii_code.rs:90:8 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn create_program (text_code: &String) -> AsciiCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day02` is never constructed [INFO] [stdout] --> src/days/day_02.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day02; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_output` is never used [INFO] [stdout] --> src/days/day_02.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn find_output (text_code: &String, seeked_output: i128) -> (i128, i128) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration` is never used [INFO] [stdout] --> src/days/day_02.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | fn iteration(text_code: &String, noun: i128, verb: i128) -> i128 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day03` is never constructed [INFO] [stdout] --> src/days/day_03.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Day03; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day_03.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Instruction` is never constructed [INFO] [stdout] --> src/days/day_03.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Instruction { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_distances_to_intersections` is never used [INFO] [stdout] --> src/days/day_03.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn get_distances_to_intersections (path: &Vec<(i32, i32)>, intersections: &HashSet<&(i32, i32)>) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_paths` is never used [INFO] [stdout] --> src/days/day_03.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_paths (input: &str) -> (Vec<(i32, i32)>, Vec<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_points` is never used [INFO] [stdout] --> src/days/day_03.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn get_points(instructions: &Vec) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_instruction` is never used [INFO] [stdout] --> src/days/day_03.rs:114:4 [INFO] [stdout] | [INFO] [stdout] 114 | fn parse_to_instruction(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day04` is never constructed [INFO] [stdout] --> src/days/day_04.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day04; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `task_impl` is never used [INFO] [stdout] --> src/days/day_04.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn task_impl (input: &String, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_of_possible_passwords` is never used [INFO] [stdout] --> src/days/day_04.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn count_of_possible_passwords (range: RangeInclusive, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_range` is never used [INFO] [stdout] --> src/days/day_04.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn parse_to_range(text: &str) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day05` is never constructed [INFO] [stdout] --> src/days/day_05.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day05; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration` is never used [INFO] [stdout] --> src/days/day_05.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn iteration(text_code: &String, input: i128) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day06` is never constructed [INFO] [stdout] --> src/days/day_06.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day06; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `determine_orbital_transfers_to_santa` is never used [INFO] [stdout] --> src/days/day_06.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn determine_orbital_transfers_to_santa(adjacency_map: &HashMap>, current_node: String) -> (Option, Option<... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_connections` is never used [INFO] [stdout] --> src/days/day_06.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn count_connections(adjacency_map: &HashMap>, current_node: String) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_adjacency_map` is never used [INFO] [stdout] --> src/days/day_06.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn generate_adjacency_map (input: &String) -> HashMap> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_tuple` is never used [INFO] [stdout] --> src/days/day_06.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | fn parse_to_tuple(text: &str) -> Option<(String, String)> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day07` is never constructed [INFO] [stdout] --> src/days/day_07.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day07; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `amplifier_sequence` is never used [INFO] [stdout] --> src/days/day_07.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn amplifier_sequence( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration_1` is never used [INFO] [stdout] --> src/days/day_07.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn iteration_1 (text_code: &String, phase_setting: Vec) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iteration_0` is never used [INFO] [stdout] --> src/days/day_07.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn iteration_0 (text_code: &String, phase_setting: Vec) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_all_possible_phase_settings` is never used [INFO] [stdout] --> src/days/day_07.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_all_possible_phase_settings (data: &mut [i128]) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day08` is never constructed [INFO] [stdout] --> src/days/day_08.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day08; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day09` is never constructed [INFO] [stdout] --> src/days/day_09.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day09; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `task_impl` is never used [INFO] [stdout] --> src/days/day_09.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn task_impl (input: &String, input_number: i128) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day10` is never constructed [INFO] [stdout] --> src/days/day_10.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day10; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_asteroid_points` is never used [INFO] [stdout] --> src/days/day_10.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_asteroid_points (input: &String) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_sightable_asteroids` is never used [INFO] [stdout] --> src/days/day_10.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn count_sightable_asteroids (position: (i32, i32), all_asteroid_positions: &Vec<(i32, i32)>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_visible_aseteroids` is never used [INFO] [stdout] --> src/days/day_10.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn get_visible_aseteroids (position: (i32, i32), all_asteroid_positions: &Vec<(i32, i32)>) -> HashSet<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day11` is never constructed [INFO] [stdout] --> src/days/day_11.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Day11; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day_11.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `change_direction` is never used [INFO] [stdout] --> src/days/day_11.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn change_direction (current_direction: &Direction, value: i128) -> Direction { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step` is never used [INFO] [stdout] --> src/days/day_11.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn step (position: (i32, i32), direction: &Direction) -> (i32, i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_painting_robot` is never used [INFO] [stdout] --> src/days/day_11.rs:87:4 [INFO] [stdout] | [INFO] [stdout] 87 | fn run_painting_robot (input: &String, first_input: i128) -> (HashSet<(i32, i32)>, HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day12` is never constructed [INFO] [stdout] --> src/days/day_12.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day12; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lowest_common_multiple` is never used [INFO] [stdout] --> src/days/day_12.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn lowest_common_multiple (set: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Moons` is never constructed [INFO] [stdout] --> src/days/day_12.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | struct Moons { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `apply_gravity`, `apply_velocity`, `calculate_energy`, `check_for_sequence`, and `collect_rates` are never used [INFO] [stdout] --> src/days/day_12.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 63 | impl Moons { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 64 | fn apply_gravity (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | fn apply_velocity (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn calculate_energy (&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 83 | fn check_for_sequence (&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 91 | fn collect_rates (&self, set: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Moon` is never constructed [INFO] [stdout] --> src/days/day_12.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | struct Moon { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_03.rs:62:89 [INFO] [stdout] | [INFO] [stdout] 62 | if intersections.contains(&element) && !distances_to_intersections.contains_key(&element) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `element` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_03.rs:69:31 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_paths (input: &str) -> (Vec<(i32, i32)>, Vec<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `apply_gravity`, `apply_velocity`, `calculate_energy`, `check_for_sequence`, and `collect_rates` are never used [INFO] [stdout] --> src/days/day_12.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 110 | impl Moon { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 111 | fn apply_gravity (&mut self, other: &Moon) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | fn apply_velocity (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 128 | fn calculate_energy (&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 133 | fn check_for_sequence (&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 165 | fn collect_rates (&self, set: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_moon` is never used [INFO] [stdout] --> src/days/day_12.rs:172:4 [INFO] [stdout] | [INFO] [stdout] 172 | fn parse_to_moon(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day13` is never constructed [INFO] [stdout] --> src/days/day_13.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day13; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day14` is never constructed [INFO] [stdout] --> src/days/day_14.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day14; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_required_ore` is never used [INFO] [stdout] --> src/days/day_14.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn get_required_ore ( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_to_recipe` is never used [INFO] [stdout] --> src/days/day_14.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn parse_to_recipe(line: &str) -> Option<(String, (Vec<(String, i64)>, i64))> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day15` is never constructed [INFO] [stdout] --> src/days/day_15.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day15; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fill_room_with_oxygen` is never used [INFO] [stdout] --> src/days/day_15.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn fill_room_with_oxygen (start: (i32, i32), map: &HashMap<(i32, i32), i128>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_length_of_shortest_path_to_oxygen_system` is never used [INFO] [stdout] --> src/days/day_15.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn get_length_of_shortest_path_to_oxygen_system (map: &HashMap<(i32, i32), i128>) -> Option<((i32, i32), i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `explore_map` is never used [INFO] [stdout] --> src/days/day_15.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn explore_map (program: &mut int_code::IntCodeProgram, map: &mut HashMap<(i32, i32), i128>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day16` is never constructed [INFO] [stdout] --> src/days/day_16.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day16; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_digity` is never used [INFO] [stdout] --> src/days/day_16.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn get_digity (index: usize, iteration: i32, signal: &Vec, pattern: &[i32; 4], cache: &mut HashMap<(usize, i32), i32>, length: ... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_numbers` is never used [INFO] [stdout] --> src/days/day_16.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn generate_numbers (mut input: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day17` is never constructed [INFO] [stdout] --> src/days/day_17.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day17; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prepare_input_sequence_for_specific_machine` is never used [INFO] [stdout] --> src/days/day_17.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn prepare_input_sequence_for_specific_machine (original_sequence: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_input_sequence` is never used [INFO] [stdout] --> src/days/day_17.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn get_input_sequence (start_position: (i128, i128), start_direction: i32, map: &HashSet<(i128,i128)>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_map_and_robot_status` is never used [INFO] [stdout] --> src/days/day_17.rs:169:4 [INFO] [stdout] | [INFO] [stdout] 169 | fn get_map_and_robot_status (text_code: &String, ) -> (HashSet<(i128,i128)>, (i128, i128), i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day18` is never constructed [INFO] [stdout] --> src/days/day_18.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Day18; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/days/day_18.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathState` is never constructed [INFO] [stdout] --> src/days/day_18.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct PathState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `NodeType` is never used [INFO] [stdout] --> src/days/day_18.rs:35:6 [INFO] [stdout] | [INFO] [stdout] 35 | enum NodeType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `determine_shortest_round_trip_quadriple` is never used [INFO] [stdout] --> src/days/day_18.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn determine_shortest_round_trip_quadriple (whole_map: &HashMap<(i32, i32), Node>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `determine_shortest_round_trip_single` is never used [INFO] [stdout] --> src/days/day_18.rs:159:4 [INFO] [stdout] | [INFO] [stdout] 159 | fn determine_shortest_round_trip_single (whole_map: &HashMap<(i32, i32), Node>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/days/day_18.rs:218:4 [INFO] [stdout] | [INFO] [stdout] 218 | fn parse (input: &String) -> HashMap<(i32, i32), Node> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day19` is never constructed [INFO] [stdout] --> src/days/day_19.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day19; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_position` is never used [INFO] [stdout] --> src/days/day_19.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn check_position (x: i128, y: i128, text_code: &String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day20` is never constructed [INFO] [stdout] --> src/days/day_20.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day20; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shortest_path` is never used [INFO] [stdout] --> src/days/day_20.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn shortest_path ( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathState` is never constructed [INFO] [stdout] --> src/days/day_20.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | struct PathState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PathState1` is never constructed [INFO] [stdout] --> src/days/day_20.rs:65:8 [INFO] [stdout] | [INFO] [stdout] 65 | struct PathState1 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day_20.rs:84:6 [INFO] [stdout] | [INFO] [stdout] 84 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Layer` is never used [INFO] [stdout] --> src/days/day_20.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum Layer { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/days/day_20.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Maze` is never constructed [INFO] [stdout] --> src/days/day_20.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | struct Maze { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `shortest_path` and `get_port` are never used [INFO] [stdout] --> src/days/day_20.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 114 | impl Maze { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 115 | fn shortest_path (&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 140 | fn get_port (&self, next_node: &Option<((i32, i32), i32)>, possible_label_position: (i32, i32), current_floor: i32) -> Option<(... [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_1` is never used [INFO] [stdout] --> src/days/day_20.rs:158:4 [INFO] [stdout] | [INFO] [stdout] 158 | fn parse_1 (input: &String) -> Maze { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/days/day_20.rs:375:4 [INFO] [stdout] | [INFO] [stdout] 375 | fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (i32, i32), (i32, i32)) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day21` is never constructed [INFO] [stdout] --> src/days/day_21.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Day21; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day23` is never constructed [INFO] [stdout] --> src/days/day_23.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day23; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Network` is never constructed [INFO] [stdout] --> src/days/day_23.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | struct Network { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `do_task` is never used [INFO] [stdout] --> src/days/day_23.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl Network { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 26 | fn do_task (&mut self, is_task_0: bool) -> i128 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_network` is never used [INFO] [stdout] --> src/days/day_23.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn create_network (text_code: &String) -> Network { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day24` is never constructed [INFO] [stdout] --> src/days/day_24.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Day24; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_bugs_count` is never used [INFO] [stdout] --> src/days/day_24.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn get_bugs_count (initial_layout: u32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_biodiversity_of_recurring_layout` is never used [INFO] [stdout] --> src/days/day_24.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn get_biodiversity_of_recurring_layout (initial_layout: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_1` is never used [INFO] [stdout] --> src/days/day_24.rs:132:4 [INFO] [stdout] | [INFO] [stdout] 132 | fn parse_1 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_0` is never used [INFO] [stdout] --> src/days/day_24.rs:141:4 [INFO] [stdout] | [INFO] [stdout] 141 | fn parse_0 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Day25` is never constructed [INFO] [stdout] --> src/days/day_25.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Day25; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `brute_force_weight_check` is never used [INFO] [stdout] --> src/days/day_25.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn brute_force_weight_check (program: &mut ascii_code::AsciiCodeProgram, items: &mut HashSet) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IntCodeProgram` is never constructed [INFO] [stdout] --> src/days/int_code.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct IntCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `IntCodeProgramStatus` is never used [INFO] [stdout] --> src/days/int_code.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | pub enum IntCodeProgramStatus { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ParameterMode` is never used [INFO] [stdout] --> src/days/int_code.rs:20:6 [INFO] [stdout] | [INFO] [stdout] 20 | enum ParameterMode { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Instruction` is never used [INFO] [stdout] --> src/days/int_code.rs:27:6 [INFO] [stdout] | [INFO] [stdout] 27 | enum Instruction { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_03.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | .filter_map(|text_instruction| parse_to_instruction(text_instruction)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_to_instruction` [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: accessing first element with `cables.get(0)` [INFO] [stdout] --> src/days/day_03.rs:81:39 [INFO] [stdout] | [INFO] [stdout] 81 | let points_0 = get_points(cables.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `cables.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day_03.rs:94:10 [INFO] [stdout] | [INFO] [stdout] 94 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | *s_x = *s_x + d_x * instruction.steps; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*s_x += d_x * instruction.steps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | *s_y = *s_y + d_y * instruction.steps; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*s_y += d_y * instruction.steps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/days/day_03.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | / iter::repeat((d_x, d_y)) [INFO] [stdout] 104 | | .take(steps as usize) [INFO] [stdout] | |_____________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n((d_x, d_y), steps as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:106:21 [INFO] [stdout] | [INFO] [stdout] 106 | *curr_x = *curr_x + d_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*curr_x += d_x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:107:21 [INFO] [stdout] | [INFO] [stdout] 107 | *curr_y = *curr_y + d_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*curr_y += d_y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `direction_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_03.rs:134:32 [INFO] [stdout] | [INFO] [stdout] 132 | if direction_maybe.is_some() && steps_maybe.is_some() { [INFO] [stdout] | ------------------------- the check is happening here [INFO] [stdout] 133 | Some(Instruction { [INFO] [stdout] 134 | direction: direction_maybe.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `steps_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_03.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 132 | if direction_maybe.is_some() && steps_maybe.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 135 | steps: steps_maybe.unwrap() })} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/days/day_03.rs:128:25 [INFO] [stdout] | [INFO] [stdout] 128 | "R" | _ => Direction::Right}); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/days/int_code.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 40 | impl IntCodeProgram { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] 41 | pub fn run_until_stopped (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn run_until_next_output (&mut self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn get_last_output (&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn get_status (&self) -> IntCodeProgramStatus { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 63 | pub fn push_input (&mut self, input: i128) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn day_02_initialize (&mut self, noun: i128, verb: i128) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | pub fn day_02_result (&self) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn day_13_part_two_initialize (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | pub fn day_17_part_two_initialize (&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub fn step (&mut self) -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 178 | fn allocate_space_if_necessary (&mut self, until_position: usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | fn get_int_code(&mut self, position: usize) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 192 | fn set_int_code(&mut self, position: usize, value: i128) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 197 | fn fetch_operator (&mut self, initial_position: usize, parameter_mode: ParameterMode) -> i128 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 206 | fn get_parameter_position (&mut self, initial_position: usize, parameter_mode: ParameterMode) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_program` is never used [INFO] [stdout] --> src/days/int_code.rs:216:8 [INFO] [stdout] | [INFO] [stdout] 216 | pub fn create_program (text_code: &String) -> IntCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_into_int_code` is never used [INFO] [stdout] --> src/days/int_code.rs:226:4 [INFO] [stdout] | [INFO] [stdout] 226 | fn parse_into_int_code (text_code: &String) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AsciiCodeProgram` is never constructed [INFO] [stdout] --> src/days/ascii_code.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct AsciiCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `run_script`, `push_script_as_input`, and `run_and_prompt_user_input` are never used [INFO] [stdout] --> src/days/ascii_code.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl AsciiCodeProgram { [INFO] [stdout] | --------------------- methods in this implementation [INFO] [stdout] 9 | pub fn run_script (&mut self, script: &String) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn push_script_as_input (&mut self, script: &String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn run_and_prompt_user_input (&mut self, user_input_mapping: &dyn Fn(&String) -> String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_program` is never used [INFO] [stdout] --> src/days/ascii_code.rs:90:8 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn create_program (text_code: &String) -> AsciiCodeProgram { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_04.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | fn task_impl (input: &String, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - fn task_impl (input: &String, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] 30 + fn task_impl (input: &str, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_04.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | let s_0 = s.chars().nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `lower_bound_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_04.rs:71:22 [INFO] [stdout] | [INFO] [stdout] 70 | if lower_bound_maybe.is_some() && higher_bound_maybe.is_some() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 71 | Some(lower_bound_maybe.unwrap()..=higher_bound_maybe.unwrap()) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `higher_bound_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_04.rs:71:51 [INFO] [stdout] | [INFO] [stdout] 70 | if lower_bound_maybe.is_some() && higher_bound_maybe.is_some() { [INFO] [stdout] | ---------------------------- the check is happening here [INFO] [stdout] 71 | Some(lower_bound_maybe.unwrap()..=higher_bound_maybe.unwrap()) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day_06.rs:30:14 [INFO] [stdout] | [INFO] [stdout] 30 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_06.rs:31:63 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|child| determine_orbital_transfers_to_santa(&adjacency_map, child.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `adjacency_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day_06.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_06.rs:49:44 [INFO] [stdout] | [INFO] [stdout] 49 | .map(|child| count_connections(&adjacency_map, child.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `adjacency_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_06.rs:56:35 [INFO] [stdout] | [INFO] [stdout] 56 | fn generate_adjacency_map (input: &String) -> HashMap> { [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] 56 - fn generate_adjacency_map (input: &String) -> HashMap> { [INFO] [stdout] 56 + fn generate_adjacency_map (input: &str) -> HashMap> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_03.rs:62:89 [INFO] [stdout] | [INFO] [stdout] 62 | if intersections.contains(&element) && !distances_to_intersections.contains_key(&element) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `element` [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: use of `filter_map` with an identity function [INFO] [stdout] --> src/days/day_06.rs:60:10 [INFO] [stdout] | [INFO] [stdout] 60 | .filter_map(|option| option) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_06.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | .map(|line| parse_to_tuple(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_to_tuple` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_03.rs:69:31 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_paths (input: &str) -> (Vec<(i32, i32)>, Vec<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_03.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | .filter_map(|text_instruction| parse_to_instruction(text_instruction)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_to_instruction` [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: called `unwrap` on `left_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_06.rs:82:23 [INFO] [stdout] | [INFO] [stdout] 81 | if left_maybe.is_some() && right_maybe.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 82 | Some((left_maybe.unwrap(), right_maybe.unwrap()))} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `right_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_06.rs:82:44 [INFO] [stdout] | [INFO] [stdout] 81 | if left_maybe.is_some() && right_maybe.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 82 | Some((left_maybe.unwrap(), right_maybe.unwrap()))} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `cables.get(0)` [INFO] [stdout] --> src/days/day_03.rs:81:39 [INFO] [stdout] | [INFO] [stdout] 81 | let points_0 = get_points(cables.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `cables.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day_03.rs:94:10 [INFO] [stdout] | [INFO] [stdout] 94 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | *s_x = *s_x + d_x * instruction.steps; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*s_x += d_x * instruction.steps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` [INFO] [stdout] --> src/days/day_07.rs:43:38 [INFO] [stdout] | [INFO] [stdout] 43 | for (program, phase) in programs.into_iter().zip(&phase_setting) { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [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] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` [INFO] [stdout] --> src/days/day_07.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | *s_y = *s_y + d_y * instruction.steps; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*s_y += d_y * instruction.steps` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/days/day_03.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | / iter::repeat((d_x, d_y)) [INFO] [stdout] 104 | | .take(steps as usize) [INFO] [stdout] | |_____________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n((d_x, d_y), steps as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:106:21 [INFO] [stdout] | [INFO] [stdout] 106 | *curr_x = *curr_x + d_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*curr_x += d_x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_03.rs:107:21 [INFO] [stdout] | [INFO] [stdout] 107 | *curr_y = *curr_y + d_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*curr_y += d_y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `direction_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_03.rs:134:32 [INFO] [stdout] | [INFO] [stdout] 132 | if direction_maybe.is_some() && steps_maybe.is_some() { [INFO] [stdout] | ------------------------- the check is happening here [INFO] [stdout] 133 | Some(Instruction { [INFO] [stdout] 134 | direction: direction_maybe.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `steps_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_03.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 132 | if direction_maybe.is_some() && steps_maybe.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 135 | steps: steps_maybe.unwrap() })} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/days/day_03.rs:128:25 [INFO] [stdout] | [INFO] [stdout] 128 | "R" | _ => Direction::Right}); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/days/day_08.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | let lines = (0..150) [INFO] [stdout] | _____________________^ [INFO] [stdout] 32 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..150)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_08.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | inner_i = inner_i + 150; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inner_i += 150` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_04.rs:30:22 [INFO] [stdout] | [INFO] [stdout] 30 | fn task_impl (input: &String, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - fn task_impl (input: &String, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] 30 + fn task_impl (input: &str, adjacency_criterion: &dyn Fn(char, char, char, char, char, char) -> bool) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_04.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | let s_0 = s.chars().nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `lower_bound_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_04.rs:71:22 [INFO] [stdout] | [INFO] [stdout] 70 | if lower_bound_maybe.is_some() && higher_bound_maybe.is_some() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 71 | Some(lower_bound_maybe.unwrap()..=higher_bound_maybe.unwrap()) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `higher_bound_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_04.rs:71:51 [INFO] [stdout] | [INFO] [stdout] 70 | if lower_bound_maybe.is_some() && higher_bound_maybe.is_some() { [INFO] [stdout] | ---------------------------- the check is happening here [INFO] [stdout] 71 | Some(lower_bound_maybe.unwrap()..=higher_bound_maybe.unwrap()) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_10.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_asteroid_points (input: &String) -> Vec<(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] 48 - fn get_asteroid_points (input: &String) -> Vec<(i32, i32)> { [INFO] [stdout] 48 + fn get_asteroid_points (input: &str) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.into_iter().count()` on a `HashSet` [INFO] [stdout] --> src/days/day_10.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | get_visible_aseteroids(position, &all_asteroid_positions).into_iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `get_visible_aseteroids(position, &all_asteroid_positions).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_10.rs:60:38 [INFO] [stdout] | [INFO] [stdout] 60 | get_visible_aseteroids(position, &all_asteroid_positions).into_iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `all_asteroid_positions` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/days/day_10.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 64 | / let distances = all_asteroid_positions [INFO] [stdout] 65 | | .into_iter() [INFO] [stdout] 66 | | .filter(|p| **p != position) [INFO] [stdout] 67 | | .map(|(x, y)| (*x - position.0, *y - position.1)) [INFO] [stdout] ... | [INFO] [stdout] 85 | | }) [INFO] [stdout] 86 | | .collect::>(); [INFO] [stdout] | |__________________________________________- unnecessary `let` binding [INFO] [stdout] 87 | distances [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 64 ~ [INFO] [stdout] 65 ~ all_asteroid_positions [INFO] [stdout] 66 + .into_iter() [INFO] [stdout] 67 + .filter(|p| **p != position) [INFO] [stdout] 68 + .map(|(x, y)| (*x - position.0, *y - position.1)) [INFO] [stdout] 69 + .map(|(x, y)| { [INFO] [stdout] 70 + if x != 0 && y != 0 { [INFO] [stdout] 71 + let gcd = gcd(x, y); [INFO] [stdout] 72 + (x / gcd, y / gcd) [INFO] [stdout] 73 + } [INFO] [stdout] 74 + else if x == 0 && y >= 1 { [INFO] [stdout] 75 + (0, 1) [INFO] [stdout] 76 + } [INFO] [stdout] 77 + else if x == 0 && y <= 1 { [INFO] [stdout] 78 + (0, -1) [INFO] [stdout] 79 + } [INFO] [stdout] 80 + else if y == 0 && x >= 1 { [INFO] [stdout] 81 + (1, 0) [INFO] [stdout] 82 + } [INFO] [stdout] 83 + else { [INFO] [stdout] 84 + (-1, 0) [INFO] [stdout] 85 + } [INFO] [stdout] 86 + }) [INFO] [stdout] 87 + .collect::>() [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/days/day_10.rs:65:10 [INFO] [stdout] | [INFO] [stdout] 65 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day_06.rs:30:14 [INFO] [stdout] | [INFO] [stdout] 30 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_06.rs:31:63 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|child| determine_orbital_transfers_to_santa(&adjacency_map, child.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `adjacency_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day_06.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_06.rs:49:44 [INFO] [stdout] | [INFO] [stdout] 49 | .map(|child| count_connections(&adjacency_map, child.to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `adjacency_map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_06.rs:56:35 [INFO] [stdout] | [INFO] [stdout] 56 | fn generate_adjacency_map (input: &String) -> HashMap> { [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] 56 - fn generate_adjacency_map (input: &String) -> HashMap> { [INFO] [stdout] 56 + fn generate_adjacency_map (input: &str) -> HashMap> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/days/day_06.rs:60:10 [INFO] [stdout] | [INFO] [stdout] 60 | .filter_map(|option| option) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day_06.rs:59:14 [INFO] [stdout] | [INFO] [stdout] 59 | .map(|line| parse_to_tuple(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_to_tuple` [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: called `unwrap` on `left_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_06.rs:82:23 [INFO] [stdout] | [INFO] [stdout] 81 | if left_maybe.is_some() && right_maybe.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 82 | Some((left_maybe.unwrap(), right_maybe.unwrap()))} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `right_maybe` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_06.rs:82:44 [INFO] [stdout] | [INFO] [stdout] 81 | if left_maybe.is_some() && right_maybe.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 82 | Some((left_maybe.unwrap(), right_maybe.unwrap()))} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` [INFO] [stdout] --> src/days/day_07.rs:43:38 [INFO] [stdout] | [INFO] [stdout] 43 | for (program, phase) in programs.into_iter().zip(&phase_setting) { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [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] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/days/day_11.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice` [INFO] [stdout] --> src/days/day_07.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter_mut` [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_11.rs:87:62 [INFO] [stdout] | [INFO] [stdout] 87 | fn run_painting_robot (input: &String, first_input: i128) -> (HashSet<(i32, i32)>, HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/days/day_08.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | let lines = (0..150) [INFO] [stdout] | _____________________^ [INFO] [stdout] 32 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..150)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_08.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | inner_i = inner_i + 150; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inner_i += 150` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_12.rs:68:36 [INFO] [stdout] | [INFO] [stdout] 68 | moon.apply_gravity(&other); [INFO] [stdout] | ^^^^^^ help: change this to: `other` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_10.rs:48:32 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_asteroid_points (input: &String) -> Vec<(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] 48 - fn get_asteroid_points (input: &String) -> Vec<(i32, i32)> { [INFO] [stdout] 48 + fn get_asteroid_points (input: &str) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day_12.rs:137:20 [INFO] [stdout] | [INFO] [stdout] 137 | if sequence.len() % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `sequence.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.into_iter().count()` on a `HashSet` [INFO] [stdout] --> src/days/day_10.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | get_visible_aseteroids(position, &all_asteroid_positions).into_iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `get_visible_aseteroids(position, &all_asteroid_positions).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_10.rs:60:38 [INFO] [stdout] | [INFO] [stdout] 60 | get_visible_aseteroids(position, &all_asteroid_positions).into_iter().count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `all_asteroid_positions` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/days/day_10.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 64 | / let distances = all_asteroid_positions [INFO] [stdout] 65 | | .into_iter() [INFO] [stdout] 66 | | .filter(|p| **p != position) [INFO] [stdout] 67 | | .map(|(x, y)| (*x - position.0, *y - position.1)) [INFO] [stdout] ... | [INFO] [stdout] 85 | | }) [INFO] [stdout] 86 | | .collect::>(); [INFO] [stdout] | |__________________________________________- unnecessary `let` binding [INFO] [stdout] 87 | distances [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 64 ~ [INFO] [stdout] 65 ~ all_asteroid_positions [INFO] [stdout] 66 + .into_iter() [INFO] [stdout] 67 + .filter(|p| **p != position) [INFO] [stdout] 68 + .map(|(x, y)| (*x - position.0, *y - position.1)) [INFO] [stdout] 69 + .map(|(x, y)| { [INFO] [stdout] 70 + if x != 0 && y != 0 { [INFO] [stdout] 71 + let gcd = gcd(x, y); [INFO] [stdout] 72 + (x / gcd, y / gcd) [INFO] [stdout] 73 + } [INFO] [stdout] 74 + else if x == 0 && y >= 1 { [INFO] [stdout] 75 + (0, 1) [INFO] [stdout] 76 + } [INFO] [stdout] 77 + else if x == 0 && y <= 1 { [INFO] [stdout] 78 + (0, -1) [INFO] [stdout] 79 + } [INFO] [stdout] 80 + else if y == 0 && x >= 1 { [INFO] [stdout] 81 + (1, 0) [INFO] [stdout] 82 + } [INFO] [stdout] 83 + else { [INFO] [stdout] 84 + (-1, 0) [INFO] [stdout] 85 + } [INFO] [stdout] 86 + }) [INFO] [stdout] 87 + .collect::>() [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/days/day_10.rs:65:10 [INFO] [stdout] | [INFO] [stdout] 65 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_13.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_14.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | ore_amount = ore_amount - minus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ore_amount -= minus` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_14.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_14.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | recipes: &HashMap, i64)>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_14.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | required_amount = required_amount - available_amount; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `required_amount -= available_amount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/days/day_11.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | println!("") [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_14.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | &recipes) + current_ore [INFO] [stdout] | ^^^^^^^^ help: change this to: `recipes` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_14.rs:90:35 [INFO] [stdout] | [INFO] [stdout] 90 | fn parse_to_recipe(line: &str) -> Option<(String, (Vec<(String, i64)>, i64))> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_11.rs:87:62 [INFO] [stdout] | [INFO] [stdout] 87 | fn run_painting_robot (input: &String, first_input: i128) -> (HashSet<(i32, i32)>, HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/days/day_14.rs:111:26 [INFO] [stdout] | [INFO] [stdout] 111 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_12.rs:68:36 [INFO] [stdout] | [INFO] [stdout] 68 | moon.apply_gravity(&other); [INFO] [stdout] | ^^^^^^ help: change this to: `other` [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/days/day_15.rs:84:32 [INFO] [stdout] | [INFO] [stdout] 84 | let next_point_maybe = (1..=4).map(|direction| (match direction { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 85 | | 1 => (x, y - 1), [INFO] [stdout] 86 | | 2 => (x, y + 1), [INFO] [stdout] 87 | | 3 => (x - 1, y), [INFO] [stdout] ... | [INFO] [stdout] 91 | | .filter(|(next_point, _)| !map.contains_key(&next_point)) [INFO] [stdout] 92 | | .nth(0); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 84 ~ let next_point_maybe = (1..=4).map(|direction| (match direction { [INFO] [stdout] 85 + 1 => (x, y - 1), [INFO] [stdout] 86 + 2 => (x, y + 1), [INFO] [stdout] 87 + 3 => (x - 1, y), [INFO] [stdout] 88 + 4 => (x + 1, y), [INFO] [stdout] 89 + _ => (x, y) [INFO] [stdout] 90 + }, direction)) [INFO] [stdout] 91 ~ .filter(|(next_point, _)| !map.contains_key(&next_point)).next(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_15.rs:91:57 [INFO] [stdout] | [INFO] [stdout] 91 | .filter(|(next_point, _)| !map.contains_key(&next_point)) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `next_point` [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day_12.rs:137:20 [INFO] [stdout] | [INFO] [stdout] 137 | if sequence.len() % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `sequence.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_13.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/days/day_16.rs:29:65 [INFO] [stdout] | [INFO] [stdout] 29 | ... i32, signal: &Vec, pattern: &[i32; 4], cache: &mut HashMap<(usize, i32), i32>, length: usize) -> i32 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pattern` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/days/day_16.rs:43:59 [INFO] [stdout] | [INFO] [stdout] 43 | .map(|i| get_digity(i, new_iteration, signal, pattern, cache, length)) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | .map(|i| get_digity(i, new_iteration, signal, pattern, cache, length)) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_16.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | *current = next + *current; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*current += next` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_14.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | ore_amount = ore_amount - minus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ore_amount -= minus` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_14.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_14.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | recipes: &HashMap, i64)>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_17.rs:45:104 [INFO] [stdout] | [INFO] [stdout] 45 | ... i32, original_sequence: &Vec) -> Option<(Vec, Vec, Vec, Vec)>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `a` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_17.rs:89:25 [INFO] [stdout] | [INFO] [stdout] 88 | if a.is_some() && b.is_some() && c.is_some() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 89 | Some((main, a.unwrap(), b.unwrap(), c.unwrap())) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_14.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | required_amount = required_amount - available_amount; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `required_amount -= available_amount` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `b` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_17.rs:89:37 [INFO] [stdout] | [INFO] [stdout] 88 | if a.is_some() && b.is_some() && c.is_some() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 89 | Some((main, a.unwrap(), b.unwrap(), c.unwrap())) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `c` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_17.rs:89:49 [INFO] [stdout] | [INFO] [stdout] 88 | if a.is_some() && b.is_some() && c.is_some() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 89 | Some((main, a.unwrap(), b.unwrap(), c.unwrap())) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:45:89 [INFO] [stdout] | [INFO] [stdout] 45 | fn get_main_a_b_and_c (a_count: i32, b_count: i32, c_count: i32, original_sequence: &Vec) -> Option<(Vec, Vec, V... [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] 45 - fn get_main_a_b_and_c (a_count: i32, b_count: i32, c_count: i32, original_sequence: &Vec) -> Option<(Vec, Vec, Vec, Vec)>{ [INFO] [stdout] 45 + fn get_main_a_b_and_c (a_count: i32, b_count: i32, c_count: i32, original_sequence: &[i32]) -> Option<(Vec, Vec, Vec, Vec)>{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:46:24 [INFO] [stdout] | [INFO] [stdout] 46 | fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] 46 + fn compare (x: &[i32], y: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:46:38 [INFO] [stdout] | [INFO] [stdout] 46 | fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] 46 + fn compare (x: &Vec, y: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:51:59 [INFO] [stdout] | [INFO] [stdout] 51 | ... fn compare_sequence_start_with_segment (sequence: &Vec, segment: &Option>, ascii: i32) -> Option<(i32, Vec)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - fn compare_sequence_start_with_segment (sequence: &Vec, segment: &Option>, ascii: i32) -> Option<(i32, Vec)> { [INFO] [stdout] 51 + fn compare_sequence_start_with_segment (sequence: &[i32], segment: &Option>, ascii: i32) -> Option<(i32, Vec)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:53:38 [INFO] [stdout] | [INFO] [stdout] 53 | let sequence_start = sequence.iter().take(segment.len()).map(|i| *i).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sequence.iter().take(segment.len()).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_14.rs:85:21 [INFO] [stdout] | [INFO] [stdout] 85 | &recipes) + current_ore [INFO] [stdout] | ^^^^^^^^ help: change this to: `recipes` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_14.rs:90:35 [INFO] [stdout] | [INFO] [stdout] 90 | fn parse_to_recipe(line: &str) -> Option<(String, (Vec<(String, i64)>, i64))> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:54:69 [INFO] [stdout] | [INFO] [stdout] 54 | ...start, segment) { Some((ascii, sequence.iter().skip(segment.len() + 1).map(|i| *i).collect::>())) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sequence.iter().skip(segment.len() + 1).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:60:62 [INFO] [stdout] | [INFO] [stdout] 60 | compare_sequence_start_with_segment(sequence, a, 'A' as u8 as i32) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:61:78 [INFO] [stdout] | [INFO] [stdout] 61 | .or_else(|| compare_sequence_start_with_segment(sequence, b, 'B' as u8 as i32)) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'B'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:62:78 [INFO] [stdout] | [INFO] [stdout] 62 | .or_else(|| compare_sequence_start_with_segment(sequence, c, 'C' as u8 as i32)) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'C'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:71:45 [INFO] [stdout] | [INFO] [stdout] 71 | let mut to_be_processed: Vec = original_sequence.iter().map(|i| *i).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `original_sequence.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:83:31 [INFO] [stdout] | [INFO] [stdout] 83 | let segment = to_be_processed.iter().take(count as usize).map(|i| *i).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `to_be_processed.iter().take(count as usize).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/days/day_14.rs:111:26 [INFO] [stdout] | [INFO] [stdout] 111 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/days/day_17.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | for a_count in (1..=20).into_iter().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(1..=20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/days/day_17.rs:95:24 [INFO] [stdout] | [INFO] [stdout] 95 | for b_count in (1..=20).into_iter().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(1..=20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/days/day_17.rs:96:28 [INFO] [stdout] | [INFO] [stdout] 96 | for c_count in (1..=20).into_iter().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(1..=20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:107:33 [INFO] [stdout] | [INFO] [stdout] 107 | output.push('n' as u8 as i32); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'n'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_15.rs:84:32 [INFO] [stdout] | [INFO] [stdout] 84 | let next_point_maybe = (1..=4).map(|direction| (match direction { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 85 | | 1 => (x, y - 1), [INFO] [stdout] 86 | | 2 => (x, y + 1), [INFO] [stdout] 87 | | 3 => (x - 1, y), [INFO] [stdout] ... | [INFO] [stdout] 91 | | .filter(|(next_point, _)| !map.contains_key(&next_point)) [INFO] [stdout] 92 | | .nth(0); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 84 ~ let next_point_maybe = (1..=4).map(|direction| (match direction { [INFO] [stdout] 85 + 1 => (x, y - 1), [INFO] [stdout] 86 + 2 => (x, y + 1), [INFO] [stdout] 87 + 3 => (x - 1, y), [INFO] [stdout] 88 + 4 => (x + 1, y), [INFO] [stdout] 89 + _ => (x, y) [INFO] [stdout] 90 + }, direction)) [INFO] [stdout] 91 ~ .filter(|(next_point, _)| !map.contains_key(&next_point)).next(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_17.rs:142:83 [INFO] [stdout] | [INFO] [stdout] 142 | while let Some((ascii, direction)) = next_direction(origin, origin_direction, &map) { [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_15.rs:91:57 [INFO] [stdout] | [INFO] [stdout] 91 | .filter(|(next_point, _)| !map.contains_key(&next_point)) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `next_point` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | step_count = step_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `step_count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | x = x + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:191:17 [INFO] [stdout] | [INFO] [stdout] 191 | y = y + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `y += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:195:17 [INFO] [stdout] | [INFO] [stdout] 195 | x = x + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/days/day_18.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::i32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/days/day_16.rs:29:65 [INFO] [stdout] | [INFO] [stdout] 29 | ... i32, signal: &Vec, pattern: &[i32; 4], cache: &mut HashMap<(usize, i32), i32>, length: usize) -> i32 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pattern` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/days/day_16.rs:43:59 [INFO] [stdout] | [INFO] [stdout] 43 | .map(|i| get_digity(i, new_iteration, signal, pattern, cache, length)) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 48 | .map(|i| get_digity(i, new_iteration, signal, pattern, cache, length)) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_16.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | *current = next + *current; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*current += next` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_17.rs:45:104 [INFO] [stdout] | [INFO] [stdout] 45 | ... i32, original_sequence: &Vec) -> Option<(Vec, Vec, Vec, Vec)>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `a` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_17.rs:89:25 [INFO] [stdout] | [INFO] [stdout] 88 | if a.is_some() && b.is_some() && c.is_some() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 89 | Some((main, a.unwrap(), b.unwrap(), c.unwrap())) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `b` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_17.rs:89:37 [INFO] [stdout] | [INFO] [stdout] 88 | if a.is_some() && b.is_some() && c.is_some() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 89 | Some((main, a.unwrap(), b.unwrap(), c.unwrap())) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `c` after checking its variant with `is_some` [INFO] [stdout] --> src/days/day_17.rs:89:49 [INFO] [stdout] | [INFO] [stdout] 88 | if a.is_some() && b.is_some() && c.is_some() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 89 | Some((main, a.unwrap(), b.unwrap(), c.unwrap())) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:45:89 [INFO] [stdout] | [INFO] [stdout] 45 | fn get_main_a_b_and_c (a_count: i32, b_count: i32, c_count: i32, original_sequence: &Vec) -> Option<(Vec, Vec, V... [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] 45 - fn get_main_a_b_and_c (a_count: i32, b_count: i32, c_count: i32, original_sequence: &Vec) -> Option<(Vec, Vec, Vec, Vec)>{ [INFO] [stdout] 45 + fn get_main_a_b_and_c (a_count: i32, b_count: i32, c_count: i32, original_sequence: &[i32]) -> Option<(Vec, Vec, Vec, Vec)>{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:46:24 [INFO] [stdout] | [INFO] [stdout] 46 | fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] 46 + fn compare (x: &[i32], y: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_18.rs:95:26 [INFO] [stdout] | [INFO] [stdout] 95 | let starting_point = whole_map [INFO] [stdout] | __________________________^ [INFO] [stdout] 96 | | .iter() [INFO] [stdout] 97 | | .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 98 | | .map(|(position, _)| *position) [INFO] [stdout] 99 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 95 ~ let starting_point = whole_map [INFO] [stdout] 96 + .iter() [INFO] [stdout] 97 + .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 98 + .map(|(position, _)| *position).next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:46:38 [INFO] [stdout] | [INFO] [stdout] 46 | fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn compare (x: &Vec, y: &Vec) -> bool { [INFO] [stdout] 46 + fn compare (x: &Vec, y: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:107:49 [INFO] [stdout] | [INFO] [stdout] 107 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_17.rs:51:59 [INFO] [stdout] | [INFO] [stdout] 51 | ... fn compare_sequence_start_with_segment (sequence: &Vec, segment: &Option>, ascii: i32) -> Option<(i32, Vec)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - fn compare_sequence_start_with_segment (sequence: &Vec, segment: &Option>, ascii: i32) -> Option<(i32, Vec)> { [INFO] [stdout] 51 + fn compare_sequence_start_with_segment (sequence: &[i32], segment: &Option>, ascii: i32) -> Option<(i32, Vec)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:118:5 [INFO] [stdout] | [INFO] [stdout] 118 | distance = distance - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance -= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:53:38 [INFO] [stdout] | [INFO] [stdout] 53 | let sequence_start = sequence.iter().take(segment.len()).map(|i| *i).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sequence.iter().take(segment.len()).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:54:69 [INFO] [stdout] | [INFO] [stdout] 54 | ...start, segment) { Some((ascii, sequence.iter().skip(segment.len() + 1).map(|i| *i).collect::>())) } else { None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sequence.iter().skip(segment.len() + 1).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:121:49 [INFO] [stdout] | [INFO] [stdout] 121 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:60:62 [INFO] [stdout] | [INFO] [stdout] 60 | compare_sequence_start_with_segment(sequence, a, 'A' as u8 as i32) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'A'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | distance = distance - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance -= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:61:78 [INFO] [stdout] | [INFO] [stdout] 61 | .or_else(|| compare_sequence_start_with_segment(sequence, b, 'B' as u8 as i32)) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'B'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:135:49 [INFO] [stdout] | [INFO] [stdout] 135 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:62:78 [INFO] [stdout] | [INFO] [stdout] 62 | .or_else(|| compare_sequence_start_with_segment(sequence, c, 'C' as u8 as i32)) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'C'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:71:45 [INFO] [stdout] | [INFO] [stdout] 71 | let mut to_be_processed: Vec = original_sequence.iter().map(|i| *i).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `original_sequence.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | distance = distance - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance -= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:149:49 [INFO] [stdout] | [INFO] [stdout] 149 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day_17.rs:83:31 [INFO] [stdout] | [INFO] [stdout] 83 | let segment = to_be_processed.iter().take(count as usize).map(|i| *i).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `to_be_processed.iter().take(count as usize).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/days/day_17.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | for a_count in (1..=20).into_iter().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(1..=20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/days/day_17.rs:95:24 [INFO] [stdout] | [INFO] [stdout] 95 | for b_count in (1..=20).into_iter().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(1..=20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/days/day_17.rs:96:28 [INFO] [stdout] | [INFO] [stdout] 96 | for c_count in (1..=20).into_iter().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(1..=20)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/days/day_17.rs:107:33 [INFO] [stdout] | [INFO] [stdout] 107 | output.push('n' as u8 as i32); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'n'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_18.rs:198:44 [INFO] [stdout] | [INFO] [stdout] 198 | let mut current_position: (i32, i32) = whole_map [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 199 | | .iter() [INFO] [stdout] 200 | | .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 201 | | .map(|(position, _)| *position) [INFO] [stdout] 202 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 198 ~ let mut current_position: (i32, i32) = whole_map [INFO] [stdout] 199 + .iter() [INFO] [stdout] 200 + .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 201 + .map(|(position, _)| *position).next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:208:49 [INFO] [stdout] | [INFO] [stdout] 208 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_17.rs:142:83 [INFO] [stdout] | [INFO] [stdout] 142 | while let Some((ascii, direction)) = next_direction(origin, origin_direction, &map) { [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_18.rs:218:18 [INFO] [stdout] | [INFO] [stdout] 218 | fn parse (input: &String) -> HashMap<(i32, i32), Node> { [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] 218 - fn parse (input: &String) -> HashMap<(i32, i32), Node> { [INFO] [stdout] 218 + fn parse (input: &str) -> HashMap<(i32, i32), Node> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day_18.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 222 | (&[node.up, node.down, node.left, node.right]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[node.up, node.down, node.left, node.right]` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:156:13 [INFO] [stdout] | [INFO] [stdout] 156 | step_count = step_count + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `step_count += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_18.rs:245:49 [INFO] [stdout] | [INFO] [stdout] 245 | 'A'..='Z' => NodeType::Door(c.to_lowercase().to_string().chars().nth(0).unwrap()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `c.to_lowercase().to_string().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | x = x + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:191:17 [INFO] [stdout] | [INFO] [stdout] 191 | y = y + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `y += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_17.rs:195:17 [INFO] [stdout] | [INFO] [stdout] 195 | x = x + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/days/day_18.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::i32; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_19.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_19.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | new_x = new_x + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `new_x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_19.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | new_x = new_x + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `new_x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_18.rs:95:26 [INFO] [stdout] | [INFO] [stdout] 95 | let starting_point = whole_map [INFO] [stdout] | __________________________^ [INFO] [stdout] 96 | | .iter() [INFO] [stdout] 97 | | .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 98 | | .map(|(position, _)| *position) [INFO] [stdout] 99 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 95 ~ let starting_point = whole_map [INFO] [stdout] 96 + .iter() [INFO] [stdout] 97 + .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 98 + .map(|(position, _)| *position).next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:107:49 [INFO] [stdout] | [INFO] [stdout] 107 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:118:5 [INFO] [stdout] | [INFO] [stdout] 118 | distance = distance - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance -= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:121:49 [INFO] [stdout] | [INFO] [stdout] 121 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | distance = distance - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance -= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:135:49 [INFO] [stdout] | [INFO] [stdout] 135 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | distance = distance - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance -= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:149:49 [INFO] [stdout] | [INFO] [stdout] 149 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_18.rs:198:44 [INFO] [stdout] | [INFO] [stdout] 198 | let mut current_position: (i32, i32) = whole_map [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 199 | | .iter() [INFO] [stdout] 200 | | .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 201 | | .map(|(position, _)| *position) [INFO] [stdout] 202 | | .nth(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] help: try calling `.next()` instead of `.nth(0)` [INFO] [stdout] | [INFO] [stdout] 198 ~ let mut current_position: (i32, i32) = whole_map [INFO] [stdout] 199 + .iter() [INFO] [stdout] 200 + .filter(|(_, node)| node.node_type == NodeType::StartingPoint) [INFO] [stdout] 201 + .map(|(position, _)| *position).next() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day_18.rs:208:49 [INFO] [stdout] | [INFO] [stdout] 208 | if let Some(target_position) = keys.get(&next_c) { [INFO] [stdout] | ^^^^^^^ help: change this to: `next_c` [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 implementation of an assign operation [INFO] [stdout] --> src/days/day_18.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | ... distance = distance + shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `distance += shortest_path(current_position, *target_position, whole_map).expect("couldn't calculate shortest path")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_18.rs:218:18 [INFO] [stdout] | [INFO] [stdout] 218 | fn parse (input: &String) -> HashMap<(i32, i32), Node> { [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] 218 - fn parse (input: &String) -> HashMap<(i32, i32), Node> { [INFO] [stdout] 218 + fn parse (input: &str) -> HashMap<(i32, i32), Node> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day_18.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 222 | (&[node.up, node.down, node.left, node.right]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[node.up, node.down, node.left, node.right]` [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/days/day_18.rs:245:49 [INFO] [stdout] | [INFO] [stdout] 245 | 'A'..='Z' => NodeType::Door(c.to_lowercase().to_string().chars().nth(0).unwrap()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `c.to_lowercase().to_string().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_20.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | fn parse_1 (input: &String) -> Maze { [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] 158 - fn parse_1 (input: &String) -> Maze { [INFO] [stdout] 158 + fn parse_1 (input: &str) -> Maze { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/days/day_20.rs:208:34 [INFO] [stdout] | [INFO] [stdout] 208 | .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 208 - .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] 208 + .filter(|(_, c)| matches!(*c, 'A'..='Z')) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:212:20 [INFO] [stdout] | [INFO] [stdout] 212 | if let Some(_) = map.get(&(x, y + 1)) { Some((Direction::Up, (x, y + 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y + 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | else if let Some(_) = map.get(&(x, y - 1)) { Some((Direction::Down, (x, y - 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y - 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:214:25 [INFO] [stdout] | [INFO] [stdout] 214 | else if let Some(_) = map.get(&(x + 1, y)) { Some((Direction::Left, (x + 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x + 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:215:25 [INFO] [stdout] | [INFO] [stdout] 215 | else if let Some(_) = map.get(&(x - 1, y)) { Some((Direction::Right, (x - 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x - 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_19.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_19.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | new_x = new_x + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `new_x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day_19.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | new_x = new_x + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `new_x += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:300:27 [INFO] [stdout] | [INFO] [stdout] 300 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:353:27 [INFO] [stdout] | [INFO] [stdout] 353 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_20.rs:375:30 [INFO] [stdout] | [INFO] [stdout] 375 | fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (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#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_20.rs:375:18 [INFO] [stdout] | [INFO] [stdout] 375 | fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (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] 375 - fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (i32, i32), (i32, i32)) { [INFO] [stdout] 375 + fn parse (input: &str) -> (HashMap<(i32, i32), Node>, (i32, i32), (i32, i32)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/days/day_20.rs:424:34 [INFO] [stdout] | [INFO] [stdout] 424 | .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 424 - .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] 424 + .filter(|(_, c)| matches!(*c, 'A'..='Z')) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:428:20 [INFO] [stdout] | [INFO] [stdout] 428 | if let Some(_) = map.get(&(x, y + 1)) { Some((Direction::Up, (x, y + 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y + 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:429:25 [INFO] [stdout] | [INFO] [stdout] 429 | else if let Some(_) = map.get(&(x, y - 1)) { Some((Direction::Down, (x, y - 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y - 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:430:25 [INFO] [stdout] | [INFO] [stdout] 430 | else if let Some(_) = map.get(&(x + 1, y)) { Some((Direction::Left, (x + 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x + 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_20.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | fn parse_1 (input: &String) -> Maze { [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] 158 - fn parse_1 (input: &String) -> Maze { [INFO] [stdout] 158 + fn parse_1 (input: &str) -> Maze { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:431:25 [INFO] [stdout] | [INFO] [stdout] 431 | else if let Some(_) = map.get(&(x - 1, y)) { Some((Direction::Right, (x - 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x - 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/days/day_20.rs:208:34 [INFO] [stdout] | [INFO] [stdout] 208 | .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 208 - .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] 208 + .filter(|(_, c)| matches!(*c, 'A'..='Z')) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:212:20 [INFO] [stdout] | [INFO] [stdout] 212 | if let Some(_) = map.get(&(x, y + 1)) { Some((Direction::Up, (x, y + 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y + 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | else if let Some(_) = map.get(&(x, y - 1)) { Some((Direction::Down, (x, y - 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y - 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:214:25 [INFO] [stdout] | [INFO] [stdout] 214 | else if let Some(_) = map.get(&(x + 1, y)) { Some((Direction::Left, (x + 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x + 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:215:25 [INFO] [stdout] | [INFO] [stdout] 215 | else if let Some(_) = map.get(&(x - 1, y)) { Some((Direction::Right, (x - 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x - 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:540:27 [INFO] [stdout] | [INFO] [stdout] 540 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:300:27 [INFO] [stdout] | [INFO] [stdout] 300 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] = note: `#[warn(clippy::needless_update)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:593:27 [INFO] [stdout] | [INFO] [stdout] 593 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:353:27 [INFO] [stdout] | [INFO] [stdout] 353 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day_20.rs:375:30 [INFO] [stdout] | [INFO] [stdout] 375 | fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (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#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_20.rs:375:18 [INFO] [stdout] | [INFO] [stdout] 375 | fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (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] 375 - fn parse (input: &String) -> (HashMap<(i32, i32), Node>, (i32, i32), (i32, i32)) { [INFO] [stdout] 375 + fn parse (input: &str) -> (HashMap<(i32, i32), Node>, (i32, i32), (i32, i32)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/days/day_20.rs:424:34 [INFO] [stdout] | [INFO] [stdout] 424 | .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 424 - .filter(|(_, c)| match *c { 'A'..='Z' => true, _ => false }) [INFO] [stdout] 424 + .filter(|(_, c)| matches!(*c, 'A'..='Z')) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_22.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | fn get_position_backwards (instructions: &Vec, seeked_position: i128, count_of_cards: i128, repetitions: i128) -... [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] 32 - fn get_position_backwards (instructions: &Vec, seeked_position: i128, count_of_cards: i128, repetitions: i128) -> i128 { [INFO] [stdout] 32 + fn get_position_backwards (instructions: &[ShuffleInstruction], seeked_position: i128, count_of_cards: i128, repetitions: i128) -> i128 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:428:20 [INFO] [stdout] | [INFO] [stdout] 428 | if let Some(_) = map.get(&(x, y + 1)) { Some((Direction::Up, (x, y + 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y + 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:429:25 [INFO] [stdout] | [INFO] [stdout] 429 | else if let Some(_) = map.get(&(x, y - 1)) { Some((Direction::Down, (x, y - 1))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x, y - 1)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:430:25 [INFO] [stdout] | [INFO] [stdout] 430 | else if let Some(_) = map.get(&(x + 1, y)) { Some((Direction::Left, (x + 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x + 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_22.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | fn parse (input: &String) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - fn parse (input: &String) -> Vec { [INFO] [stdout] 68 + fn parse (input: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/days/day_20.rs:431:25 [INFO] [stdout] | [INFO] [stdout] 431 | else if let Some(_) = map.get(&(x - 1, y)) { Some((Direction::Right, (x - 1, y))) } [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if map.get(&(x - 1, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/days/day_22.rs:83:10 [INFO] [stdout] | [INFO] [stdout] 83 | .filter_map(|opt| opt) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_22.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | [one, two, three].iter().filter_map(|opt| *opt).nth(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `[one, two, three].iter().filter_map(|opt| *opt).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/days/day_23.rs:42:57 [INFO] [stdout] | [INFO] [stdout] 42 | for (o_i, (address, x_maybe, _)) in (&packet_cache).iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `packet_cache` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day_23.rs:62:73 [INFO] [stdout] | [INFO] [stdout] 62 | for (origin_address, (target_address, x_maybe, y_maybe)) in (&packet_cache).iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `packet_cache` [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: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:540:27 [INFO] [stdout] | [INFO] [stdout] 540 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/days/day_23.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | / if idle_map.len() == 50 && idle_map.iter().all(|(_, b)| *b) { [INFO] [stdout] 80 | | if nat_packet != (-1, -1) { [INFO] [stdout] 81 | | if last_nat_packet_send_y == nat_packet.1 { return last_nat_packet_send_y; } [INFO] [stdout] 82 | | let (_, first_program) = self.programs.get_mut(0).expect("First program not found"); [INFO] [stdout] ... | [INFO] [stdout] 88 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 79 ~ if idle_map.len() == 50 && idle_map.iter().all(|(_, b)| *b) [INFO] [stdout] 80 ~ && nat_packet != (-1, -1) { [INFO] [stdout] 81 | if last_nat_packet_send_y == nat_packet.1 { return last_nat_packet_send_y; } [INFO] [stdout] ... [INFO] [stdout] 86 | last_nat_packet_send_y = nat_packet.1; [INFO] [stdout] 87 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct update has no effect, all the fields in the struct have already been specified [INFO] [stdout] --> src/days/day_20.rs:593:27 [INFO] [stdout] | [INFO] [stdout] 593 | ..*node [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day_24.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | ... if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 77 - if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] 77 + if !(is_bug_alive && adjacent_alive_count != 1 || adjacent_alive_count != 1 && adjacent_alive_count != 2) { [INFO] [stdout] | [INFO] [stdout] 77 - if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] 77 + if (adjacent_alive_count == 2 || adjacent_alive_count == 1) && (adjacent_alive_count == 1 || !is_bug_alive) { [INFO] [stdout] | [INFO] [stdout] 77 - if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] 77 + if adjacent_alive_count == 1 || !is_bug_alive && adjacent_alive_count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_22.rs:32:42 [INFO] [stdout] | [INFO] [stdout] 32 | fn get_position_backwards (instructions: &Vec, seeked_position: i128, count_of_cards: i128, repetitions: i128) -... [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] 32 - fn get_position_backwards (instructions: &Vec, seeked_position: i128, count_of_cards: i128, repetitions: i128) -> i128 { [INFO] [stdout] 32 + fn get_position_backwards (instructions: &[ShuffleInstruction], seeked_position: i128, count_of_cards: i128, repetitions: i128) -> i128 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_22.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | fn parse (input: &String) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - fn parse (input: &String) -> Vec { [INFO] [stdout] 68 + fn parse (input: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day_24.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 118 | ...if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 118 - if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] 118 + if !(is_bug_alive && adjacent_alive_bug_count != 1 || adjacent_alive_bug_count != 1 && adjacent_alive_bug_count != 2) { [INFO] [stdout] | [INFO] [stdout] 118 - if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] 118 + if (adjacent_alive_bug_count == 2 || adjacent_alive_bug_count == 1) && (adjacent_alive_bug_count == 1 || !is_bug_alive) { [INFO] [stdout] | [INFO] [stdout] 118 - if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] 118 + if adjacent_alive_bug_count == 1 || !is_bug_alive && adjacent_alive_bug_count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/days/day_22.rs:83:10 [INFO] [stdout] | [INFO] [stdout] 83 | .filter_map(|opt| opt) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_24.rs:132:20 [INFO] [stdout] | [INFO] [stdout] 132 | fn parse_1 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 132 - fn parse_1 (input: &String) -> u32 { [INFO] [stdout] 132 + fn parse_1 (input: &str) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/days/day_22.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | [one, two, three].iter().filter_map(|opt| *opt).nth(0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `[one, two, three].iter().filter_map(|opt| *opt).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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_24.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | fn parse_0 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 141 - fn parse_0 (input: &String) -> u32 { [INFO] [stdout] 141 + fn parse_0 (input: &str) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:20:30 [INFO] [stdout] | [INFO] [stdout] 20 | Some('n') => return "north\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 20 - Some('n') => return "north\n".to_string(), [INFO] [stdout] 20 + Some('n') => "north\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:21:30 [INFO] [stdout] | [INFO] [stdout] 21 | Some('s') => return "south\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - Some('s') => return "south\n".to_string(), [INFO] [stdout] 21 + Some('s') => "south\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:22:30 [INFO] [stdout] | [INFO] [stdout] 22 | Some('w') => return "west\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - Some('w') => return "west\n".to_string(), [INFO] [stdout] 22 + Some('w') => "west\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:23:30 [INFO] [stdout] | [INFO] [stdout] 23 | Some('e') => return "east\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 23 - Some('e') => return "east\n".to_string(), [INFO] [stdout] 23 + Some('e') => "east\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:24:30 [INFO] [stdout] | [INFO] [stdout] 24 | Some('i') => return "inv\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 24 - Some('i') => return "inv\n".to_string(), [INFO] [stdout] 24 + Some('i') => "inv\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:25:30 [INFO] [stdout] | [INFO] [stdout] 25 | Some('t') => return format!("take {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 25 - Some('t') => return format!("take {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] 25 + Some('t') => format!("take {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:26:30 [INFO] [stdout] | [INFO] [stdout] 26 | Some('d') => return format!("drop {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 26 - Some('d') => return format!("drop {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] 26 + Some('d') => format!("drop {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | _ => return "\n".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - _ => return "\n".to_string() [INFO] [stdout] 27 + _ => "\n".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day_23.rs:42:57 [INFO] [stdout] | [INFO] [stdout] 42 | for (o_i, (address, x_maybe, _)) in (&packet_cache).iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `packet_cache` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day_23.rs:62:73 [INFO] [stdout] | [INFO] [stdout] 62 | for (origin_address, (target_address, x_maybe, y_maybe)) in (&packet_cache).iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `packet_cache` [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 `if` statement can be collapsed [INFO] [stdout] --> src/days/day_23.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | / if idle_map.len() == 50 && idle_map.iter().all(|(_, b)| *b) { [INFO] [stdout] 80 | | if nat_packet != (-1, -1) { [INFO] [stdout] 81 | | if last_nat_packet_send_y == nat_packet.1 { return last_nat_packet_send_y; } [INFO] [stdout] 82 | | let (_, first_program) = self.programs.get_mut(0).expect("First program not found"); [INFO] [stdout] ... | [INFO] [stdout] 88 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 79 ~ if idle_map.len() == 50 && idle_map.iter().all(|(_, b)| *b) [INFO] [stdout] 80 ~ && nat_packet != (-1, -1) { [INFO] [stdout] 81 | if last_nat_packet_send_y == nat_packet.1 { return last_nat_packet_send_y; } [INFO] [stdout] ... [INFO] [stdout] 86 | last_nat_packet_send_y = nat_packet.1; [INFO] [stdout] 87 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day_24.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | ... if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 77 - if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] 77 + if !(is_bug_alive && adjacent_alive_count != 1 || adjacent_alive_count != 1 && adjacent_alive_count != 2) { [INFO] [stdout] | [INFO] [stdout] 77 - if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] 77 + if (adjacent_alive_count == 2 || adjacent_alive_count == 1) && (adjacent_alive_count == 1 || !is_bug_alive) { [INFO] [stdout] | [INFO] [stdout] 77 - if is_bug_alive && adjacent_alive_count == 1 || !is_bug_alive && (adjacent_alive_count == 1 ||adjacent_alive_count == 2) { [INFO] [stdout] 77 + if adjacent_alive_count == 1 || !is_bug_alive && adjacent_alive_count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/int_code.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | self.output.last().map(|i| i.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.output.last().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i128` which implements the `Copy` trait [INFO] [stdout] --> src/days/int_code.rs:56:36 [INFO] [stdout] | [INFO] [stdout] 56 | self.output.last().map(|i| i.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/days/int_code.rs:108:17 [INFO] [stdout] | [INFO] [stdout] 108 | 99 | _ => Instruction::Halt, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:126:32 [INFO] [stdout] | [INFO] [stdout] 126 | else { self.instruction_pointer = self.instruction_pointer + 3 } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/int_code.rs:136:43 [INFO] [stdout] | [INFO] [stdout] 136 | self.set_int_code(target_index as usize, result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `target_index` [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: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:138:25 [INFO] [stdout] | [INFO] [stdout] 138 | self.instruction_pointer = self.instruction_pointer + 4;} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 4` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/int_code.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | if self.input.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/int_code.rs:146:39 [INFO] [stdout] | [INFO] [stdout] 146 | self.set_int_code(target_index as usize, input); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `target_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | self.instruction_pointer = self.instruction_pointer + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day_24.rs:118:16 [INFO] [stdout] | [INFO] [stdout] 118 | ...if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 118 - if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] 118 + if !(is_bug_alive && adjacent_alive_bug_count != 1 || adjacent_alive_bug_count != 1 && adjacent_alive_bug_count != 2) { [INFO] [stdout] | [INFO] [stdout] 118 - if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] 118 + if (adjacent_alive_bug_count == 2 || adjacent_alive_bug_count == 1) && (adjacent_alive_bug_count == 1 || !is_bug_alive) { [INFO] [stdout] | [INFO] [stdout] 118 - if is_bug_alive && adjacent_alive_bug_count == 1 || !is_bug_alive && (adjacent_alive_bug_count == 1 ||adjacent_alive_bug_count == 2) { [INFO] [stdout] 118 + if adjacent_alive_bug_count == 1 || !is_bug_alive && adjacent_alive_bug_count == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:158:17 [INFO] [stdout] | [INFO] [stdout] 158 | self.instruction_pointer = self.instruction_pointer + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | self.relative_base = self.relative_base + operator_0 as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.relative_base += operator_0 as usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:166:17 [INFO] [stdout] | [INFO] [stdout] 166 | self.instruction_pointer = self.instruction_pointer + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/int_code.rs:226:36 [INFO] [stdout] | [INFO] [stdout] 226 | fn parse_into_int_code (text_code: &String) -> Vec{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 226 - fn parse_into_int_code (text_code: &String) -> Vec{ [INFO] [stdout] 226 + fn parse_into_int_code (text_code: &str) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_24.rs:132:20 [INFO] [stdout] | [INFO] [stdout] 132 | fn parse_1 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 132 - fn parse_1 (input: &String) -> u32 { [INFO] [stdout] 132 + fn parse_1 (input: &str) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/day_24.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | fn parse_0 (input: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 141 - fn parse_0 (input: &String) -> u32 { [INFO] [stdout] 141 + fn parse_0 (input: &str) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:20:30 [INFO] [stdout] | [INFO] [stdout] 20 | Some('n') => return "north\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 20 - Some('n') => return "north\n".to_string(), [INFO] [stdout] 20 + Some('n') => "north\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:21:30 [INFO] [stdout] | [INFO] [stdout] 21 | Some('s') => return "south\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 21 - Some('s') => return "south\n".to_string(), [INFO] [stdout] 21 + Some('s') => "south\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:22:30 [INFO] [stdout] | [INFO] [stdout] 22 | Some('w') => return "west\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - Some('w') => return "west\n".to_string(), [INFO] [stdout] 22 + Some('w') => "west\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:23:30 [INFO] [stdout] | [INFO] [stdout] 23 | Some('e') => return "east\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 23 - Some('e') => return "east\n".to_string(), [INFO] [stdout] 23 + Some('e') => "east\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:24:30 [INFO] [stdout] | [INFO] [stdout] 24 | Some('i') => return "inv\n".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 24 - Some('i') => return "inv\n".to_string(), [INFO] [stdout] 24 + Some('i') => "inv\n".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:25:30 [INFO] [stdout] | [INFO] [stdout] 25 | Some('t') => return format!("take {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 25 - Some('t') => return format!("take {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] 25 + Some('t') => format!("take {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:26:30 [INFO] [stdout] | [INFO] [stdout] 26 | Some('d') => return format!("drop {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 26 - Some('d') => return format!("drop {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] 26 + Some('d') => format!("drop {}\n", &input[2..(input.len() - 2)]), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/ascii_code.rs:47:53 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn push_script_as_input (&mut self, script: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 - pub fn push_script_as_input (&mut self, script: &String) { [INFO] [stdout] 47 + pub fn push_script_as_input (&mut self, script: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day_25.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | _ => return "\n".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - _ => return "\n".to_string() [INFO] [stdout] 27 + _ => "\n".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day_tasks.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | fn task_0 (&self, input: &String) -> String; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day_tasks.rs:7:30 [INFO] [stdout] | [INFO] [stdout] 7 | fn task_1 (&self, input: &String) -> String; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day_15.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | for next_point in vec![(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/int_code.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | self.output.last().map(|i| i.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.output.last().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i128` which implements the `Copy` trait [INFO] [stdout] --> src/days/int_code.rs:56:36 [INFO] [stdout] | [INFO] [stdout] 56 | self.output.last().map(|i| i.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day_15.rs:64:27 [INFO] [stdout] | [INFO] [stdout] 64 | for next_point in vec![(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/days/int_code.rs:108:17 [INFO] [stdout] | [INFO] [stdout] 108 | 99 | _ => Instruction::Halt, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:126:32 [INFO] [stdout] | [INFO] [stdout] 126 | else { self.instruction_pointer = self.instruction_pointer + 3 } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/int_code.rs:136:43 [INFO] [stdout] | [INFO] [stdout] 136 | self.set_int_code(target_index as usize, result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `target_index` [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: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:138:25 [INFO] [stdout] | [INFO] [stdout] 138 | self.instruction_pointer = self.instruction_pointer + 4;} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 4` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/days/int_code.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | if self.input.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/int_code.rs:146:39 [INFO] [stdout] | [INFO] [stdout] 146 | self.set_int_code(target_index as usize, input); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `target_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:147:21 [INFO] [stdout] | [INFO] [stdout] 147 | self.instruction_pointer = self.instruction_pointer + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:158:17 [INFO] [stdout] | [INFO] [stdout] 158 | self.instruction_pointer = self.instruction_pointer + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | self.relative_base = self.relative_base + operator_0 as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.relative_base += operator_0 as usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/int_code.rs:166:17 [INFO] [stdout] | [INFO] [stdout] 166 | self.instruction_pointer = self.instruction_pointer + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.instruction_pointer += 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/int_code.rs:226:36 [INFO] [stdout] | [INFO] [stdout] 226 | fn parse_into_int_code (text_code: &String) -> Vec{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 226 - fn parse_into_int_code (text_code: &String) -> Vec{ [INFO] [stdout] 226 + fn parse_into_int_code (text_code: &str) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/days/ascii_code.rs:47:53 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn push_script_as_input (&mut self, script: &String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 - pub fn push_script_as_input (&mut self, script: &String) { [INFO] [stdout] 47 + pub fn push_script_as_input (&mut self, script: &str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day_tasks.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | fn task_0 (&self, input: &String) -> String; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day_tasks.rs:7:30 [INFO] [stdout] | [INFO] [stdout] 7 | fn task_1 (&self, input: &String) -> String; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day_15.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | for next_point in vec![(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day_15.rs:64:27 [INFO] [stdout] | [INFO] [stdout] 64 | for next_point in vec![(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(x, y - 1), (x, y + 1), (x - 1, y), (x + 1, y)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.14s [INFO] running `Command { std: "docker" "inspect" "93f46d74fe4634686e22dba536748adf234ea5be6f78aa08e8c6340e9a0450bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "93f46d74fe4634686e22dba536748adf234ea5be6f78aa08e8c6340e9a0450bf", kill_on_drop: false }` [INFO] [stdout] 93f46d74fe4634686e22dba536748adf234ea5be6f78aa08e8c6340e9a0450bf