[INFO] cloning repository https://github.com/szopqa/AOC_2020 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/szopqa/AOC_2020" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fszopqa%2FAOC_2020", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fszopqa%2FAOC_2020'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fc6c7aaca94b0e9bec24106edc61a148b536084a [INFO] linting szopqa/AOC_2020 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fszopqa%2FAOC_2020" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/szopqa/AOC_2020 [INFO] finished tweaking git repo https://github.com/szopqa/AOC_2020 [INFO] tweaked toml for git repo https://github.com/szopqa/AOC_2020 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/szopqa/AOC_2020 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/szopqa/AOC_2020 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c972fea763adcf82e7d2bec4459bc9f7dea43c139b2891dee02206bdd0d478b8 [INFO] running `Command { std: "docker" "start" "-a" "c972fea763adcf82e7d2bec4459bc9f7dea43c139b2891dee02206bdd0d478b8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c972fea763adcf82e7d2bec4459bc9f7dea43c139b2891dee02206bdd0d478b8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c972fea763adcf82e7d2bec4459bc9f7dea43c139b2891dee02206bdd0d478b8", kill_on_drop: false }` [INFO] [stdout] c972fea763adcf82e7d2bec4459bc9f7dea43c139b2891dee02206bdd0d478b8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 32da3d692400709987eba6e57f57a3c024731e0aa99f7b2abdc5e0c19f6cf444 [INFO] running `Command { std: "docker" "start" "-a" "32da3d692400709987eba6e57f57a3c024731e0aa99f7b2abdc5e0c19f6cf444", kill_on_drop: false }` [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Checking regex-syntax v0.6.21 [INFO] [stderr] Checking aho-corasick v0.7.15 [INFO] [stderr] Checking regex v1.4.2 [INFO] [stderr] Checking AOC_2020 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/puzzles/day_05/mod.rs:79:15 [INFO] [stdout] | [INFO] [stdout] 79 | while _pos <= _desc.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `_pos < _desc.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/puzzles/day_05/mod.rs:79:15 [INFO] [stdout] | [INFO] [stdout] 79 | while _pos <= _desc.len() - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `_pos < _desc.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/puzzles/day_14/mod.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | fn solve_part_two(input: &Vec) -> Self::OutputPartTwo { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/puzzles/solution.rs:56:14 [INFO] [stdout] | [INFO] [stdout] 56 | .expect(&format!("Could not open file at path {:?}!", filename)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not open file at path {:?}!", filename))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/puzzles/solution.rs:61:18 [INFO] [stdout] | [INFO] [stdout] 61 | .filter_map(|l| l.ok()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/puzzles/solution.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | f.lines() [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/puzzles/solution.rs:67:31 [INFO] [stdout] | [INFO] [stdout] 67 | fn solve_part_one(_input: &Vec) -> Self::OutputPartOne; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Self::PuzzleInput]` [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/puzzles/solution.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | fn solve_part_two(_input: &Vec) -> Self::OutputPartTwo; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Self::PuzzleInput]` [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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/puzzles/day_01/mod.rs:28:40 [INFO] [stdout] | [INFO] [stdout] 28 | for (_i, _each_elem) in _input.into_iter().enumerate() { [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: accessing first element with `self._items.get(0)` [INFO] [stdout] --> src/puzzles/day_03/mod.rs:17:33 [INFO] [stdout] | [INFO] [stdout] 17 | let mut _x_pos: usize = self._items.get(0).unwrap().find('.').unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self._items.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: accessing first element with `self._items.get(0)` [INFO] [stdout] --> src/puzzles/day_03/mod.rs:20:28 [INFO] [stdout] | [INFO] [stdout] 20 | let _layer_width = self._items.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self._items.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: manual implementation of an assign operation [INFO] [stdout] --> src/puzzles/day_03/mod.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | _x_pos = _x_pos - _layer_width; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `_x_pos -= _layer_width` [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 boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl || !_has_valid_hgt || !_has_valid_iyr || !_has_valid_pid) [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl || !_has_valid_hgt || !_has_valid_iyr) && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl || !_has_valid_hgt) && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl) && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:87:30 [INFO] [stdout] | [INFO] [stdout] 87 | let _has_valid_byr = _byr_value >= 1920 && _byr_value <= 2002; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&_byr_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | let _has_valid_iyr = _iyr_value >= 2010 && _iyr_value <= 2020; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&_iyr_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:89:30 [INFO] [stdout] | [INFO] [stdout] 89 | let _has_valid_eyr = _eyr_value >= 2020 && _eyr_value <= 2030; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&_eyr_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:94:17 [INFO] [stdout] | [INFO] [stdout] 94 | _val >= 150 && _val <= 193 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&_val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:98:17 [INFO] [stdout] | [INFO] [stdout] 98 | _val >= 59 && _val <= 76 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&_val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/puzzles/day_04/mod.rs:105:39 [INFO] [stdout] | [INFO] [stdout] 105 | let _length_matches = &_hcl_value[1..].len() == &(6 as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 105 - let _length_matches = &_hcl_value[1..].len() == &(6 as usize); [INFO] [stdout] 105 + let _length_matches = _hcl_value[1..].len() == (6 as usize); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/puzzles/day_04/mod.rs:105:66 [INFO] [stdout] | [INFO] [stdout] 105 | let _length_matches = &_hcl_value[1..].len() == &(6 as usize); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `6_usize` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/puzzles/day_04/mod.rs:117:50 [INFO] [stdout] | [INFO] [stdout] 117 | let _has_valid_pid = _pid_value.len() == 9 as usize && VALID_PID_REG.captures(&_pid_value).is_none(); [INFO] [stdout] | ^^^^^^^^^^ help: try: `9_usize` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/puzzles/day_04/mod.rs:117:87 [INFO] [stdout] | [INFO] [stdout] 117 | let _has_valid_pid = _pid_value.len() == 9 as usize && VALID_PID_REG.captures(&_pid_value).is_none(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `_pid_value` [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: comparison to empty slice [INFO] [stdout] --> src/puzzles/day_04/mod.rs:134:16 [INFO] [stdout] | [INFO] [stdout] 134 | if _line != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/puzzles/day_04/mod.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | _line_normalized.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `_line_normalized.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/puzzles/day_05/mod.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / impl Default for Seat { [INFO] [stdout] 10 | | fn default() -> Self { [INFO] [stdout] 11 | | Self {_pos_in_row: 0, _id: 0} [INFO] [stdout] 12 | | } [INFO] [stdout] 13 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 4 + #[derive(Default)] [INFO] [stdout] 5 | struct Seat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/puzzles/day_05/mod.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | / impl Default for Row { [INFO] [stdout] 35 | | fn default() -> Self { [INFO] [stdout] 36 | | Self {_num: 0, _seats: [Seat::default(); 8]} [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 29 + #[derive(Default)] [INFO] [stdout] 30 | struct Row { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `_i` is used to index `_seats` [INFO] [stdout] --> src/puzzles/day_05/mod.rs:43:19 [INFO] [stdout] | [INFO] [stdout] 43 | for _i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 43 - for _i in 0..8 { [INFO] [stdout] 43 + for (_i, ) in _seats.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `_i` is used to index `_seats_rows` [INFO] [stdout] --> src/puzzles/day_05/mod.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | for _i in 0..128 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 65 - for _i in 0..128 { [INFO] [stdout] 65 + for (_i, ) in _seats_rows.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/puzzles/day_05/mod.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | _ans as u8 [INFO] [stdout] | ^^^^^^^^^^ help: try: `_ans` [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: comparison to empty slice [INFO] [stdout] --> src/puzzles/day_06/mod.rs:82:16 [INFO] [stdout] | [INFO] [stdout] 82 | if _line != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/puzzles/day_06/mod.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | _line_normalized.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `_line_normalized.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/puzzles/day_07/mod.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | fn parse_bag<'a>(_input: &'a str) -> (Bag, HashMap) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 15 - fn parse_bag<'a>(_input: &'a str) -> (Bag, HashMap) { [INFO] [stdout] 15 + fn parse_bag(_input: &str) -> (Bag, HashMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/puzzles/day_07/mod.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | _i = _i + "bags contain ".len(); // shifting to rest of input [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `_i += "bags contain ".len()` [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: name `NOP` contains a capitalized acronym [INFO] [stdout] --> src/puzzles/day_08/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | NOP(i32), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Nop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ACC` contains a capitalized acronym [INFO] [stdout] --> src/puzzles/day_08/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | ACC(i32), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Acc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `JMP` contains a capitalized acronym [INFO] [stdout] --> src/puzzles/day_08/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | JMP(i32) [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Jmp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/puzzles/day_08/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | / match *self { [INFO] [stdout] 13 | | Instruction::JMP(_) | Instruction::NOP(_) => true, [INFO] [stdout] 14 | | _ => false [INFO] [stdout] 15 | | } [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] 12 - match *self { [INFO] [stdout] 13 - Instruction::JMP(_) | Instruction::NOP(_) => true, [INFO] [stdout] 14 - _ => false [INFO] [stdout] 15 - } [INFO] [stdout] 12 + matches!(*self, Instruction::JMP(_) | Instruction::NOP(_)) [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/puzzles/day_08/mod.rs:26:30 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn new(instructions: &Vec) -> Self { [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] 26 - pub fn new(instructions: &Vec) -> Self { [INFO] [stdout] 26 + pub fn new(instructions: &[String]) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `instr_data.get(0)` [INFO] [stdout] --> src/puzzles/day_08/mod.rs:36:32 [INFO] [stdout] | [INFO] [stdout] 36 | let instr_name: &str = instr_data.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `instr_data.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: this loop could be written as a `while let` loop [INFO] [stdout] --> src/puzzles/day_08/mod.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / loop { [INFO] [stdout] 88 | | let instruction = match self.instructions.get(position) { [INFO] [stdout] 89 | | Some(instruction) => instruction, [INFO] [stdout] 90 | | None => { break; } [INFO] [stdout] ... | [INFO] [stdout] 112 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(instruction) = self.instructions.get(position) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` 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/puzzles/day_09/mod.rs:35:48 [INFO] [stdout] | [INFO] [stdout] 35 | if !Self::get_next_possible_values(&preamble).contains(&elem) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `preamble` [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/puzzles/day_09/mod.rs:35:68 [INFO] [stdout] | [INFO] [stdout] 35 | if !Self::get_next_possible_values(&preamble).contains(&elem) { [INFO] [stdout] | ^^^^^ help: change this to: `elem` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / match self.seats.get(x) { [INFO] [stdout] 27 | | Some(row) => { [INFO] [stdout] 28 | | let y_range = if *y_pos > 0 { y_pos - 1..y_pos + 2 } else { 0..2 }; [INFO] [stdout] ... | [INFO] [stdout] 41 | | _ => {} [INFO] [stdout] 42 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 26 ~ if let Some(row) = self.seats.get(x) { [INFO] [stdout] 27 + let y_range = if *y_pos > 0 { y_pos - 1..y_pos + 2 } else { 0..2 }; [INFO] [stdout] 28 + [INFO] [stdout] 29 + for y in y_range { [INFO] [stdout] 30 + match row.get(y) { [INFO] [stdout] 31 + Some(seat) => { [INFO] [stdout] 32 + if *y_pos != y || *x_pos != x { [INFO] [stdout] 33 + neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 34 + } [INFO] [stdout] 35 + }, [INFO] [stdout] 36 + _ => {} [INFO] [stdout] 37 + } [INFO] [stdout] 38 + } [INFO] [stdout] 39 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | / ... if *y_pos != y || *x_pos != x { [INFO] [stdout] 34 | | ... neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 35 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 32 ~ Some(seat) [INFO] [stdout] 33 ~ if (*y_pos != y || *x_pos != x) => { [INFO] [stdout] 34 | neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 35 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:31:25 [INFO] [stdout] | [INFO] [stdout] 31 | / match row.get(y) { [INFO] [stdout] 32 | | Some(seat) => { [INFO] [stdout] 33 | | if *y_pos != y || *x_pos != x { [INFO] [stdout] 34 | | neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] ... | [INFO] [stdout] 37 | | _ => {} [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some(seat) = row.get(y) { [INFO] [stdout] 32 + if *y_pos != y || *x_pos != x { [INFO] [stdout] 33 + neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.seats.get(0)` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:60:54 [INFO] [stdout] | [INFO] [stdout] 60 | if x > self.seats.len()-1 || y > self.seats.get(0).unwrap().len()-1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `self.seats.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/puzzles/day_11/mod.rs:81:36 [INFO] [stdout] | [INFO] [stdout] 81 | fn can_be_occupied(neighbours: &Vec<(usize, usize, char)>) -> 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] 81 - fn can_be_occupied(neighbours: &Vec<(usize, usize, char)>) -> bool { [INFO] [stdout] 81 + fn can_be_occupied(neighbours: &[(usize, usize, char)]) -> 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/puzzles/day_11/mod.rs:87:35 [INFO] [stdout] | [INFO] [stdout] 87 | fn can_be_emptied(neighbours: &Vec<(usize, usize, char)>, min_num: usize) -> 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] 87 - fn can_be_emptied(neighbours: &Vec<(usize, usize, char)>, min_num: usize) -> bool { [INFO] [stdout] 87 + fn can_be_emptied(neighbours: &[(usize, usize, char)], min_num: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/puzzles/day_11/mod.rs:170:40 [INFO] [stdout] | [INFO] [stdout] 170 | seats[i] = each_row.chars().map(|c| c).collect(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/puzzles/day_11/mod.rs:185:40 [INFO] [stdout] | [INFO] [stdout] 185 | seats[i] = each_row.chars().map(|c| c).collect(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/puzzles/day_12/mod.rs:80:61 [INFO] [stdout] | [INFO] [stdout] 80 | let change_val = if dir == Dir::S || dir == Dir::W {-1 * change_val} else {change_val}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using: `-change_val` [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/puzzles/day_12/mod.rs:89:61 [INFO] [stdout] | [INFO] [stdout] 89 | let change_val = if dir == Dir::S || dir == Dir::W {-1 * change_val} else {change_val}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using: `-change_val` [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/puzzles/day_12/mod.rs:102:17 [INFO] [stdout] | [INFO] [stdout] 102 | pos = directions.len() as i32 + pos; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pos += directions.len() as i32` [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 `.is_multiple_of()` [INFO] [stdout] --> src/puzzles/day_13/mod.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if timestamp % self.id == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `timestamp.is_multiple_of(self.id)` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/puzzles/day_13/mod.rs:28:21 [INFO] [stdout] | [INFO] [stdout] 28 | iteration * self.id as u64 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `self.id` [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: accessing first element with `input.get(0)` [INFO] [stdout] --> src/puzzles/day_13/mod.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | let earliest_timestamp = input.get(0).unwrap().parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.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: `filter` for `Some` followed by `unwrap` [INFO] [stdout] --> src/puzzles/day_13/mod.rs:78:14 [INFO] [stdout] | [INFO] [stdout] 78 | .filter(|b| b.is_some()) [INFO] [stdout] | ______________^ [INFO] [stdout] 79 | | .map(|b| b.unwrap()) [INFO] [stdout] | |________________________________^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_filter_map [INFO] [stdout] = note: `#[warn(clippy::option_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/puzzles/day_13/mod.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if should_skip == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `should_skip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `op.get(0)` [INFO] [stdout] --> src/puzzles/day_14/mod.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | let addr = op.get(0).unwrap().trim(); [INFO] [stdout] | ^^^^^^^^^ help: try: `op.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 use of `vec!` [INFO] [stdout] --> src/puzzles/day_03/mod.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | / vec![ [INFO] [stdout] 64 | | (1,1), [INFO] [stdout] 65 | | (3,1), [INFO] [stdout] 66 | | (5,1), [INFO] [stdout] 67 | | (7,1), [INFO] [stdout] 68 | | (1,2) [INFO] [stdout] 69 | | ] [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 63 ~ [(1,1), [INFO] [stdout] 64 + (3,1), [INFO] [stdout] 65 + (5,1), [INFO] [stdout] 66 + (7,1), [INFO] [stdout] 67 + (1,2)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/puzzles/day_04/mod.rs:115:30 [INFO] [stdout] | [INFO] [stdout] 115 | let _has_valid_ecl = vec!["amb", "blu", "brn", "gry", "grn", "hzl", "oth"].contains(&_ecl_value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]` [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: useless use of `vec!` [INFO] [stdout] --> src/puzzles/day_12/mod.rs:94:26 [INFO] [stdout] | [INFO] [stdout] 94 | let directions = vec![Dir::N, Dir::E, Dir::S, Dir::W]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Dir::N, Dir::E, Dir::S, Dir::W]` [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: panic message is not a string literal [INFO] [stdout] --> src/puzzles/day_08/mod.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | _ => panic!(format!("Unknown command found {}", instr_name)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 49 - _ => panic!(format!("Unknown command found {}", instr_name)) [INFO] [stdout] 49 + _ => panic!("Unknown command found {}", instr_name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/puzzles/day_14/mod.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | fn solve_part_two(input: &Vec) -> Self::OutputPartTwo { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/puzzles/solution.rs:56:14 [INFO] [stdout] | [INFO] [stdout] 56 | .expect(&format!("Could not open file at path {:?}!", filename)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not open file at path {:?}!", filename))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/puzzles/solution.rs:61:18 [INFO] [stdout] | [INFO] [stdout] 61 | .filter_map(|l| l.ok()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/puzzles/solution.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | f.lines() [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/puzzles/solution.rs:67:31 [INFO] [stdout] | [INFO] [stdout] 67 | fn solve_part_one(_input: &Vec) -> Self::OutputPartOne; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Self::PuzzleInput]` [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/puzzles/solution.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | fn solve_part_two(_input: &Vec) -> Self::OutputPartTwo; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Self::PuzzleInput]` [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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/puzzles/day_01/mod.rs:28:40 [INFO] [stdout] | [INFO] [stdout] 28 | for (_i, _each_elem) in _input.into_iter().enumerate() { [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: redundant closure [INFO] [stdout] --> src/puzzles/day_02/mod.rs:93:27 [INFO] [stdout] | [INFO] [stdout] 93 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_02/mod.rs:109:27 [INFO] [stdout] | [INFO] [stdout] 109 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: accessing first element with `self._items.get(0)` [INFO] [stdout] --> src/puzzles/day_03/mod.rs:17:33 [INFO] [stdout] | [INFO] [stdout] 17 | let mut _x_pos: usize = self._items.get(0).unwrap().find('.').unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self._items.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: accessing first element with `self._items.get(0)` [INFO] [stdout] --> src/puzzles/day_03/mod.rs:20:28 [INFO] [stdout] | [INFO] [stdout] 20 | let _layer_width = self._items.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self._items.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: manual implementation of an assign operation [INFO] [stdout] --> src/puzzles/day_03/mod.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | _x_pos = _x_pos - _layer_width; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `_x_pos -= _layer_width` [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: redundant closure [INFO] [stdout] --> src/puzzles/day_03/mod.rs:97:27 [INFO] [stdout] | [INFO] [stdout] 97 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_03/mod.rs:121:27 [INFO] [stdout] | [INFO] [stdout] 121 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl || !_has_valid_hgt || !_has_valid_iyr || !_has_valid_pid) [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl || !_has_valid_hgt || !_has_valid_iyr) && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl || !_has_valid_hgt) && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/puzzles/day_04/mod.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 | | && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [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] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + !(!_has_valid_byr || !_has_valid_ecl || !_has_valid_eyr || !_has_valid_hcl) && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] 119 - _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl [INFO] [stdout] 120 - && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] 119 + _has_valid_byr && _has_valid_ecl && _has_valid_eyr && _has_valid_hcl && _has_valid_hgt && _has_valid_iyr && _has_valid_pid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:87:30 [INFO] [stdout] | [INFO] [stdout] 87 | let _has_valid_byr = _byr_value >= 1920 && _byr_value <= 2002; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&_byr_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | let _has_valid_iyr = _iyr_value >= 2010 && _iyr_value <= 2020; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&_iyr_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:89:30 [INFO] [stdout] | [INFO] [stdout] 89 | let _has_valid_eyr = _eyr_value >= 2020 && _eyr_value <= 2030; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&_eyr_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:94:17 [INFO] [stdout] | [INFO] [stdout] 94 | _val >= 150 && _val <= 193 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&_val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/puzzles/day_04/mod.rs:98:17 [INFO] [stdout] | [INFO] [stdout] 98 | _val >= 59 && _val <= 76 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&_val)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/puzzles/day_04/mod.rs:105:39 [INFO] [stdout] | [INFO] [stdout] 105 | let _length_matches = &_hcl_value[1..].len() == &(6 as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 105 - let _length_matches = &_hcl_value[1..].len() == &(6 as usize); [INFO] [stdout] 105 + let _length_matches = _hcl_value[1..].len() == (6 as usize); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/puzzles/day_04/mod.rs:105:66 [INFO] [stdout] | [INFO] [stdout] 105 | let _length_matches = &_hcl_value[1..].len() == &(6 as usize); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `6_usize` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/puzzles/day_04/mod.rs:117:50 [INFO] [stdout] | [INFO] [stdout] 117 | let _has_valid_pid = _pid_value.len() == 9 as usize && VALID_PID_REG.captures(&_pid_value).is_none(); [INFO] [stdout] | ^^^^^^^^^^ help: try: `9_usize` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/puzzles/day_04/mod.rs:117:87 [INFO] [stdout] | [INFO] [stdout] 117 | let _has_valid_pid = _pid_value.len() == 9 as usize && VALID_PID_REG.captures(&_pid_value).is_none(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `_pid_value` [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: comparison to empty slice [INFO] [stdout] --> src/puzzles/day_04/mod.rs:134:16 [INFO] [stdout] | [INFO] [stdout] 134 | if _line != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/puzzles/day_04/mod.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | _line_normalized.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `_line_normalized.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_04/mod.rs:181:27 [INFO] [stdout] | [INFO] [stdout] 181 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_04/mod.rs:204:27 [INFO] [stdout] | [INFO] [stdout] 204 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: this `impl` can be derived [INFO] [stdout] --> src/puzzles/day_05/mod.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / impl Default for Seat { [INFO] [stdout] 10 | | fn default() -> Self { [INFO] [stdout] 11 | | Self {_pos_in_row: 0, _id: 0} [INFO] [stdout] 12 | | } [INFO] [stdout] 13 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 4 + #[derive(Default)] [INFO] [stdout] 5 | struct Seat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/puzzles/day_05/mod.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | / impl Default for Row { [INFO] [stdout] 35 | | fn default() -> Self { [INFO] [stdout] 36 | | Self {_num: 0, _seats: [Seat::default(); 8]} [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 29 + #[derive(Default)] [INFO] [stdout] 30 | struct Row { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `_i` is used to index `_seats` [INFO] [stdout] --> src/puzzles/day_05/mod.rs:43:19 [INFO] [stdout] | [INFO] [stdout] 43 | for _i in 0..8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 43 - for _i in 0..8 { [INFO] [stdout] 43 + for (_i, ) in _seats.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `_i` is used to index `_seats_rows` [INFO] [stdout] --> src/puzzles/day_05/mod.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | for _i in 0..128 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 65 - for _i in 0..128 { [INFO] [stdout] 65 + for (_i, ) in _seats_rows.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/puzzles/day_05/mod.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | _ans as u8 [INFO] [stdout] | ^^^^^^^^^^ help: try: `_ans` [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: redundant closure [INFO] [stdout] --> src/puzzles/day_05/mod.rs:166:27 [INFO] [stdout] | [INFO] [stdout] 166 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: comparison to empty slice [INFO] [stdout] --> src/puzzles/day_06/mod.rs:82:16 [INFO] [stdout] | [INFO] [stdout] 82 | if _line != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/puzzles/day_06/mod.rs:84:17 [INFO] [stdout] | [INFO] [stdout] 84 | _line_normalized.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `_line_normalized.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_06/mod.rs:136:27 [INFO] [stdout] | [INFO] [stdout] 136 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_06/mod.rs:164:27 [INFO] [stdout] | [INFO] [stdout] 164 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/puzzles/day_07/mod.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | fn parse_bag<'a>(_input: &'a str) -> (Bag, HashMap) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 15 - fn parse_bag<'a>(_input: &'a str) -> (Bag, HashMap) { [INFO] [stdout] 15 + fn parse_bag(_input: &str) -> (Bag, HashMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/puzzles/day_07/mod.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | _i = _i + "bags contain ".len(); // shifting to rest of input [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `_i += "bags contain ".len()` [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: redundant closure [INFO] [stdout] --> src/puzzles/day_07/mod.rs:120:27 [INFO] [stdout] | [INFO] [stdout] 120 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_07/mod.rs:142:27 [INFO] [stdout] | [INFO] [stdout] 142 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_07/mod.rs:152:27 [INFO] [stdout] | [INFO] [stdout] 152 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: name `NOP` contains a capitalized acronym [INFO] [stdout] --> src/puzzles/day_08/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | NOP(i32), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Nop` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ACC` contains a capitalized acronym [INFO] [stdout] --> src/puzzles/day_08/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | ACC(i32), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Acc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `JMP` contains a capitalized acronym [INFO] [stdout] --> src/puzzles/day_08/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | JMP(i32) [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Jmp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/puzzles/day_08/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | / match *self { [INFO] [stdout] 13 | | Instruction::JMP(_) | Instruction::NOP(_) => true, [INFO] [stdout] 14 | | _ => false [INFO] [stdout] 15 | | } [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] 12 - match *self { [INFO] [stdout] 13 - Instruction::JMP(_) | Instruction::NOP(_) => true, [INFO] [stdout] 14 - _ => false [INFO] [stdout] 15 - } [INFO] [stdout] 12 + matches!(*self, Instruction::JMP(_) | Instruction::NOP(_)) [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/puzzles/day_08/mod.rs:26:30 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn new(instructions: &Vec) -> Self { [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] 26 - pub fn new(instructions: &Vec) -> Self { [INFO] [stdout] 26 + pub fn new(instructions: &[String]) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `instr_data.get(0)` [INFO] [stdout] --> src/puzzles/day_08/mod.rs:36:32 [INFO] [stdout] | [INFO] [stdout] 36 | let instr_name: &str = instr_data.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `instr_data.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: this loop could be written as a `while let` loop [INFO] [stdout] --> src/puzzles/day_08/mod.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | / loop { [INFO] [stdout] 88 | | let instruction = match self.instructions.get(position) { [INFO] [stdout] 89 | | Some(instruction) => instruction, [INFO] [stdout] 90 | | None => { break; } [INFO] [stdout] ... | [INFO] [stdout] 112 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(instruction) = self.instructions.get(position) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_08/mod.rs:160:27 [INFO] [stdout] | [INFO] [stdout] 160 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_08/mod.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/puzzles/day_09/mod.rs:35:48 [INFO] [stdout] | [INFO] [stdout] 35 | if !Self::get_next_possible_values(&preamble).contains(&elem) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `preamble` [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/puzzles/day_09/mod.rs:35:68 [INFO] [stdout] | [INFO] [stdout] 35 | if !Self::get_next_possible_values(&preamble).contains(&elem) { [INFO] [stdout] | ^^^^^ help: change this to: `elem` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | / match self.seats.get(x) { [INFO] [stdout] 27 | | Some(row) => { [INFO] [stdout] 28 | | let y_range = if *y_pos > 0 { y_pos - 1..y_pos + 2 } else { 0..2 }; [INFO] [stdout] ... | [INFO] [stdout] 41 | | _ => {} [INFO] [stdout] 42 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 26 ~ if let Some(row) = self.seats.get(x) { [INFO] [stdout] 27 + let y_range = if *y_pos > 0 { y_pos - 1..y_pos + 2 } else { 0..2 }; [INFO] [stdout] 28 + [INFO] [stdout] 29 + for y in y_range { [INFO] [stdout] 30 + match row.get(y) { [INFO] [stdout] 31 + Some(seat) => { [INFO] [stdout] 32 + if *y_pos != y || *x_pos != x { [INFO] [stdout] 33 + neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 34 + } [INFO] [stdout] 35 + }, [INFO] [stdout] 36 + _ => {} [INFO] [stdout] 37 + } [INFO] [stdout] 38 + } [INFO] [stdout] 39 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | / ... if *y_pos != y || *x_pos != x { [INFO] [stdout] 34 | | ... neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 35 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 32 ~ Some(seat) [INFO] [stdout] 33 ~ if (*y_pos != y || *x_pos != x) => { [INFO] [stdout] 34 | neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 35 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:31:25 [INFO] [stdout] | [INFO] [stdout] 31 | / match row.get(y) { [INFO] [stdout] 32 | | Some(seat) => { [INFO] [stdout] 33 | | if *y_pos != y || *x_pos != x { [INFO] [stdout] 34 | | neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] ... | [INFO] [stdout] 37 | | _ => {} [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some(seat) = row.get(y) { [INFO] [stdout] 32 + if *y_pos != y || *x_pos != x { [INFO] [stdout] 33 + neighbours.push((*x_pos, *y_pos, *seat)) [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.seats.get(0)` [INFO] [stdout] --> src/puzzles/day_11/mod.rs:60:54 [INFO] [stdout] | [INFO] [stdout] 60 | if x > self.seats.len()-1 || y > self.seats.get(0).unwrap().len()-1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `self.seats.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/puzzles/day_11/mod.rs:81:36 [INFO] [stdout] | [INFO] [stdout] 81 | fn can_be_occupied(neighbours: &Vec<(usize, usize, char)>) -> 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] 81 - fn can_be_occupied(neighbours: &Vec<(usize, usize, char)>) -> bool { [INFO] [stdout] 81 + fn can_be_occupied(neighbours: &[(usize, usize, char)]) -> 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/puzzles/day_11/mod.rs:87:35 [INFO] [stdout] | [INFO] [stdout] 87 | fn can_be_emptied(neighbours: &Vec<(usize, usize, char)>, min_num: usize) -> 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] 87 - fn can_be_emptied(neighbours: &Vec<(usize, usize, char)>, min_num: usize) -> bool { [INFO] [stdout] 87 + fn can_be_emptied(neighbours: &[(usize, usize, char)], min_num: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/puzzles/day_11/mod.rs:170:40 [INFO] [stdout] | [INFO] [stdout] 170 | seats[i] = each_row.chars().map(|c| c).collect(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/puzzles/day_11/mod.rs:185:40 [INFO] [stdout] | [INFO] [stdout] 185 | seats[i] = each_row.chars().map(|c| c).collect(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_11/mod.rs:216:27 [INFO] [stdout] | [INFO] [stdout] 216 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_11/mod.rs:239:27 [INFO] [stdout] | [INFO] [stdout] 239 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/puzzles/day_12/mod.rs:80:61 [INFO] [stdout] | [INFO] [stdout] 80 | let change_val = if dir == Dir::S || dir == Dir::W {-1 * change_val} else {change_val}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using: `-change_val` [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/puzzles/day_12/mod.rs:89:61 [INFO] [stdout] | [INFO] [stdout] 89 | let change_val = if dir == Dir::S || dir == Dir::W {-1 * change_val} else {change_val}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using: `-change_val` [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/puzzles/day_12/mod.rs:102:17 [INFO] [stdout] | [INFO] [stdout] 102 | pos = directions.len() as i32 + pos; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pos += directions.len() as i32` [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: redundant closure [INFO] [stdout] --> src/puzzles/day_12/mod.rs:233:27 [INFO] [stdout] | [INFO] [stdout] 233 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_12/mod.rs:251:27 [INFO] [stdout] | [INFO] [stdout] 251 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/puzzles/day_13/mod.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if timestamp % self.id == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `timestamp.is_multiple_of(self.id)` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/puzzles/day_13/mod.rs:28:21 [INFO] [stdout] | [INFO] [stdout] 28 | iteration * self.id as u64 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `self.id` [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: accessing first element with `input.get(0)` [INFO] [stdout] --> src/puzzles/day_13/mod.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | let earliest_timestamp = input.get(0).unwrap().parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.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: `filter` for `Some` followed by `unwrap` [INFO] [stdout] --> src/puzzles/day_13/mod.rs:78:14 [INFO] [stdout] | [INFO] [stdout] 78 | .filter(|b| b.is_some()) [INFO] [stdout] | ______________^ [INFO] [stdout] 79 | | .map(|b| b.unwrap()) [INFO] [stdout] | |________________________________^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_filter_map [INFO] [stdout] = note: `#[warn(clippy::option_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/puzzles/day_13/mod.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if should_skip == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `should_skip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:126:27 [INFO] [stdout] | [INFO] [stdout] 126 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:141:27 [INFO] [stdout] | [INFO] [stdout] 141 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:146:27 [INFO] [stdout] | [INFO] [stdout] 146 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:151:27 [INFO] [stdout] | [INFO] [stdout] 151 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:156:27 [INFO] [stdout] | [INFO] [stdout] 156 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:161:27 [INFO] [stdout] | [INFO] [stdout] 161 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/puzzles/day_13/mod.rs:166:27 [INFO] [stdout] | [INFO] [stdout] 166 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: accessing first element with `op.get(0)` [INFO] [stdout] --> src/puzzles/day_14/mod.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | let addr = op.get(0).unwrap().trim(); [INFO] [stdout] | ^^^^^^^^^ help: try: `op.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: redundant closure [INFO] [stdout] --> src/puzzles/day_14/mod.rs:87:27 [INFO] [stdout] | [INFO] [stdout] 87 | ].into_iter().map(|_i| String::from(_i)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/puzzles/day_03/mod.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | / vec![ [INFO] [stdout] 64 | | (1,1), [INFO] [stdout] 65 | | (3,1), [INFO] [stdout] 66 | | (5,1), [INFO] [stdout] 67 | | (7,1), [INFO] [stdout] 68 | | (1,2) [INFO] [stdout] 69 | | ] [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 63 ~ [(1,1), [INFO] [stdout] 64 + (3,1), [INFO] [stdout] 65 + (5,1), [INFO] [stdout] 66 + (7,1), [INFO] [stdout] 67 + (1,2)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/puzzles/day_04/mod.rs:115:30 [INFO] [stdout] | [INFO] [stdout] 115 | let _has_valid_ecl = vec!["amb", "blu", "brn", "gry", "grn", "hzl", "oth"].contains(&_ecl_value); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["amb", "blu", "brn", "gry", "grn", "hzl", "oth"]` [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: useless use of `vec!` [INFO] [stdout] --> src/puzzles/day_12/mod.rs:94:26 [INFO] [stdout] | [INFO] [stdout] 94 | let directions = vec![Dir::N, Dir::E, Dir::S, Dir::W]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Dir::N, Dir::E, Dir::S, Dir::W]` [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: panic message is not a string literal [INFO] [stdout] --> src/puzzles/day_08/mod.rs:49:25 [INFO] [stdout] | [INFO] [stdout] 49 | _ => panic!(format!("Unknown command found {}", instr_name)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `panic!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 49 - _ => panic!(format!("Unknown command found {}", instr_name)) [INFO] [stdout] 49 + _ => panic!("Unknown command found {}", instr_name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.76s [INFO] running `Command { std: "docker" "inspect" "32da3d692400709987eba6e57f57a3c024731e0aa99f7b2abdc5e0c19f6cf444", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "32da3d692400709987eba6e57f57a3c024731e0aa99f7b2abdc5e0c19f6cf444", kill_on_drop: false }` [INFO] [stdout] 32da3d692400709987eba6e57f57a3c024731e0aa99f7b2abdc5e0c19f6cf444