[INFO] cloning repository https://github.com/alexpusch/AoC-2023 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/alexpusch/AoC-2023" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falexpusch%2FAoC-2023", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falexpusch%2FAoC-2023'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4bc82fbd88dc5b0e2d459db97d329fe28257c83f [INFO] linting alexpusch/AoC-2023 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falexpusch%2FAoC-2023" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/alexpusch/AoC-2023 [INFO] finished tweaking git repo https://github.com/alexpusch/AoC-2023 [INFO] tweaked toml for git repo https://github.com/alexpusch/AoC-2023 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/alexpusch/AoC-2023 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/alexpusch/AoC-2023 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 3ffc8a780e036b585e1574245be66d715363ceefb3e5878f08d5fed73c8bf906 [INFO] running `Command { std: "docker" "start" "-a" "3ffc8a780e036b585e1574245be66d715363ceefb3e5878f08d5fed73c8bf906", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3ffc8a780e036b585e1574245be66d715363ceefb3e5878f08d5fed73c8bf906", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3ffc8a780e036b585e1574245be66d715363ceefb3e5878f08d5fed73c8bf906", kill_on_drop: false }` [INFO] [stdout] 3ffc8a780e036b585e1574245be66d715363ceefb3e5878f08d5fed73c8bf906 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 2560d504070b07d0360b16b5d54d3f1371085a10ad5228b6bdcc708e126b2e78 [INFO] running `Command { std: "docker" "start" "-a" "2560d504070b07d0360b16b5d54d3f1371085a10ad5228b6bdcc708e126b2e78", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Checking regex-syntax v0.8.2 [INFO] [stderr] Checking aho-corasick v1.1.2 [INFO] [stderr] Checking regex-automata v0.4.3 [INFO] [stderr] Checking regex v1.10.2 [INFO] [stderr] Checking advent-of-code-2023 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day16/mod.rs:203:17 [INFO] [stdout] | [INFO] [stdout] 203 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/day16/mod.rs:214:17 [INFO] [stdout] | [INFO] [stdout] 214 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `max` [INFO] [stdout] --> src/day4/mod.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | cmp::{max, min}, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day16/mod.rs:203:17 [INFO] [stdout] | [INFO] [stdout] 203 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [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/day16/mod.rs:214:17 [INFO] [stdout] | [INFO] [stdout] 214 | y: y, [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `max` [INFO] [stdout] --> src/day4/mod.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | cmp::{max, min}, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hand` [INFO] [stdout] --> src/day7/mod.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | .fold(0, |acc, (i, (hand, bid))| acc + bid * (i + 1) as u32) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_hand` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day1/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [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 `decrypt_lines` is never used [INFO] [stdout] --> src/day1/mod.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn decrypt_lines(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decrypt_lines2` is never used [INFO] [stdout] --> src/day1/mod.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn decrypt_lines2(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decrypt_line` is never used [INFO] [stdout] --> src/day1/mod.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn decrypt_line(line: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decrypt_line2` is never used [INFO] [stdout] --> src/day1/mod.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn decrypt_line2(line: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rev` is never used [INFO] [stdout] --> src/day1/mod.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn rev(line: &str) -> String { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_digits` is never used [INFO] [stdout] --> src/day1/mod.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn get_digits(line: &str) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `word_to_digit` is never used [INFO] [stdout] --> src/day1/mod.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn word_to_digit(word: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ROUND` is never used [INFO] [stdout] --> src/day14/mod.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | const ROUND: char = 'O'; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `CUBE` is never used [INFO] [stdout] --> src/day14/mod.rs:9:7 [INFO] [stdout] | [INFO] [stdout] 9 | const CUBE: char = '#'; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day14/mod.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SparseCell` is never constructed [INFO] [stdout] --> src/day14/mod.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct SparseCell { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Board` is never constructed [INFO] [stdout] --> src/day14/mod.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | struct Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/day14/mod.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 109 | impl Board { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 110 | fn new(width: usize, height: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 122 | fn add(&mut self, cell: SparseCell) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 127 | fn tilt_north(&mut self) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 154 | fn tilt_south(&mut self) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | fn tilt_west(&mut self) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | fn tilt_east(&mut self) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | pub fn get_load(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tilt_cycles` is never used [INFO] [stdout] --> src/day14/mod.rs:248:4 [INFO] [stdout] | [INFO] [stdout] 248 | fn tilt_cycles(mut board: Board, times: usize) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day15/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Op` is never used [INFO] [stdout] --> src/day15/mod.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Op { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Command` is never constructed [INFO] [stdout] --> src/day15/mod.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | struct Command { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_str` is never used [INFO] [stdout] --> src/day15/mod.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 27 | impl Command { [INFO] [stdout] | ------------ associated function in this implementation [INFO] [stdout] 28 | pub fn from_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Lens` is never constructed [INFO] [stdout] --> src/day15/mod.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | struct Lens { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LensBox` is never constructed [INFO] [stdout] --> src/day15/mod.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | struct LensBox { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Machine` is never constructed [INFO] [stdout] --> src/day15/mod.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | struct Machine { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `run`, and `get_focusing_power` are never used [INFO] [stdout] --> src/day15/mod.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 62 | impl Machine { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 63 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | fn run(&mut self, commands: Vec) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 95 | fn get_focusing_power(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/day15/mod.rs:105:4 [INFO] [stdout] | [INFO] [stdout] 105 | fn parse(input: &str) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hash_all` is never used [INFO] [stdout] --> src/day15/mod.rs:109:4 [INFO] [stdout] | [INFO] [stdout] 109 | fn hash_all(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hash` is never used [INFO] [stdout] --> src/day15/mod.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn hash(input: &str) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `debug` is never used [INFO] [stdout] --> src/day16/mod.rs:146:4 [INFO] [stdout] | [INFO] [stdout] 146 | fn debug(board: &Board, ray: &Ray) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day2/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Game` is never constructed [INFO] [stdout] --> src/day2/mod.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct Game { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `parse_str` and `get_minimal_set` are never used [INFO] [stdout] --> src/day2/mod.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl Game { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 25 | fn parse_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 42 | fn get_minimal_set(&self) -> BallSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BallSet` is never constructed [INFO] [stdout] --> src/day2/mod.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | struct BallSet { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `parse_str` and `get_power` are never used [INFO] [stdout] --> src/day2/mod.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 62 | impl BallSet { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 63 | fn parse_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | fn get_power(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `GameRule` is never constructed [INFO] [stdout] --> src/day2/mod.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | struct GameRule { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_game_possible` is never used [INFO] [stdout] --> src/day2/mod.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 103 | impl GameRule { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 104 | fn is_game_possible(&self, game: &Game) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_games` is never used [INFO] [stdout] --> src/day2/mod.rs:111:4 [INFO] [stdout] | [INFO] [stdout] 111 | fn parse_games(input: &str) -> impl Iterator + '_ { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_possible_games` is never used [INFO] [stdout] --> src/day2/mod.rs:115:4 [INFO] [stdout] | [INFO] [stdout] 115 | fn get_possible_games(input: &str, game_rules: GameRule) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_games_power` is never used [INFO] [stdout] --> src/day2/mod.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn get_games_power(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day3/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_part_number_sum` is never used [INFO] [stdout] --> src/day3/mod.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn get_part_number_sum(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_gear_ratio_sum` is never used [INFO] [stdout] --> src/day3/mod.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn get_gear_ratio_sum(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Coord` is never constructed [INFO] [stdout] --> src/day3/mod.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct Coord(i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SymbolPos` is never constructed [INFO] [stdout] --> src/day3/mod.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | struct SymbolPos { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NumberPos` is never constructed [INFO] [stdout] --> src/day3/mod.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | struct NumberPos { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Board` is never constructed [INFO] [stdout] --> src/day3/mod.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | struct Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_part_numbers`, `is_near_any_symbol`, `is_near_symbol`, and `get_gears` are never used [INFO] [stdout] --> src/day3/mod.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 51 | impl Board { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 52 | pub fn get_part_numbers(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn is_near_any_symbol(&self, number_pos: &NumberPos) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn is_near_symbol(&self, number_pos: &NumberPos, symbol_pos: &SymbolPos) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn get_gears(&self) -> Vec<(SymbolPos, u32, u32)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/day3/mod.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn parse(input: &str) -> Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day4/mod.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Card` is never constructed [INFO] [stdout] --> src/day4/mod.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct Card { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_str`, `get_winning_numbers_len`, and `get_score` are never used [INFO] [stdout] --> src/day4/mod.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | impl Card { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 26 | fn from_str(line: &str) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | fn get_winning_numbers_len(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | fn get_score(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_sum_scores` is never used [INFO] [stdout] --> src/day4/mod.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_sum_scores(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_2` is never used [INFO] [stdout] --> src/day4/mod.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn part_2(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day5/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_1` is never used [INFO] [stdout] --> src/day5/mod.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn part_1( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_2` is never used [INFO] [stdout] --> src/day5/mod.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn part_2( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MapRange` is never constructed [INFO] [stdout] --> src/day5/mod.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | struct MapRange { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_str` and `get_mapping` are never used [INFO] [stdout] --> src/day5/mod.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 82 | impl MapRange { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 83 | fn from_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 97 | fn get_mapping(&self, source: u64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MapRanges` is never constructed [INFO] [stdout] --> src/day5/mod.rs:107:8 [INFO] [stdout] | [INFO] [stdout] 107 | struct MapRanges(Vec); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_str`, `get_mapping`, and `get_containing_range` are never used [INFO] [stdout] --> src/day5/mod.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 109 | impl MapRanges { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 110 | fn from_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 119 | fn get_mapping(&self, source: u64) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 134 | fn get_containing_range(&self, source: u64) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Alamanc` is never constructed [INFO] [stdout] --> src/day5/mod.rs:143:8 [INFO] [stdout] | [INFO] [stdout] 143 | struct Alamanc { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `parse`, `get_loc`, `get_min_loc`, `get_next_range_equal_len`, and `get_min_loc2` are never used [INFO] [stdout] --> src/day5/mod.rs:155:8 [INFO] [stdout] | [INFO] [stdout] 154 | impl Alamanc { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 155 | fn parse( [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | fn get_loc(&self, seed: u64) -> u64 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | fn get_min_loc(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 198 | fn get_next_range_equal_len(&self, seed: u64) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 243 | fn get_min_loc2(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day6/mod.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_number_of_ways` is never used [INFO] [stdout] --> src/day6/mod.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn get_number_of_ways(time: f64, best_dist: f64) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day7/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/day7/mod.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn parse(input: &str) -> Vec<(Hand, u32)> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_jokers` is never used [INFO] [stdout] --> src/day7/mod.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn parse_jokers(input: &str) -> Vec<(HandJoker, u32)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_score` is never used [INFO] [stdout] --> src/day7/mod.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_score(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_score_jokers` is never used [INFO] [stdout] --> src/day7/mod.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn get_score_jokers(input: &str) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Card` is never constructed [INFO] [stdout] --> src/day7/mod.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct Card(u32); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_char` is never used [INFO] [stdout] --> src/day7/mod.rs:65:8 [INFO] [stdout] | [INFO] [stdout] 64 | impl Card { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 65 | fn from_char(c: char) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hand` is never constructed [INFO] [stdout] --> src/day7/mod.rs:80:8 [INFO] [stdout] | [INFO] [stdout] 80 | struct Hand(Vec); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_str`, `to_sets`, and `rank` are never used [INFO] [stdout] --> src/day7/mod.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 82 | impl Hand { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 83 | fn from_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | fn to_sets(&self) -> HashMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 99 | fn rank(&self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `HandJoker` is never constructed [INFO] [stdout] --> src/day7/mod.rs:131:8 [INFO] [stdout] | [INFO] [stdout] 131 | struct HandJoker(Vec); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_str`, `to_sets`, and `rank` are never used [INFO] [stdout] --> src/day7/mod.rs:134:8 [INFO] [stdout] | [INFO] [stdout] 133 | impl HandJoker { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 134 | fn from_str(input: &str) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 140 | fn to_sets(&self) -> HashMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 163 | fn rank(&self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CardJoker` is never constructed [INFO] [stdout] --> src/day7/mod.rs:197:8 [INFO] [stdout] | [INFO] [stdout] 197 | struct CardJoker(u32); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_char` is never used [INFO] [stdout] --> src/day7/mod.rs:200:8 [INFO] [stdout] | [INFO] [stdout] 199 | impl CardJoker { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 200 | fn from_char(c: char) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day8/mod.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day8/mod.rs:15:6 [INFO] [stdout] | [INFO] [stdout] 15 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_char` is never used [INFO] [stdout] --> src/day8/mod.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 20 | impl Direction { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 21 | fn from_char(c: char) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/day8/mod.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Simulation` is never constructed [INFO] [stdout] --> src/day8/mod.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | struct Simulation { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_str`, `run`, `get_next`, `run_from`, and `run_part2` are never used [INFO] [stdout] --> src/day8/mod.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 43 | impl Simulation { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 44 | fn from_str(input: &str) -> Simulation { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 80 | fn run(&self) -> u64 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | fn get_next(&self, instruction_i: usize, from_node: &Node) -> &Node { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | fn run_from(&self, instruction_i: usize, from: &str) -> (usize, &Node) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 121 | fn run_part2(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1/mod.rs:53:20 [INFO] [stdout] | [INFO] [stdout] 53 | Regex::new(&r"(\d|enin|thgie|neves|xis|evif|ruof|eerht|owt|eno|orez)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `r"(\d|enin|thgie|neves|xis|evif|ruof|eerht|owt|eno|orez)"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1/mod.rs:58:35 [INFO] [stdout] | [INFO] [stdout] 58 | let last = word_to_digit(&rev(&reverse_regex.find(&rev_line).unwrap().as_str())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `reverse_regex.find(&rev_line).unwrap().as_str()` [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/day1/mod.rs:65:30 [INFO] [stdout] | [INFO] [stdout] 65 | if let Some(value) = word.chars().nth(0).and_then(|c| c.to_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `word.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: direct implementation of `ToString` [INFO] [stdout] --> src/day14/mod.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | / impl ToString for SparseCell { [INFO] [stdout] 33 | | fn to_string(&self) -> String { [INFO] [stdout] 34 | | self.symbol.to_string() [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/day14/mod.rs:47:6 [INFO] [stdout] | [INFO] [stdout] 47 | impl<'a> std::fmt::Debug for Board { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hand` [INFO] [stdout] --> src/day7/mod.rs:46:29 [INFO] [stdout] | [INFO] [stdout] 46 | .fold(0, |acc, (i, (hand, bid))| acc + bid * (i + 1) as u32) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_hand` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/day14/mod.rs:66:6 [INFO] [stdout] | [INFO] [stdout] 66 | impl<'a> FromStr for Board { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day1/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [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 `solve` is never used [INFO] [stdout] --> src/day14/mod.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day15/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `debug` is never used [INFO] [stdout] --> src/day16/mod.rs:146:4 [INFO] [stdout] | [INFO] [stdout] 146 | fn debug(board: &Board, ray: &Ray) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day2/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day3/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Coord` is never constructed [INFO] [stdout] --> src/day3/mod.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct Coord(i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day4/mod.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day5/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day6/mod.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day7/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day8/mod.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn solve() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1/mod.rs:53:20 [INFO] [stdout] | [INFO] [stdout] 53 | Regex::new(&r"(\d|enin|thgie|neves|xis|evif|ruof|eerht|owt|eno|orez)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `r"(\d|enin|thgie|neves|xis|evif|ruof|eerht|owt|eno|orez)"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day1/mod.rs:58:35 [INFO] [stdout] | [INFO] [stdout] 58 | let last = word_to_digit(&rev(&reverse_regex.find(&rev_line).unwrap().as_str())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `reverse_regex.find(&rev_line).unwrap().as_str()` [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/day1/mod.rs:65:30 [INFO] [stdout] | [INFO] [stdout] 65 | if let Some(value) = word.chars().nth(0).and_then(|c| c.to_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `word.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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/day14/mod.rs:268:20 [INFO] [stdout] | [INFO] [stdout] 268 | return loads [INFO] [stdout] | ____________________^ [INFO] [stdout] 269 | | .get(cycle_i + last_cycle_reminder as usize - 1) [INFO] [stdout] 270 | | .unwrap() [INFO] [stdout] 271 | | .clone(); [INFO] [stdout] | |________________________^ [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] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 268 ~ return *loads [INFO] [stdout] 269 + .get(cycle_i + last_cycle_reminder as usize - 1) [INFO] [stdout] 270 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/day14/mod.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | / impl ToString for SparseCell { [INFO] [stdout] 33 | | fn to_string(&self) -> String { [INFO] [stdout] 34 | | self.symbol.to_string() [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/day14/mod.rs:47:6 [INFO] [stdout] | [INFO] [stdout] 47 | impl<'a> std::fmt::Debug for Board { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/day14/mod.rs:269:32 [INFO] [stdout] | [INFO] [stdout] 269 | .get(cycle_i + last_cycle_reminder as usize - 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `last_cycle_reminder` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the impl [INFO] [stdout] --> src/day14/mod.rs:66:6 [INFO] [stdout] | [INFO] [stdout] 66 | impl<'a> FromStr for Board { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/day14/mod.rs:268:20 [INFO] [stdout] | [INFO] [stdout] 268 | return loads [INFO] [stdout] | ____________________^ [INFO] [stdout] 269 | | .get(cycle_i + last_cycle_reminder as usize - 1) [INFO] [stdout] 270 | | .unwrap() [INFO] [stdout] 271 | | .clone(); [INFO] [stdout] | |________________________^ [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] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 268 ~ return *loads [INFO] [stdout] 269 + .get(cycle_i + last_cycle_reminder as usize - 1) [INFO] [stdout] 270 ~ .unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/day14/mod.rs:269:32 [INFO] [stdout] | [INFO] [stdout] 269 | .get(cycle_i + last_cycle_reminder as usize - 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `last_cycle_reminder` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16/mod.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:211:13 [INFO] [stdout] | [INFO] [stdout] 211 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:238:30 [INFO] [stdout] | [INFO] [stdout] 238 | let next_rays = step(&board, ray); [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day2/mod.rs:119:52 [INFO] [stdout] | [INFO] [stdout] 119 | .filter(|game| game_rules.is_game_possible(&game)) [INFO] [stdout] | ^^^^^ help: change this to: `game` [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/day16/mod.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3/mod.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / (number_pos.start_x - 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the left [INFO] [stdout] 72 | | || (number_pos.end_x + 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the right [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] 71 - (number_pos.start_x - 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the left [INFO] [stdout] 72 - || (number_pos.end_x + 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the right [INFO] [stdout] 71 + !(number_pos.y != symbol_pos.y || number_pos.start_x - 1 != symbol_pos.x && number_pos.end_x + 1 != symbol_pos.x) // symbol on the right [INFO] [stdout] | [INFO] [stdout] 71 - (number_pos.start_x - 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the left [INFO] [stdout] 72 - || (number_pos.end_x + 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the right [INFO] [stdout] 71 + (number_pos.end_x + 1 == symbol_pos.x || number_pos.start_x - 1 == symbol_pos.x) && number_pos.y == symbol_pos.y // symbol on the right [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16/mod.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:211:13 [INFO] [stdout] | [INFO] [stdout] 211 | &board, [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/day16/mod.rs:238:30 [INFO] [stdout] | [INFO] [stdout] 238 | let next_rays = step(&board, ray); [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3/mod.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | / assert_eq!( [INFO] [stdout] 216 | | board.is_near_any_symbol(&NumberPos { [INFO] [stdout] 217 | | number: 58, [INFO] [stdout] 218 | | start_x: 7, [INFO] [stdout] ... | [INFO] [stdout] 222 | | false [INFO] [stdout] 223 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 215 ~ assert!( [INFO] [stdout] 216 ~ !board.is_near_any_symbol(&NumberPos { [INFO] [stdout] 217 | number: 58, [INFO] [stdout] ... [INFO] [stdout] 220 | y: 5 [INFO] [stdout] 221 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3/mod.rs:224:9 [INFO] [stdout] | [INFO] [stdout] 224 | / assert_eq!( [INFO] [stdout] 225 | | board.is_near_any_symbol(&NumberPos { [INFO] [stdout] 226 | | number: 35, [INFO] [stdout] 227 | | start_x: 2, [INFO] [stdout] ... | [INFO] [stdout] 231 | | true [INFO] [stdout] 232 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 224 ~ assert!( [INFO] [stdout] 225 | board.is_near_any_symbol(&NumberPos { [INFO] [stdout] ... [INFO] [stdout] 229 | y: 2 [INFO] [stdout] 230 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3/mod.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | / assert_eq!( [INFO] [stdout] 234 | | board.is_near_any_symbol(&NumberPos { [INFO] [stdout] 235 | | number: 633, [INFO] [stdout] 236 | | start_x: 6, [INFO] [stdout] ... | [INFO] [stdout] 240 | | true [INFO] [stdout] 241 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 233 ~ assert!( [INFO] [stdout] 234 | board.is_near_any_symbol(&NumberPos { [INFO] [stdout] ... [INFO] [stdout] 238 | y: 2 [INFO] [stdout] 239 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/day4/mod.rs:86:22 [INFO] [stdout] | [INFO] [stdout] 86 | let copies = copies_by_card.get(&card.id).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*copies_by_card.get(&card.id).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/day4/mod.rs:89:69 [INFO] [stdout] | [INFO] [stdout] 89 | for next_card_i in (card.id + 1)..(min(card.id + 1 + w, cards_len as u32 + 1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `cards_len` [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/day4/mod.rs:92:37 [INFO] [stdout] | [INFO] [stdout] 92 | .and_modify(|n| *n = *n + 1u32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `*n += 1u32` [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/day2/mod.rs:119:52 [INFO] [stdout] | [INFO] [stdout] 119 | .filter(|game| game_rules.is_game_possible(&game)) [INFO] [stdout] | ^^^^^ help: change this to: `game` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/day5/mod.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / fn part_1( [INFO] [stdout] 28 | | seeds: &str, [INFO] [stdout] 29 | | seeds_to_soil: &str, [INFO] [stdout] 30 | | soil_to_fert: &str, [INFO] [stdout] ... | [INFO] [stdout] 35 | | hum_to_loc: &str, [INFO] [stdout] 36 | | ) -> u64 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/day5/mod.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / fn part_2( [INFO] [stdout] 52 | | seeds: &str, [INFO] [stdout] 53 | | seeds_to_soil: &str, [INFO] [stdout] 54 | | soil_to_fert: &str, [INFO] [stdout] ... | [INFO] [stdout] 59 | | hum_to_loc: &str, [INFO] [stdout] 60 | | ) -> u64 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/day5/mod.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / fn parse( [INFO] [stdout] 156 | | seeds: &str, [INFO] [stdout] 157 | | seeds_to_soil: &str, [INFO] [stdout] 158 | | soil_to_fert: &str, [INFO] [stdout] ... | [INFO] [stdout] 163 | | hum_to_loc: &str, [INFO] [stdout] 164 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day5/mod.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 189 | let loc = self.hum_to_loc.get_mapping(hum); [INFO] [stdout] | ------------------------------------------- unnecessary `let` binding [INFO] [stdout] 190 | [INFO] [stdout] 191 | loc [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] 189 ~ [INFO] [stdout] 190 | [INFO] [stdout] 191 ~ self.hum_to_loc.get_mapping(hum) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/day5/mod.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 228 | / [ [INFO] [stdout] 229 | | remining_soil_range, [INFO] [stdout] 230 | | remining_fert_range, [INFO] [stdout] 231 | | remining_water_range, [INFO] [stdout] ... | [INFO] [stdout] 239 | | .unwrap() [INFO] [stdout] 240 | | .clone() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 228 ~ *[ [INFO] [stdout] 229 + remining_soil_range, [INFO] [stdout] 230 + remining_fert_range, [INFO] [stdout] 231 + remining_water_range, [INFO] [stdout] 232 + remining_light_range, [INFO] [stdout] 233 + remining_temp_range, [INFO] [stdout] 234 + remining_hum_range, [INFO] [stdout] 235 + remining_loc_range, [INFO] [stdout] 236 + ] [INFO] [stdout] 237 + .iter() [INFO] [stdout] 238 + .min() [INFO] [stdout] 239 + .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3/mod.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / (number_pos.start_x - 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the left [INFO] [stdout] 72 | | || (number_pos.end_x + 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the right [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] 71 - (number_pos.start_x - 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the left [INFO] [stdout] 72 - || (number_pos.end_x + 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the right [INFO] [stdout] 71 + !(number_pos.y != symbol_pos.y || number_pos.start_x - 1 != symbol_pos.x && number_pos.end_x + 1 != symbol_pos.x) // symbol on the right [INFO] [stdout] | [INFO] [stdout] 71 - (number_pos.start_x - 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the left [INFO] [stdout] 72 - || (number_pos.end_x + 1 == symbol_pos.x && number_pos.y == symbol_pos.y) // symbol on the right [INFO] [stdout] 71 + (number_pos.end_x + 1 == symbol_pos.x || number_pos.start_x - 1 == symbol_pos.x) && number_pos.y == symbol_pos.y // symbol on the right [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day5/mod.rs:261:21 [INFO] [stdout] | [INFO] [stdout] 261 | cur = cur + jump; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `cur += jump` [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 multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/day6/mod.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | let t1 = (-1. * time + (time * time - 4. * best_dist).sqrt()) / -2.; [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/day6/mod.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | let t2 = (-1. * time - (time * time - 4. * best_dist).sqrt()) / -2.; [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day7/mod.rs:92:33 [INFO] [stdout] | [INFO] [stdout] 92 | .and_modify(|c| *c = *c + 1) [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `*c += 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7/mod.rs:103:44 [INFO] [stdout] | [INFO] [stdout] 103 | sorted_sets.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^ help: change this to: `a.1` [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: accessing first element with `sorted_sets.get(0)` [INFO] [stdout] --> src/day7/mod.rs:105:16 [INFO] [stdout] | [INFO] [stdout] 105 | match (sorted_sets.get(0), sorted_sets.get(1), sorted_sets.get(2)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sorted_sets.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: manual implementation of an assign operation [INFO] [stdout] --> src/day7/mod.rs:143:33 [INFO] [stdout] | [INFO] [stdout] 143 | .and_modify(|c| *c = *c + 1) [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `*c += 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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/day7/mod.rs:151:30 [INFO] [stdout] | [INFO] [stdout] 151 | let jokers = jokers.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*jokers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day7/mod.rs:156:17 [INFO] [stdout] | [INFO] [stdout] 156 | *max_set.1 = *max_set.1 + jokers; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*max_set.1 += jokers` [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/day7/mod.rs:167:44 [INFO] [stdout] | [INFO] [stdout] 167 | sorted_sets.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^ help: change this to: `a.1` [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: accessing first element with `sorted_sets.get(0)` [INFO] [stdout] --> src/day7/mod.rs:171:16 [INFO] [stdout] | [INFO] [stdout] 171 | match (sorted_sets.get(0), sorted_sets.get(1), sorted_sets.get(2)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sorted_sets.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/day4/mod.rs:86:22 [INFO] [stdout] | [INFO] [stdout] 86 | let copies = copies_by_card.get(&card.id).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*copies_by_card.get(&card.id).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/day4/mod.rs:89:69 [INFO] [stdout] | [INFO] [stdout] 89 | for next_card_i in (card.id + 1)..(min(card.id + 1 + w, cards_len as u32 + 1)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `cards_len` [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/day4/mod.rs:92:37 [INFO] [stdout] | [INFO] [stdout] 92 | .and_modify(|n| *n = *n + 1u32); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `*n += 1u32` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/day5/mod.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / fn part_1( [INFO] [stdout] 28 | | seeds: &str, [INFO] [stdout] 29 | | seeds_to_soil: &str, [INFO] [stdout] 30 | | soil_to_fert: &str, [INFO] [stdout] ... | [INFO] [stdout] 35 | | hum_to_loc: &str, [INFO] [stdout] 36 | | ) -> u64 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/day5/mod.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | / fn part_2( [INFO] [stdout] 52 | | seeds: &str, [INFO] [stdout] 53 | | seeds_to_soil: &str, [INFO] [stdout] 54 | | soil_to_fert: &str, [INFO] [stdout] ... | [INFO] [stdout] 59 | | hum_to_loc: &str, [INFO] [stdout] 60 | | ) -> u64 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> src/day8/mod.rs:81:38 [INFO] [stdout] | [INFO] [stdout] 81 | let mut cur = self.graph.get("AAA".into()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider removing `.into()`: `"AAA"` [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: this creates an owned instance just for comparison [INFO] [stdout] --> src/day8/mod.rs:84:27 [INFO] [stdout] | [INFO] [stdout] 84 | while cur.text != "ZZZ".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"ZZZ"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` 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/day8/mod.rs:113:56 [INFO] [stdout] | [INFO] [stdout] 113 | cur = self.get_next(instruction_i + delta, &cur); [INFO] [stdout] | ^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day8/mod.rs:135:51 [INFO] [stdout] | [INFO] [stdout] 135 | let next = self.get_next(n_steps, &z_node); [INFO] [stdout] | ^^^^^^^ help: change this to: `z_node` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/day5/mod.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / fn parse( [INFO] [stdout] 156 | | seeds: &str, [INFO] [stdout] 157 | | seeds_to_soil: &str, [INFO] [stdout] 158 | | soil_to_fert: &str, [INFO] [stdout] ... | [INFO] [stdout] 163 | | hum_to_loc: &str, [INFO] [stdout] 164 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day5/mod.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 189 | let loc = self.hum_to_loc.get_mapping(hum); [INFO] [stdout] | ------------------------------------------- unnecessary `let` binding [INFO] [stdout] 190 | [INFO] [stdout] 191 | loc [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] 189 ~ [INFO] [stdout] 190 | [INFO] [stdout] 191 ~ self.hum_to_loc.get_mapping(hum) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/day5/mod.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 228 | / [ [INFO] [stdout] 229 | | remining_soil_range, [INFO] [stdout] 230 | | remining_fert_range, [INFO] [stdout] 231 | | remining_water_range, [INFO] [stdout] ... | [INFO] [stdout] 239 | | .unwrap() [INFO] [stdout] 240 | | .clone() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try dereferencing it [INFO] [stdout] | [INFO] [stdout] 228 ~ *[ [INFO] [stdout] 229 + remining_soil_range, [INFO] [stdout] 230 + remining_fert_range, [INFO] [stdout] 231 + remining_water_range, [INFO] [stdout] 232 + remining_light_range, [INFO] [stdout] 233 + remining_temp_range, [INFO] [stdout] 234 + remining_hum_range, [INFO] [stdout] 235 + remining_loc_range, [INFO] [stdout] 236 + ] [INFO] [stdout] 237 + .iter() [INFO] [stdout] 238 + .min() [INFO] [stdout] 239 + .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day5/mod.rs:261:21 [INFO] [stdout] | [INFO] [stdout] 261 | cur = cur + jump; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `cur += jump` [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 multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/day6/mod.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | let t1 = (-1. * time + (time * time - 4. * best_dist).sqrt()) / -2.; [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/day6/mod.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | let t2 = (-1. * time - (time * time - 4. * best_dist).sqrt()) / -2.; [INFO] [stdout] | ^^^^^^^^^^ help: consider using: `-time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day7/mod.rs:92:33 [INFO] [stdout] | [INFO] [stdout] 92 | .and_modify(|c| *c = *c + 1) [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `*c += 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7/mod.rs:103:44 [INFO] [stdout] | [INFO] [stdout] 103 | sorted_sets.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^ help: change this to: `a.1` [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: accessing first element with `sorted_sets.get(0)` [INFO] [stdout] --> src/day7/mod.rs:105:16 [INFO] [stdout] | [INFO] [stdout] 105 | match (sorted_sets.get(0), sorted_sets.get(1), sorted_sets.get(2)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sorted_sets.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: manual implementation of an assign operation [INFO] [stdout] --> src/day7/mod.rs:143:33 [INFO] [stdout] | [INFO] [stdout] 143 | .and_modify(|c| *c = *c + 1) [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `*c += 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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/day7/mod.rs:151:30 [INFO] [stdout] | [INFO] [stdout] 151 | let jokers = jokers.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*jokers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day7/mod.rs:156:17 [INFO] [stdout] | [INFO] [stdout] 156 | *max_set.1 = *max_set.1 + jokers; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*max_set.1 += jokers` [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/day7/mod.rs:167:44 [INFO] [stdout] | [INFO] [stdout] 167 | sorted_sets.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^ help: change this to: `a.1` [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: accessing first element with `sorted_sets.get(0)` [INFO] [stdout] --> src/day7/mod.rs:171:16 [INFO] [stdout] | [INFO] [stdout] 171 | match (sorted_sets.get(0), sorted_sets.get(1), sorted_sets.get(2)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `sorted_sets.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&str` [INFO] [stdout] --> src/day8/mod.rs:81:38 [INFO] [stdout] | [INFO] [stdout] 81 | let mut cur = self.graph.get("AAA".into()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider removing `.into()`: `"AAA"` [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: this creates an owned instance just for comparison [INFO] [stdout] --> src/day8/mod.rs:84:27 [INFO] [stdout] | [INFO] [stdout] 84 | while cur.text != "ZZZ".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"ZZZ"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` 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/day8/mod.rs:113:56 [INFO] [stdout] | [INFO] [stdout] 113 | cur = self.get_next(instruction_i + delta, &cur); [INFO] [stdout] | ^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day8/mod.rs:135:51 [INFO] [stdout] | [INFO] [stdout] 135 | let next = self.get_next(n_steps, &z_node); [INFO] [stdout] | ^^^^^^^ help: change this to: `z_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.76s [INFO] running `Command { std: "docker" "inspect" "2560d504070b07d0360b16b5d54d3f1371085a10ad5228b6bdcc708e126b2e78", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2560d504070b07d0360b16b5d54d3f1371085a10ad5228b6bdcc708e126b2e78", kill_on_drop: false }` [INFO] [stdout] 2560d504070b07d0360b16b5d54d3f1371085a10ad5228b6bdcc708e126b2e78