[INFO] cloning repository https://github.com/cptkidd62/aoc2024
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cptkidd62/aoc2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcptkidd62%2Faoc2024", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcptkidd62%2Faoc2024'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] e8ffa40d188fa4e543830e2aee22b1d7cbcf26e1
[INFO] linting cptkidd62/aoc2024 against nightly for clippy-nonminimal_bool-denied
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcptkidd62%2Faoc2024" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/cptkidd62/aoc2024
[INFO] finished tweaking git repo https://github.com/cptkidd62/aoc2024
[INFO] tweaked toml for git repo https://github.com/cptkidd62/aoc2024 written to /workspace/builds/worker-6-tc1/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/cptkidd62/aoc2024 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/cptkidd62/aoc2024 already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 135d09a1959f973341ad372ea54f2e156ba8ea6ef18b1ad03202ff5587eeecde
[INFO] running `Command { std: "docker" "start" "-a" "135d09a1959f973341ad372ea54f2e156ba8ea6ef18b1ad03202ff5587eeecde", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "135d09a1959f973341ad372ea54f2e156ba8ea6ef18b1ad03202ff5587eeecde", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "135d09a1959f973341ad372ea54f2e156ba8ea6ef18b1ad03202ff5587eeecde", kill_on_drop: false }`
[INFO] [stdout] 135d09a1959f973341ad372ea54f2e156ba8ea6ef18b1ad03202ff5587eeecde
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 525787d0f3b1242881d772d656eb1017803af81a4698ccba51896673b5af2e93
[INFO] running `Command { std: "docker" "start" "-a" "525787d0f3b1242881d772d656eb1017803af81a4698ccba51896673b5af2e93", kill_on_drop: false }`
[INFO] [stderr] Checking memchr v2.7.4
[INFO] [stderr] Checking regex-syntax v0.8.5
[INFO] [stderr] Checking aho-corasick v1.1.3
[INFO] [stderr] Checking nom v7.1.3
[INFO] [stderr] Checking regex-automata v0.4.9
[INFO] [stderr] Checking regex v1.11.1
[INFO] [stderr] Checking aoc2024 v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d13.rs:56:18
[INFO] [stdout] |
[INFO] [stdout] 56 | fn min_token(self: &Self) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 56 - fn min_token(self: &Self) -> i128 {
[INFO] [stdout] 56 + fn min_token(&self) -> i128 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d13.rs:62:21
[INFO] [stdout] |
[INFO] [stdout] 62 | fn min_token_nl(self: &Self) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 62 - fn min_token_nl(self: &Self) -> i128 {
[INFO] [stdout] 62 + fn min_token_nl(&self) -> i128 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:16:20
[INFO] [stdout] |
[INFO] [stdout] 16 | fn move_inside(self: &mut Self, width: i32, height: i32) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 16 - fn move_inside(self: &mut Self, width: i32, height: i32) {
[INFO] [stdout] 16 + fn move_inside(&mut self, width: i32, height: i32) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:29:19
[INFO] [stdout] |
[INFO] [stdout] 29 | fn simulate_n(self: &mut Self, n: usize) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 29 - fn simulate_n(self: &mut Self, n: usize) {
[INFO] [stdout] 29 + fn simulate_n(&mut self, n: usize) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:37:34
[INFO] [stdout] |
[INFO] [stdout] 37 | fn calculate_security_factor(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 37 - fn calculate_security_factor(self: &Self) -> usize {
[INFO] [stdout] 37 + fn calculate_security_factor(&self) -> usize {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:55:20
[INFO] [stdout] |
[INFO] [stdout] 55 | fn to_file_pic(self: &Self, fname: &str) {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 55 - fn to_file_pic(self: &Self, fname: &str) {
[INFO] [stdout] 55 + fn to_file_pic(&self, fname: &str) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:33:9
[INFO] [stdout] |
[INFO] [stdout] 33 | self: &mut Self,
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 33 - self: &mut Self,
[INFO] [stdout] 33 + &mut self,
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:58:19
[INFO] [stdout] |
[INFO] [stdout] 58 | fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 58 - fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] 58 + fn move_robot(&mut self, dir: Dir) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:86:23
[INFO] [stdout] |
[INFO] [stdout] 86 | fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 86 - fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] 86 + fn coordinate_sum(&self) -> usize {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:158:23
[INFO] [stdout] |
[INFO] [stdout] 158 | fn is_box_movable(self: &Self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 158 - fn is_box_movable(self: &Self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] 158 + fn is_box_movable(&self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:193:17
[INFO] [stdout] |
[INFO] [stdout] 193 | fn move_box(self: &mut Self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 193 - fn move_box(self: &mut Self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] 193 + fn move_box(&mut self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:272:19
[INFO] [stdout] |
[INFO] [stdout] 272 | fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 272 - fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] 272 + fn move_robot(&mut self, dir: Dir) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:304:23
[INFO] [stdout] |
[INFO] [stdout] 304 | fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 304 - fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] 304 + fn coordinate_sum(&self) -> usize {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d16.rs:186:27
[INFO] [stdout] |
[INFO] [stdout] 186 | fn generate_all_costs(self: &Self) -> HashMap<(usize, usize), HashMap
> {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 186 - fn generate_all_costs(self: &Self) -> HashMap<(usize, usize), HashMap> {
[INFO] [stdout] 186 + fn generate_all_costs(&self) -> HashMap<(usize, usize), HashMap> {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d16.rs:248:24
[INFO] [stdout] |
[INFO] [stdout] 248 | fn min_cost_to_end(self: &Self) -> u128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 248 - fn min_cost_to_end(self: &Self) -> u128 {
[INFO] [stdout] 248 + fn min_cost_to_end(&self) -> u128 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:23:16
[INFO] [stdout] |
[INFO] [stdout] 23 | fn is_done(self: &Self) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 23 - fn is_done(self: &Self) -> bool {
[INFO] [stdout] 23 + fn is_done(&self) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:27:19
[INFO] [stdout] |
[INFO] [stdout] 27 | fn combo_of_x(self: &Self, x: u32) -> u32 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 27 - fn combo_of_x(self: &Self, x: u32) -> u32 {
[INFO] [stdout] 27 + fn combo_of_x(&self, x: u32) -> u32 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:37:23
[INFO] [stdout] |
[INFO] [stdout] 37 | fn do_instruction(self: &mut Self) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 37 - fn do_instruction(self: &mut Self) {
[INFO] [stdout] 37 + fn do_instruction(&mut self) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:80:26
[INFO] [stdout] |
[INFO] [stdout] 80 | fn is_output_fitting(self: &Self) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 80 - fn is_output_fitting(self: &Self) -> bool {
[INFO] [stdout] 80 + fn is_output_fitting(&self) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:89:19
[INFO] [stdout] |
[INFO] [stdout] 89 | fn out_string(self: &Self) -> String {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 89 - fn out_string(self: &Self) -> String {
[INFO] [stdout] 89 + fn out_string(&self) -> String {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unused import: `iter`
[INFO] [stdout] --> src/d23.rs:3:5
[INFO] [stdout] |
[INFO] [stdout] 3 | iter,
[INFO] [stdout] | ^^^^
[INFO] [stdout] |
[INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d13.rs:56:18
[INFO] [stdout] |
[INFO] [stdout] 56 | fn min_token(self: &Self) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 56 - fn min_token(self: &Self) -> i128 {
[INFO] [stdout] 56 + fn min_token(&self) -> i128 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d13.rs:62:21
[INFO] [stdout] |
[INFO] [stdout] 62 | fn min_token_nl(self: &Self) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 62 - fn min_token_nl(self: &Self) -> i128 {
[INFO] [stdout] 62 + fn min_token_nl(&self) -> i128 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:16:20
[INFO] [stdout] |
[INFO] [stdout] 16 | fn move_inside(self: &mut Self, width: i32, height: i32) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 16 - fn move_inside(self: &mut Self, width: i32, height: i32) {
[INFO] [stdout] 16 + fn move_inside(&mut self, width: i32, height: i32) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:29:19
[INFO] [stdout] |
[INFO] [stdout] 29 | fn simulate_n(self: &mut Self, n: usize) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 29 - fn simulate_n(self: &mut Self, n: usize) {
[INFO] [stdout] 29 + fn simulate_n(&mut self, n: usize) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:37:34
[INFO] [stdout] |
[INFO] [stdout] 37 | fn calculate_security_factor(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 37 - fn calculate_security_factor(self: &Self) -> usize {
[INFO] [stdout] 37 + fn calculate_security_factor(&self) -> usize {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d14.rs:55:20
[INFO] [stdout] |
[INFO] [stdout] 55 | fn to_file_pic(self: &Self, fname: &str) {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 55 - fn to_file_pic(self: &Self, fname: &str) {
[INFO] [stdout] 55 + fn to_file_pic(&self, fname: &str) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:33:9
[INFO] [stdout] |
[INFO] [stdout] 33 | self: &mut Self,
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 33 - self: &mut Self,
[INFO] [stdout] 33 + &mut self,
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:58:19
[INFO] [stdout] |
[INFO] [stdout] 58 | fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 58 - fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] 58 + fn move_robot(&mut self, dir: Dir) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:86:23
[INFO] [stdout] |
[INFO] [stdout] 86 | fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 86 - fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] 86 + fn coordinate_sum(&self) -> usize {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:158:23
[INFO] [stdout] |
[INFO] [stdout] 158 | fn is_box_movable(self: &Self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 158 - fn is_box_movable(self: &Self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] 158 + fn is_box_movable(&self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:193:17
[INFO] [stdout] |
[INFO] [stdout] 193 | fn move_box(self: &mut Self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 193 - fn move_box(self: &mut Self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] 193 + fn move_box(&mut self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:272:19
[INFO] [stdout] |
[INFO] [stdout] 272 | fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 272 - fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] 272 + fn move_robot(&mut self, dir: Dir) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d15.rs:304:23
[INFO] [stdout] |
[INFO] [stdout] 304 | fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 304 - fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] 304 + fn coordinate_sum(&self) -> usize {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d16.rs:186:27
[INFO] [stdout] |
[INFO] [stdout] 186 | fn generate_all_costs(self: &Self) -> HashMap<(usize, usize), HashMap> {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 186 - fn generate_all_costs(self: &Self) -> HashMap<(usize, usize), HashMap> {
[INFO] [stdout] 186 + fn generate_all_costs(&self) -> HashMap<(usize, usize), HashMap> {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d16.rs:248:24
[INFO] [stdout] |
[INFO] [stdout] 248 | fn min_cost_to_end(self: &Self) -> u128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 248 - fn min_cost_to_end(self: &Self) -> u128 {
[INFO] [stdout] 248 + fn min_cost_to_end(&self) -> u128 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:23:16
[INFO] [stdout] |
[INFO] [stdout] 23 | fn is_done(self: &Self) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 23 - fn is_done(self: &Self) -> bool {
[INFO] [stdout] 23 + fn is_done(&self) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:27:19
[INFO] [stdout] |
[INFO] [stdout] 27 | fn combo_of_x(self: &Self, x: u32) -> u32 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 27 - fn combo_of_x(self: &Self, x: u32) -> u32 {
[INFO] [stdout] 27 + fn combo_of_x(&self, x: u32) -> u32 {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:37:23
[INFO] [stdout] |
[INFO] [stdout] 37 | fn do_instruction(self: &mut Self) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 37 - fn do_instruction(self: &mut Self) {
[INFO] [stdout] 37 + fn do_instruction(&mut self) {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:80:26
[INFO] [stdout] |
[INFO] [stdout] 80 | fn is_output_fitting(self: &Self) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 80 - fn is_output_fitting(self: &Self) -> bool {
[INFO] [stdout] 80 + fn is_output_fitting(&self) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary
[INFO] [stdout] --> src/d17.rs:89:19
[INFO] [stdout] |
[INFO] [stdout] 89 | fn out_string(self: &Self) -> String {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type
[INFO] [stdout] help: remove the type
[INFO] [stdout] |
[INFO] [stdout] 89 - fn out_string(self: &Self) -> String {
[INFO] [stdout] 89 + fn out_string(&self) -> String {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unused import: `super::*`
[INFO] [stdout] --> src/d21.rs:17:9
[INFO] [stdout] |
[INFO] [stdout] 17 | use super::*;
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unused import: `iter`
[INFO] [stdout] --> src/d23.rs:3:5
[INFO] [stdout] |
[INFO] [stdout] 3 | iter,
[INFO] [stdout] | ^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unused variable: `goal`
[INFO] [stdout] --> src/d21.rs:11:25
[INFO] [stdout] |
[INFO] [stdout] 11 | fn find_optimal_numeric(goal: String) -> String {
[INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_goal`
[INFO] [stdout] |
[INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d01.rs:3:4
[INFO] [stdout] |
[INFO] [stdout] 3 | fn load_data(v1: &mut Vec, v2: &mut Vec) {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `difference` is never used
[INFO] [stdout] --> src/d01.rs:17:4
[INFO] [stdout] |
[INFO] [stdout] 17 | fn difference() -> i32 {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `similarity` is never used
[INFO] [stdout] --> src/d01.rs:29:4
[INFO] [stdout] |
[INFO] [stdout] 29 | fn similarity() -> i32 {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d02.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn load_data() -> Vec> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `is_safe` is never used
[INFO] [stdout] --> src/d02.rs:18:4
[INFO] [stdout] |
[INFO] [stdout] 18 | fn is_safe(v: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `count_safe` is never used
[INFO] [stdout] --> src/d02.rs:31:4
[INFO] [stdout] |
[INFO] [stdout] 31 | fn count_safe() -> usize {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `count_safe_skip` is never used
[INFO] [stdout] --> src/d02.rs:37:4
[INFO] [stdout] |
[INFO] [stdout] 37 | fn count_safe_skip() -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d03.rs:3:4
[INFO] [stdout] |
[INFO] [stdout] 3 | fn load_data() -> String {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `filter_multiply` is never used
[INFO] [stdout] --> src/d03.rs:10:4
[INFO] [stdout] |
[INFO] [stdout] 10 | fn filter_multiply() -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `filter_multiply_switch` is never used
[INFO] [stdout] --> src/d03.rs:26:4
[INFO] [stdout] |
[INFO] [stdout] 26 | fn filter_multiply_switch() -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d04.rs:5:4
[INFO] [stdout] |
[INFO] [stdout] 5 | fn load_data() -> String {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `rcd_from_string` is never used
[INFO] [stdout] --> src/d04.rs:12:4
[INFO] [stdout] |
[INFO] [stdout] 12 | fn rcd_from_string(s: &String) -> Vec {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `d_from_string` is never used
[INFO] [stdout] --> src/d04.rs:37:4
[INFO] [stdout] |
[INFO] [stdout] 37 | fn d_from_string(s: &String) -> (Vec, Vec, usize) {
[INFO] [stdout] | ^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `xmas` is never used
[INFO] [stdout] --> src/d04.rs:55:4
[INFO] [stdout] |
[INFO] [stdout] 55 | fn xmas() -> usize {
[INFO] [stdout] | ^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `x_mas` is never used
[INFO] [stdout] --> src/d04.rs:64:4
[INFO] [stdout] |
[INFO] [stdout] 64 | fn x_mas() -> usize {
[INFO] [stdout] | ^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d05.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn load_data() -> (Vec<(u32, u32)>, Vec>) {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `middle_pages` is never used
[INFO] [stdout] --> src/d05.rs:27:4
[INFO] [stdout] |
[INFO] [stdout] 27 | fn middle_pages() -> u32 {
[INFO] [stdout] | ^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `fixed_middle_pages` is never used
[INFO] [stdout] --> src/d05.rs:45:4
[INFO] [stdout] |
[INFO] [stdout] 45 | fn fixed_middle_pages() -> u32 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `MappedArea` is never constructed
[INFO] [stdout] --> src/d06.rs:3:8
[INFO] [stdout] |
[INFO] [stdout] 3 | struct MappedArea {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `guard_position_ok` is never used
[INFO] [stdout] --> src/d06.rs:11:4
[INFO] [stdout] |
[INFO] [stdout] 11 | fn guard_position_ok((x, y): (isize, isize), w: isize, h: isize) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `get_move_trail`, `detect_loop_for_area`, and `count_possible_loops` are never used
[INFO] [stdout] --> src/d06.rs:16:8
[INFO] [stdout] |
[INFO] [stdout] 15 | impl MappedArea {
[INFO] [stdout] | --------------- methods in this implementation
[INFO] [stdout] 16 | fn get_move_trail(&self) -> Vec<(isize, isize)> {
[INFO] [stdout] | ^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 48 | fn detect_loop_for_area(&self, a: isize, b: isize) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 81 | fn count_possible_loops(&self) -> i32 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `Direction` is never used
[INFO] [stdout] --> src/d06.rs:99:6
[INFO] [stdout] |
[INFO] [stdout] 99 | enum Direction {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d06.rs:106:4
[INFO] [stdout] |
[INFO] [stdout] 106 | fn load_data() -> MappedArea {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d07.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn load_data() -> Vec<(i128, Vec)> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `check_line` is never used
[INFO] [stdout] --> src/d07.rs:19:4
[INFO] [stdout] |
[INFO] [stdout] 19 | fn check_line(acc: i128, (goal, v): (i128, &[i128])) -> bool {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `concat_ints` is never used
[INFO] [stdout] --> src/d07.rs:27:4
[INFO] [stdout] |
[INFO] [stdout] 27 | fn concat_ints(left: i128, right: i128) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `check_line_w_concat` is never used
[INFO] [stdout] --> src/d07.rs:32:4
[INFO] [stdout] |
[INFO] [stdout] 32 | fn check_line_w_concat(acc: i128, (goal, v): (i128, &[i128])) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `calibration_sum` is never used
[INFO] [stdout] --> src/d07.rs:42:4
[INFO] [stdout] |
[INFO] [stdout] 42 | fn calibration_sum(fun: &dyn Fn(i128, (i128, &[i128])) -> bool) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `AntennasMap` is never constructed
[INFO] [stdout] --> src/d08.rs:3:8
[INFO] [stdout] |
[INFO] [stdout] 3 | struct AntennasMap {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `count_antinodes` and `count_multiple_antinodes` are never used
[INFO] [stdout] --> src/d08.rs:10:8
[INFO] [stdout] |
[INFO] [stdout] 9 | impl AntennasMap {
[INFO] [stdout] | ---------------- methods in this implementation
[INFO] [stdout] 10 | fn count_antinodes(&self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 32 | fn count_multiple_antinodes(&self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d08.rs:62:4
[INFO] [stdout] |
[INFO] [stdout] 62 | fn load_data() -> AntennasMap {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d09.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn load_data() -> (Vec, Vec) {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `checksum` is never used
[INFO] [stdout] --> src/d09.rs:19:4
[INFO] [stdout] |
[INFO] [stdout] 19 | fn checksum() -> usize {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `findfree` is never used
[INFO] [stdout] --> src/d09.rs:42:4
[INFO] [stdout] |
[INFO] [stdout] 42 | fn findfree(ranges: &Vec, n: usize) -> Option<(usize, usize)> {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `checksum2` is never used
[INFO] [stdout] --> src/d09.rs:51:4
[INFO] [stdout] |
[INFO] [stdout] 51 | fn checksum2() -> usize {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Trails` is never constructed
[INFO] [stdout] --> src/d10.rs:3:8
[INFO] [stdout] |
[INFO] [stdout] 3 | struct Trails {
[INFO] [stdout] | ^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `get_to_nine`, `count_score`, `get_to_nine_new`, and `count_score_new` are never used
[INFO] [stdout] --> src/d10.rs:12:8
[INFO] [stdout] |
[INFO] [stdout] 11 | impl Trails {
[INFO] [stdout] | ----------- methods in this implementation
[INFO] [stdout] 12 | fn get_to_nine(self: &Trails, x: usize, y: usize) -> HashSet<(usize, usize)> {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 28 | fn count_score(self: &Trails) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 34 | fn get_to_nine_new(self: &Trails, x: usize, y: usize) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 46 | fn count_score_new(self: &Trails) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d10.rs:53:4
[INFO] [stdout] |
[INFO] [stdout] 53 | fn load_data() -> Trails {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d11.rs:3:4
[INFO] [stdout] |
[INFO] [stdout] 3 | fn load_data() -> Vec {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `count_digits` is never used
[INFO] [stdout] --> src/d11.rs:13:4
[INFO] [stdout] |
[INFO] [stdout] 13 | fn count_digits(n: u128) -> u32 {
[INFO] [stdout] | ^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `blink_n_times` is never used
[INFO] [stdout] --> src/d11.rs:17:4
[INFO] [stdout] |
[INFO] [stdout] 17 | fn blink_n_times(stones: Vec, n: usize) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `blink_n_times_distinct` is never used
[INFO] [stdout] --> src/d11.rs:38:4
[INFO] [stdout] |
[INFO] [stdout] 38 | fn blink_n_times_distinct(stones: Vec, n: usize) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d12.rs:3:4
[INFO] [stdout] |
[INFO] [stdout] 3 | fn load_data() -> Vec> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `spread` is never used
[INFO] [stdout] --> src/d12.rs:15:4
[INFO] [stdout] |
[INFO] [stdout] 15 | fn spread(area: &mut Vec>, i: usize, j: usize, c: char, n: usize) {
[INFO] [stdout] | ^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `code_area` is never used
[INFO] [stdout] --> src/d12.rs:45:4
[INFO] [stdout] |
[INFO] [stdout] 45 | fn code_area(area: Vec>) -> Vec> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `map_area` is never used
[INFO] [stdout] --> src/d12.rs:66:4
[INFO] [stdout] |
[INFO] [stdout] 66 | fn map_area(area: Vec>) -> HashMap<(char, usize), (usize, usize)> {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `map_area_new` is never used
[INFO] [stdout] --> src/d12.rs:93:4
[INFO] [stdout] |
[INFO] [stdout] 93 | fn map_area_new(area: Vec>) -> HashMap<(char, usize), (usize, usize)> {
[INFO] [stdout] | ^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `calculate_price` is never used
[INFO] [stdout] --> src/d12.rs:140:4
[INFO] [stdout] |
[INFO] [stdout] 140 | fn calculate_price(map: HashMap<(char, usize), (usize, usize)>) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Machine` is never constructed
[INFO] [stdout] --> src/d13.rs:9:8
[INFO] [stdout] |
[INFO] [stdout] 9 | struct Machine {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `EqSol` is never used
[INFO] [stdout] --> src/d13.rs:15:6
[INFO] [stdout] |
[INFO] [stdout] 15 | enum EqSol {
[INFO] [stdout] | ^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `solve_eq` is never used
[INFO] [stdout] --> src/d13.rs:22:4
[INFO] [stdout] |
[INFO] [stdout] 22 | fn solve_eq(c1: (i128, i128), c2: (i128, i128), c3: (i128, i128)) -> EqSol {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `solve_eq_nl` is never used
[INFO] [stdout] --> src/d13.rs:42:4
[INFO] [stdout] |
[INFO] [stdout] 42 | fn solve_eq_nl(c1: (i128, i128), c2: (i128, i128), c3: (i128, i128)) -> EqSol {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `min_token` and `min_token_nl` are never used
[INFO] [stdout] --> src/d13.rs:56:8
[INFO] [stdout] |
[INFO] [stdout] 55 | impl Machine {
[INFO] [stdout] | ------------ methods in this implementation
[INFO] [stdout] 56 | fn min_token(self: &Self) -> i128 {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 62 | fn min_token_nl(self: &Self) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_machine` is never used
[INFO] [stdout] --> src/d13.rs:74:4
[INFO] [stdout] |
[INFO] [stdout] 74 | fn parse_machine(input: &str) -> IResult<&str, ((i128, i128), (i128, i128), (i128, i128))> {
[INFO] [stdout] | ^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d13.rs:91:4
[INFO] [stdout] |
[INFO] [stdout] 91 | fn load_data() -> Vec {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Robot` is never constructed
[INFO] [stdout] --> src/d14.rs:8:8
[INFO] [stdout] |
[INFO] [stdout] 8 | struct Robot {
[INFO] [stdout] | ^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: method `move_inside` is never used
[INFO] [stdout] --> src/d14.rs:16:8
[INFO] [stdout] |
[INFO] [stdout] 15 | impl Robot {
[INFO] [stdout] | ---------- method in this implementation
[INFO] [stdout] 16 | fn move_inside(self: &mut Self, width: i32, height: i32) {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Bathroom` is never constructed
[INFO] [stdout] --> src/d14.rs:22:8
[INFO] [stdout] |
[INFO] [stdout] 22 | struct Bathroom {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `simulate_n`, `calculate_security_factor`, and `to_file_pic` are never used
[INFO] [stdout] --> src/d14.rs:29:8
[INFO] [stdout] |
[INFO] [stdout] 28 | impl Bathroom {
[INFO] [stdout] | ------------- methods in this implementation
[INFO] [stdout] 29 | fn simulate_n(self: &mut Self, n: usize) {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 37 | fn calculate_security_factor(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 55 | fn to_file_pic(self: &Self, fname: &str) {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_robot` is never used
[INFO] [stdout] --> src/d14.rs:72:4
[INFO] [stdout] |
[INFO] [stdout] 72 | fn parse_robot(input: &str) -> IResult<&str, Robot> {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d14.rs:82:4
[INFO] [stdout] |
[INFO] [stdout] 82 | fn load_data() -> Vec {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `WState` is never used
[INFO] [stdout] --> src/d15.rs:2:6
[INFO] [stdout] |
[INFO] [stdout] 2 | enum WState {
[INFO] [stdout] | ^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `WState2` is never used
[INFO] [stdout] --> src/d15.rs:8:6
[INFO] [stdout] |
[INFO] [stdout] 8 | enum WState2 {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `Dir` is never used
[INFO] [stdout] --> src/d15.rs:15:6
[INFO] [stdout] |
[INFO] [stdout] 15 | enum Dir {
[INFO] [stdout] | ^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Warehouse` is never constructed
[INFO] [stdout] --> src/d15.rs:22:8
[INFO] [stdout] |
[INFO] [stdout] 22 | struct Warehouse {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `attempt_to_move_box`, `move_robot`, and `coordinate_sum` are never used
[INFO] [stdout] --> src/d15.rs:32:8
[INFO] [stdout] |
[INFO] [stdout] 31 | impl Warehouse {
[INFO] [stdout] | -------------- methods in this implementation
[INFO] [stdout] 32 | fn attempt_to_move_box(
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 58 | fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 86 | fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d15.rs:99:4
[INFO] [stdout] |
[INFO] [stdout] 99 | fn load_data() -> Warehouse {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Warehouse2` is never constructed
[INFO] [stdout] --> src/d15.rs:148:8
[INFO] [stdout] |
[INFO] [stdout] 148 | struct Warehouse2 {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `is_box_movable`, `move_box`, `move_robot`, and `coordinate_sum` are never used
[INFO] [stdout] --> src/d15.rs:158:8
[INFO] [stdout] |
[INFO] [stdout] 157 | impl Warehouse2 {
[INFO] [stdout] | --------------- methods in this implementation
[INFO] [stdout] 158 | fn is_box_movable(self: &Self, x: isize, y: isize, off_x: isize, off_y: isize) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 193 | fn move_box(self: &mut Self, x: isize, y: isize, off_x: isize, off_y: isize) {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 272 | fn move_robot(self: &mut Self, dir: Dir) {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 304 | fn coordinate_sum(self: &Self) -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data2` is never used
[INFO] [stdout] --> src/d15.rs:317:4
[INFO] [stdout] |
[INFO] [stdout] 317 | fn load_data2() -> Warehouse2 {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `Dir` is never used
[INFO] [stdout] --> src/d16.rs:4:6
[INFO] [stdout] |
[INFO] [stdout] 4 | enum Dir {
[INFO] [stdout] | ^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `Maze` is never constructed
[INFO] [stdout] --> src/d16.rs:12:8
[INFO] [stdout] |
[INFO] [stdout] 12 | struct Maze {
[INFO] [stdout] | ^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `calculate_trans_costs` is never used
[INFO] [stdout] --> src/d16.rs:18:4
[INFO] [stdout] |
[INFO] [stdout] 18 | fn calculate_trans_costs(
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `generate_all_costs` and `min_cost_to_end` are never used
[INFO] [stdout] --> src/d16.rs:186:8
[INFO] [stdout] |
[INFO] [stdout] 185 | impl Maze {
[INFO] [stdout] | --------- methods in this implementation
[INFO] [stdout] 186 | fn generate_all_costs(self: &Self) -> HashMap<(usize, usize), HashMap> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 248 | fn min_cost_to_end(self: &Self) -> u128 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d16.rs:254:4
[INFO] [stdout] |
[INFO] [stdout] 254 | fn load_data() -> Maze {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: struct `State` is never constructed
[INFO] [stdout] --> src/d17.rs:13:8
[INFO] [stdout] |
[INFO] [stdout] 13 | struct State {
[INFO] [stdout] | ^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: methods `is_done`, `combo_of_x`, `do_instruction`, `is_output_fitting`, and `out_string` are never used
[INFO] [stdout] --> src/d17.rs:23:8
[INFO] [stdout] |
[INFO] [stdout] 22 | impl State {
[INFO] [stdout] | ---------- methods in this implementation
[INFO] [stdout] 23 | fn is_done(self: &Self) -> bool {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 27 | fn combo_of_x(self: &Self, x: u32) -> u32 {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 37 | fn do_instruction(self: &mut Self) {
[INFO] [stdout] | ^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 80 | fn is_output_fitting(self: &Self) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 89 | fn out_string(self: &Self) -> String {
[INFO] [stdout] | ^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_state` is never used
[INFO] [stdout] --> src/d17.rs:98:4
[INFO] [stdout] |
[INFO] [stdout] 98 | fn parse_state(input: &str) -> IResult<&str, State> {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d17.rs:122:4
[INFO] [stdout] |
[INFO] [stdout] 122 | fn load_data() -> State {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d21.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn load_data() -> Vec {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_optimal_numeric` is never used
[INFO] [stdout] --> src/d21.rs:11:4
[INFO] [stdout] |
[INFO] [stdout] 11 | fn find_optimal_numeric(goal: String) -> String {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d22.rs:3:4
[INFO] [stdout] |
[INFO] [stdout] 3 | fn load_data() -> Vec {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `mix` is never used
[INFO] [stdout] --> src/d22.rs:13:4
[INFO] [stdout] |
[INFO] [stdout] 13 | fn mix(x: u128, y: u128) -> u128 {
[INFO] [stdout] | ^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `prune` is never used
[INFO] [stdout] --> src/d22.rs:17:4
[INFO] [stdout] |
[INFO] [stdout] 17 | fn prune(x: u128) -> u128 {
[INFO] [stdout] | ^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `get_next_secret` is never used
[INFO] [stdout] --> src/d22.rs:21:4
[INFO] [stdout] |
[INFO] [stdout] 21 | fn get_next_secret(x: u128) -> u128 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `get_nth_next_secret` is never used
[INFO] [stdout] --> src/d22.rs:28:4
[INFO] [stdout] |
[INFO] [stdout] 28 | fn get_nth_next_secret(x: u128, n: usize) -> u128 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `get_n_next_secrets` is never used
[INFO] [stdout] --> src/d22.rs:36:4
[INFO] [stdout] |
[INFO] [stdout] 36 | fn get_n_next_secrets(x: u128, n: usize) -> Vec {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_most_bananas` is never used
[INFO] [stdout] --> src/d22.rs:46:4
[INFO] [stdout] |
[INFO] [stdout] 46 | fn find_most_bananas() -> i64 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d23.rs:6:4
[INFO] [stdout] |
[INFO] [stdout] 6 | fn load_data() -> Vec<(String, String)> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `pairs_to_clusters` is never used
[INFO] [stdout] --> src/d23.rs:19:4
[INFO] [stdout] |
[INFO] [stdout] 19 | fn pairs_to_clusters(v: Vec<(String, String)>) -> HashMap> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_in_three` is never used
[INFO] [stdout] --> src/d23.rs:30:4
[INFO] [stdout] |
[INFO] [stdout] 30 | fn find_in_three(
[INFO] [stdout] | ^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `triples_in_clusters` is never used
[INFO] [stdout] --> src/d23.rs:60:4
[INFO] [stdout] |
[INFO] [stdout] 60 | fn triples_in_clusters(map: HashMap>) -> HashSet<(String, String, String)> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `form_clique` is never used
[INFO] [stdout] --> src/d23.rs:79:4
[INFO] [stdout] |
[INFO] [stdout] 79 | fn form_clique(
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_all_cliques` is never used
[INFO] [stdout] --> src/d23.rs:103:4
[INFO] [stdout] |
[INFO] [stdout] 103 | fn find_all_cliques(map: HashMap>) -> Vec> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `get_pwd_to_largest` is never used
[INFO] [stdout] --> src/d23.rs:112:4
[INFO] [stdout] |
[INFO] [stdout] 112 | fn get_pwd_to_largest(clique: HashSet) -> String {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_max_clique` is never used
[INFO] [stdout] --> src/d23.rs:118:4
[INFO] [stdout] |
[INFO] [stdout] 118 | fn find_max_clique() -> HashSet {
[INFO] [stdout] | ^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `count_ts` is never used
[INFO] [stdout] --> src/d23.rs:156:4
[INFO] [stdout] |
[INFO] [stdout] 156 | fn count_ts(set: HashSet<(String, String, String)>) -> usize {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: enum `Exp` is never used
[INFO] [stdout] --> src/d24.rs:13:6
[INFO] [stdout] |
[INFO] [stdout] 13 | enum Exp {
[INFO] [stdout] | ^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_const` is never used
[INFO] [stdout] --> src/d24.rs:20:4
[INFO] [stdout] |
[INFO] [stdout] 20 | fn parse_const(input: &str) -> IResult<&str, (String, Exp)> {
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_and` is never used
[INFO] [stdout] --> src/d24.rs:26:4
[INFO] [stdout] |
[INFO] [stdout] 26 | fn parse_and(input: &str) -> IResult<&str, (String, Exp)> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_xor` is never used
[INFO] [stdout] --> src/d24.rs:41:4
[INFO] [stdout] |
[INFO] [stdout] 41 | fn parse_xor(input: &str) -> IResult<&str, (String, Exp)> {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse_or` is never used
[INFO] [stdout] --> src/d24.rs:56:4
[INFO] [stdout] |
[INFO] [stdout] 56 | fn parse_or(input: &str) -> IResult<&str, (String, Exp)> {
[INFO] [stdout] | ^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `parse` is never used
[INFO] [stdout] --> src/d24.rs:71:4
[INFO] [stdout] |
[INFO] [stdout] 71 | fn parse(input: &str) -> Vec<(String, Exp)> {
[INFO] [stdout] | ^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d24.rs:76:4
[INFO] [stdout] |
[INFO] [stdout] 76 | fn load_data() -> HashMap {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `eval` is never used
[INFO] [stdout] --> src/d24.rs:88:4
[INFO] [stdout] |
[INFO] [stdout] 88 | fn eval(name: &String, env: &mut HashMap) -> u128 {
[INFO] [stdout] | ^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `eval_zs` is never used
[INFO] [stdout] --> src/d24.rs:114:4
[INFO] [stdout] |
[INFO] [stdout] 114 | fn eval_zs(env: &mut HashMap) -> u128 {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `map_pin` is never used
[INFO] [stdout] --> src/d25.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn map_pin(pins: &Vec>) -> Vec {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d25.rs:13:4
[INFO] [stdout] |
[INFO] [stdout] 13 | fn load_data() -> (Vec>, Vec>) {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `lock_key_fit` is never used
[INFO] [stdout] --> src/d25.rs:33:4
[INFO] [stdout] |
[INFO] [stdout] 33 | fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `count_fitting` is never used
[INFO] [stdout] --> src/d25.rs:37:4
[INFO] [stdout] |
[INFO] [stdout] 37 | fn count_fitting() -> usize {
[INFO] [stdout] | ^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unneeded `return` statement
[INFO] [stdout] --> src/d02.rs:28:5
[INFO] [stdout] |
[INFO] [stdout] 28 | return true;
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
[INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default
[INFO] [stdout] help: remove `return`
[INFO] [stdout] |
[INFO] [stdout] 28 - return true;
[INFO] [stdout] 28 + true
[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/d02.rs:18:15
[INFO] [stdout] |
[INFO] [stdout] 18 | fn is_safe(v: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 18 - fn is_safe(v: &Vec) -> bool {
[INFO] [stdout] 18 + fn is_safe(v: &[i32]) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler
[INFO] [stdout] --> src/d02.rs:34:36
[INFO] [stdout] |
[INFO] [stdout] 34 | .fold(0, |a, l| if is_safe(&l) { a + 1 } else { a })
[INFO] [stdout] | ^^ help: change this to: `l`
[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: returning the result of a `let` binding from a block
[INFO] [stdout] --> src/d03.rs:7:5
[INFO] [stdout] |
[INFO] [stdout] 6 | let content = fs::read_to_string("./input/d03_input.txt").expect("could not read file");
[INFO] [stdout] | ---------------------------------------------------------------------------------------- unnecessary `let` binding
[INFO] [stdout] 7 | content
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
[INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default
[INFO] [stdout] help: return the expression directly
[INFO] [stdout] |
[INFO] [stdout] 6 ~
[INFO] [stdout] 7 ~ fs::read_to_string("./input/d03_input.txt").expect("could not read file")
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: returning the result of a `let` binding from a block
[INFO] [stdout] --> src/d04.rs:9:5
[INFO] [stdout] |
[INFO] [stdout] 8 | let content = fs::read_to_string("./input/d04_input.txt").expect("could not read file");
[INFO] [stdout] | ---------------------------------------------------------------------------------------- unnecessary `let` binding
[INFO] [stdout] 9 | content
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
[INFO] [stdout] help: return the expression directly
[INFO] [stdout] |
[INFO] [stdout] 8 ~
[INFO] [stdout] 9 ~ fs::read_to_string("./input/d04_input.txt").expect("could not read file")
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do
[INFO] [stdout] --> src/d04.rs:12:23
[INFO] [stdout] |
[INFO] [stdout] 12 | fn rcd_from_string(s: &String) -> Vec {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 12 ~ fn rcd_from_string(s: &str) -> Vec {
[INFO] [stdout] 13 | let mut v = vec![];
[INFO] [stdout] 14 ~ let lines = s
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: redundant closure
[INFO] [stdout] --> src/d04.rs:17:14
[INFO] [stdout] |
[INFO] [stdout] 17 | .map(|e| String::from(e))
[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: writing `&String` instead of `&str` involves a new object where a slice will do
[INFO] [stdout] --> src/d04.rs:37:21
[INFO] [stdout] |
[INFO] [stdout] 37 | fn d_from_string(s: &String) -> (Vec, Vec, usize) {
[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] 37 ~ fn d_from_string(s: &str) -> (Vec, Vec, usize) {
[INFO] [stdout] 38 ~ let lines = s
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: redundant closure
[INFO] [stdout] --> src/d04.rs:41:14
[INFO] [stdout] |
[INFO] [stdout] 41 | .map(|e| String::from(e))
[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: called `.iter().nth()` on a `Vec`
[INFO] [stdout] --> src/d05.rs:42:26
[INFO] [stdout] |
[INFO] [stdout] 42 | .fold(0, |a, &l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
[INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default
[INFO] [stdout] help: `get` is equivalent but more concise
[INFO] [stdout] |
[INFO] [stdout] 42 - .fold(0, |a, &l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] 42 + .fold(0, |a, &l| l.get(l.len() / 2).unwrap() + a)
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: called `.iter().nth()` on a `Vec`
[INFO] [stdout] --> src/d05.rs:71:25
[INFO] [stdout] |
[INFO] [stdout] 71 | .fold(0, |a, l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
[INFO] [stdout] help: `get` is equivalent but more concise
[INFO] [stdout] |
[INFO] [stdout] 71 - .fold(0, |a, l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] 71 + .fold(0, |a, l| l.get(l.len() / 2).unwrap() + a)
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: called `unwrap` on `self.guard_position` after checking its variant with `is_some`
[INFO] [stdout] --> src/d06.rs:19:34
[INFO] [stdout] |
[INFO] [stdout] 18 | if self.guard_position.is_some() {
[INFO] [stdout] | -------------------------------- help: try: `if let Some(- ) = self.guard_position`
[INFO] [stdout] 19 | let (mut x, mut y) = self.guard_position.unwrap();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
[INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: called `unwrap` on `self.guard_position` after checking its variant with `is_some`
[INFO] [stdout] --> src/d06.rs:51:34
[INFO] [stdout] |
[INFO] [stdout] 50 | if self.guard_position.is_some() {
[INFO] [stdout] | -------------------------------- help: try: `if let Some(
- ) = self.guard_position`
[INFO] [stdout] 51 | let (mut x, mut y) = self.guard_position.unwrap();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: name `RIGHT` contains a capitalized acronym
[INFO] [stdout] --> src/d06.rs:101:5
[INFO] [stdout] |
[INFO] [stdout] 101 | RIGHT = 1,
[INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right`
[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 `DOWN` contains a capitalized acronym
[INFO] [stdout] --> src/d06.rs:102:5
[INFO] [stdout] |
[INFO] [stdout] 102 | DOWN = 2,
[INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down`
[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 `LEFT` contains a capitalized acronym
[INFO] [stdout] --> src/d06.rs:103:5
[INFO] [stdout] |
[INFO] [stdout] 103 | LEFT = 3,
[INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left`
[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: length comparison to zero
[INFO] [stdout] --> src/d07.rs:20:22
[INFO] [stdout] |
[INFO] [stdout] 20 | if acc > goal || v.len() == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: length comparison to zero
[INFO] [stdout] --> src/d07.rs:33:22
[INFO] [stdout] |
[INFO] [stdout] 33 | if acc > goal || v.len() == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions
[INFO] [stdout] --> src/d07.rs:42:25
[INFO] [stdout] |
[INFO] [stdout] 42 | fn calibration_sum(fun: &dyn Fn(i128, (i128, &[i128])) -> bool) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
[INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this boolean expression can be simplified
[INFO] [stdout] --> src/d09.rs:26:15
[INFO] [stdout] |
[INFO] [stdout] 26 | while !(i < ranges[bucket]) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(i >= ranges[bucket])`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
[INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this boolean expression can be simplified
[INFO] [stdout] --> src/d09.rs:32:19
[INFO] [stdout] |
[INFO] [stdout] 32 | while !(files[last] > 0) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(files[last] <= 0)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
[INFO] [stdout] --> src/d09.rs:42:21
[INFO] [stdout] |
[INFO] [stdout] 42 | fn findfree(ranges: &Vec, n: usize) -> Option<(usize, usize)> {
[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] 42 - fn findfree(ranges: &Vec, n: usize) -> Option<(usize, usize)> {
[INFO] [stdout] 42 + fn findfree(ranges: &[usize], n: usize) -> Option<(usize, usize)> {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this `if` can be collapsed into the outer `match`
[INFO] [stdout] --> src/d09.rs:63:17
[INFO] [stdout] |
[INFO] [stdout] 63 | / if x < locations[i] {
[INFO] [stdout] 64 | | locations[i] = x;
[INFO] [stdout] 65 | | ranges[b] += files[i];
[INFO] [stdout] 66 | | }
[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] 62 ~ Some((x, b))
[INFO] [stdout] 63 ~ if x < locations[i] => {
[INFO] [stdout] 64 | locations[i] = x;
[INFO] [stdout] 65 | ranges[b] += files[i];
[INFO] [stdout] 66 ~ }
[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/d09.rs:61:9
[INFO] [stdout] |
[INFO] [stdout] 61 | / match nl {
[INFO] [stdout] 62 | | Some((x, b)) => {
[INFO] [stdout] 63 | | if x < locations[i] {
[INFO] [stdout] 64 | | locations[i] = x;
[INFO] [stdout] ... |
[INFO] [stdout] 68 | | None => (),
[INFO] [stdout] 69 | | }
[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] 61 ~ if let Some((x, b)) = nl {
[INFO] [stdout] 62 + if x < locations[i] {
[INFO] [stdout] 63 + locations[i] = x;
[INFO] [stdout] 64 + ranges[b] += files[i];
[INFO] [stdout] 65 + }
[INFO] [stdout] 66 + }
[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/d10.rs:17:9
[INFO] [stdout] |
[INFO] [stdout] 17 | / match self.possible_moves.get(&(x, y)) {
[INFO] [stdout] 18 | | Some(v) => {
[INFO] [stdout] 19 | | for (i, j) in v {
[INFO] [stdout] 20 | | n.extend(self.get_to_nine(*i, *j));
[INFO] [stdout] ... |
[INFO] [stdout] 23 | | None => (),
[INFO] [stdout] 24 | | }
[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] 17 ~ if let Some(v) = self.possible_moves.get(&(x, y)) {
[INFO] [stdout] 18 + for (i, j) in v {
[INFO] [stdout] 19 + n.extend(self.get_to_nine(*i, *j));
[INFO] [stdout] 20 + }
[INFO] [stdout] 21 + }
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of `.is_multiple_of()`
[INFO] [stdout] --> src/d11.rs:24:23
[INFO] [stdout] |
[INFO] [stdout] 24 | } else if count_digits(s) % 2 == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(s).is_multiple_of(2)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of
[INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of `.is_multiple_of()`
[INFO] [stdout] --> src/d11.rs:48:23
[INFO] [stdout] |
[INFO] [stdout] 48 | } else if count_digits(s) % 2 == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(s).is_multiple_of(2)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions
[INFO] [stdout] --> src/d13.rs:74:34
[INFO] [stdout] |
[INFO] [stdout] 74 | fn parse_machine(input: &str) -> IResult<&str, ((i128, i128), (i128, i128), (i128, i128))> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: importing legacy numeric constants
[INFO] [stdout] --> src/d16.rs:1:33
[INFO] [stdout] |
[INFO] [stdout] 1 | use std::{collections::HashMap, u128};
[INFO] [stdout] | ^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: remove this import
[INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
[INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: length comparison to zero
[INFO] [stdout] --> src/d16.rs:207:15
[INFO] [stdout] |
[INFO] [stdout] 207 | while q.len() > 0 {
[INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!q.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:229:31
[INFO] [stdout] |
[INFO] [stdout] 229 | *up_ent = up_ent.clone().min(*alt.get(&Up).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `(*up_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:232:34
[INFO] [stdout] |
[INFO] [stdout] 232 | *right_ent = right_ent.clone().min(*alt.get(&Right).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `(*right_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:235:33
[INFO] [stdout] |
[INFO] [stdout] 235 | *down_ent = down_ent.clone().min(*alt.get(&Down).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `(*down_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:238:33
[INFO] [stdout] |
[INFO] [stdout] 238 | *left_ent = left_ent.clone().min(*alt.get(&Left).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `(*left_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:241:30
[INFO] [stdout] |
[INFO] [stdout] 241 | *q_ent = q_ent.clone().min(nc);
[INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `(*q_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this OR pattern can be rewritten using a range
[INFO] [stdout] --> src/d17.rs:29:13
[INFO] [stdout] |
[INFO] [stdout] 29 | 0 | 1 | 2 | 3 => x,
[INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `0..=3`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns
[INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of an assign operation
[INFO] [stdout] --> src/d17.rs:42:17
[INFO] [stdout] |
[INFO] [stdout] 42 | self.reg_a = self.reg_a / (1u32.shl(self.combo_of_x(arg)));
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_a /= (1u32.shl(self.combo_of_x(arg)))`
[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: manual implementation of an assign operation
[INFO] [stdout] --> src/d17.rs:46:17
[INFO] [stdout] |
[INFO] [stdout] 46 | self.reg_b = self.reg_b ^ arg;
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= arg`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of an assign operation
[INFO] [stdout] --> src/d17.rs:61:17
[INFO] [stdout] |
[INFO] [stdout] 61 | self.reg_b = self.reg_b ^ self.reg_c;
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= self.reg_c`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of an assign operation
[INFO] [stdout] --> src/d22.rs:71:13
[INFO] [stdout] |
[INFO] [stdout] 71 | *e = *e + v;
[INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `*e += v`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
[INFO] [stdout] --> src/d23.rs:35:5
[INFO] [stdout] |
[INFO] [stdout] 35 | / match map.get(s) {
[INFO] [stdout] 36 | | Some(n) => {
[INFO] [stdout] 37 | | for two in n {
[INFO] [stdout] 38 | | match map.get(two) {
[INFO] [stdout] ... |
[INFO] [stdout] 55 | | None => (),
[INFO] [stdout] 56 | | }
[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] 35 ~ if let Some(n) = map.get(s) {
[INFO] [stdout] 36 + for two in n {
[INFO] [stdout] 37 + match map.get(two) {
[INFO] [stdout] 38 + Some(m) => {
[INFO] [stdout] 39 + for three in m {
[INFO] [stdout] 40 + match map.get(three) {
[INFO] [stdout] 41 + Some(p) => {
[INFO] [stdout] 42 + if *three != *s && p.contains(s) {
[INFO] [stdout] 43 + sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 44 + }
[INFO] [stdout] 45 + }
[INFO] [stdout] 46 + None => (),
[INFO] [stdout] 47 + }
[INFO] [stdout] 48 + }
[INFO] [stdout] 49 + }
[INFO] [stdout] 50 + None => (),
[INFO] [stdout] 51 + }
[INFO] [stdout] 52 + }
[INFO] [stdout] 53 + }
[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/d23.rs:38:17
[INFO] [stdout] |
[INFO] [stdout] 38 | / match map.get(two) {
[INFO] [stdout] 39 | | Some(m) => {
[INFO] [stdout] 40 | | for three in m {
[INFO] [stdout] 41 | | match map.get(three) {
[INFO] [stdout] ... |
[INFO] [stdout] 51 | | None => (),
[INFO] [stdout] 52 | | }
[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] 38 ~ if let Some(m) = map.get(two) {
[INFO] [stdout] 39 + for three in m {
[INFO] [stdout] 40 + match map.get(three) {
[INFO] [stdout] 41 + Some(p) => {
[INFO] [stdout] 42 + if *three != *s && p.contains(s) {
[INFO] [stdout] 43 + sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 44 + }
[INFO] [stdout] 45 + }
[INFO] [stdout] 46 + None => (),
[INFO] [stdout] 47 + }
[INFO] [stdout] 48 + }
[INFO] [stdout] 49 + }
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this `if` can be collapsed into the outer `match`
[INFO] [stdout] --> src/d23.rs:43:37
[INFO] [stdout] |
[INFO] [stdout] 43 | / ... if *three != *s && p.contains(s) {
[INFO] [stdout] 44 | | ... sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 45 | | ... }
[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] help: collapse nested if block
[INFO] [stdout] |
[INFO] [stdout] 42 ~ Some(p)
[INFO] [stdout] 43 ~ if *three != *s && p.contains(s) => {
[INFO] [stdout] 44 | sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 45 ~ }
[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/d23.rs:41:29
[INFO] [stdout] |
[INFO] [stdout] 41 | / ... match map.get(three) {
[INFO] [stdout] 42 | | ... Some(p) => {
[INFO] [stdout] 43 | | ... if *three != *s && p.contains(s) {
[INFO] [stdout] 44 | | ... sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] ... |
[INFO] [stdout] 47 | | ... None => (),
[INFO] [stdout] 48 | | ... }
[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] 41 ~ if let Some(p) = map.get(three) {
[INFO] [stdout] 42 + if *three != *s && p.contains(s) {
[INFO] [stdout] 43 + sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 44 + }
[INFO] [stdout] 45 + }
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: you are using an explicit closure for cloning elements
[INFO] [stdout] --> src/d23.rs:113:21
[INFO] [stdout] |
[INFO] [stdout] 113 | let mut comps = clique.iter().map(|s| s.clone()).collect::>();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `clique.iter().cloned()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
[INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler
[INFO] [stdout] --> src/d23.rs:136:43
[INFO] [stdout] |
[INFO] [stdout] 136 | let to_try = comps.difference(&c).collect::>();
[INFO] [stdout] | ^^ help: change this to: `c`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: length comparison to zero
[INFO] [stdout] --> src/d23.rs:147:12
[INFO] [stdout] |
[INFO] [stdout] 147 | if cliquesn.len() == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `cliquesn.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unused variable: `goal`
[INFO] [stdout] --> src/d21.rs:11:25
[INFO] [stdout] |
[INFO] [stdout] 11 | fn find_optimal_numeric(goal: String) -> String {
[INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_goal`
[INFO] [stdout] |
[INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do
[INFO] [stdout] --> src/d24.rs:88:15
[INFO] [stdout] |
[INFO] [stdout] 88 | fn eval(name: &String, env: &mut HashMap) -> u128 {
[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] 88 ~ fn eval(name: &str, env: &mut HashMap) -> u128 {
[INFO] [stdout] 89 | use Exp::*;
[INFO] [stdout] 90 ~ let exp = env.entry(name.to_owned()).or_insert(Const(0)).clone();
[INFO] [stdout] 91 | match exp {
[INFO] [stdout] ...
[INFO] [stdout] 94 | let v = eval(&e1, env) & eval(&e2, env);
[INFO] [stdout] 95 ~ let entry = env.entry(name.to_owned()).or_insert(Const(0));
[INFO] [stdout] 96 | *entry = Const(v);
[INFO] [stdout] ...
[INFO] [stdout] 100 | let v = eval(&e1, env) ^ eval(&e2, env);
[INFO] [stdout] 101 ~ let entry = env.entry(name.to_owned()).or_insert(Const(0));
[INFO] [stdout] 102 | *entry = Const(v);
[INFO] [stdout] ...
[INFO] [stdout] 106 | let v = eval(&e1, env) | eval(&e2, env);
[INFO] [stdout] 107 ~ let entry = env.entry(name.to_owned()).or_insert(Const(0));
[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/d25.rs:33:23
[INFO] [stdout] |
[INFO] [stdout] 33 | fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 33 - fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] 33 + fn lock_key_fit(lock: &[i32], key: &Vec) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
[INFO] [stdout] --> src/d25.rs:33:39
[INFO] [stdout] |
[INFO] [stdout] 33 | fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 33 - fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] 33 + fn lock_key_fit(lock: &Vec, key: &[i32]) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: fields `width` and `height` are never read
[INFO] [stdout] --> src/d10.rs:4:5
[INFO] [stdout] |
[INFO] [stdout] 3 | struct Trails {
[INFO] [stdout] | ------ fields in this struct
[INFO] [stdout] 4 | width: usize,
[INFO] [stdout] | ^^^^^
[INFO] [stdout] 5 | height: usize,
[INFO] [stdout] | ^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: fields `width` and `height` are never read
[INFO] [stdout] --> src/d15.rs:23:5
[INFO] [stdout] |
[INFO] [stdout] 22 | struct Warehouse {
[INFO] [stdout] | --------- fields in this struct
[INFO] [stdout] 23 | width: usize,
[INFO] [stdout] | ^^^^^
[INFO] [stdout] 24 | height: usize,
[INFO] [stdout] | ^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: fields `width` and `height` are never read
[INFO] [stdout] --> src/d15.rs:149:5
[INFO] [stdout] |
[INFO] [stdout] 148 | struct Warehouse2 {
[INFO] [stdout] | ---------- fields in this struct
[INFO] [stdout] 149 | width: usize,
[INFO] [stdout] | ^^^^^
[INFO] [stdout] 150 | height: usize,
[INFO] [stdout] | ^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `load_data` is never used
[INFO] [stdout] --> src/d21.rs:1:4
[INFO] [stdout] |
[INFO] [stdout] 1 | fn load_data() -> Vec {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_optimal_numeric` is never used
[INFO] [stdout] --> src/d21.rs:11:4
[INFO] [stdout] |
[INFO] [stdout] 11 | fn find_optimal_numeric(goal: String) -> String {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `form_clique` is never used
[INFO] [stdout] --> src/d23.rs:79:4
[INFO] [stdout] |
[INFO] [stdout] 79 | fn form_clique(
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `find_all_cliques` is never used
[INFO] [stdout] --> src/d23.rs:103:4
[INFO] [stdout] |
[INFO] [stdout] 103 | fn find_all_cliques(map: HashMap>) -> Vec> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: function `get_pwd_to_largest` is never used
[INFO] [stdout] --> src/d23.rs:112:4
[INFO] [stdout] |
[INFO] [stdout] 112 | fn get_pwd_to_largest(clique: HashSet) -> String {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: unneeded `return` statement
[INFO] [stdout] --> src/d02.rs:28:5
[INFO] [stdout] |
[INFO] [stdout] 28 | return true;
[INFO] [stdout] | ^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
[INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default
[INFO] [stdout] help: remove `return`
[INFO] [stdout] |
[INFO] [stdout] 28 - return true;
[INFO] [stdout] 28 + true
[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/d02.rs:18:15
[INFO] [stdout] |
[INFO] [stdout] 18 | fn is_safe(v: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 18 - fn is_safe(v: &Vec) -> bool {
[INFO] [stdout] 18 + fn is_safe(v: &[i32]) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler
[INFO] [stdout] --> src/d02.rs:34:36
[INFO] [stdout] |
[INFO] [stdout] 34 | .fold(0, |a, l| if is_safe(&l) { a + 1 } else { a })
[INFO] [stdout] | ^^ help: change this to: `l`
[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: returning the result of a `let` binding from a block
[INFO] [stdout] --> src/d03.rs:7:5
[INFO] [stdout] |
[INFO] [stdout] 6 | let content = fs::read_to_string("./input/d03_input.txt").expect("could not read file");
[INFO] [stdout] | ---------------------------------------------------------------------------------------- unnecessary `let` binding
[INFO] [stdout] 7 | content
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
[INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default
[INFO] [stdout] help: return the expression directly
[INFO] [stdout] |
[INFO] [stdout] 6 ~
[INFO] [stdout] 7 ~ fs::read_to_string("./input/d03_input.txt").expect("could not read file")
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: returning the result of a `let` binding from a block
[INFO] [stdout] --> src/d04.rs:9:5
[INFO] [stdout] |
[INFO] [stdout] 8 | let content = fs::read_to_string("./input/d04_input.txt").expect("could not read file");
[INFO] [stdout] | ---------------------------------------------------------------------------------------- unnecessary `let` binding
[INFO] [stdout] 9 | content
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
[INFO] [stdout] help: return the expression directly
[INFO] [stdout] |
[INFO] [stdout] 8 ~
[INFO] [stdout] 9 ~ fs::read_to_string("./input/d04_input.txt").expect("could not read file")
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do
[INFO] [stdout] --> src/d04.rs:12:23
[INFO] [stdout] |
[INFO] [stdout] 12 | fn rcd_from_string(s: &String) -> Vec {
[INFO] [stdout] | ^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 12 ~ fn rcd_from_string(s: &str) -> Vec {
[INFO] [stdout] 13 | let mut v = vec![];
[INFO] [stdout] 14 ~ let lines = s
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: redundant closure
[INFO] [stdout] --> src/d04.rs:17:14
[INFO] [stdout] |
[INFO] [stdout] 17 | .map(|e| String::from(e))
[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: writing `&String` instead of `&str` involves a new object where a slice will do
[INFO] [stdout] --> src/d04.rs:37:21
[INFO] [stdout] |
[INFO] [stdout] 37 | fn d_from_string(s: &String) -> (Vec, Vec, usize) {
[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] 37 ~ fn d_from_string(s: &str) -> (Vec, Vec, usize) {
[INFO] [stdout] 38 ~ let lines = s
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: redundant closure
[INFO] [stdout] --> src/d04.rs:41:14
[INFO] [stdout] |
[INFO] [stdout] 41 | .map(|e| String::from(e))
[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: called `.iter().nth()` on a `Vec`
[INFO] [stdout] --> src/d05.rs:42:26
[INFO] [stdout] |
[INFO] [stdout] 42 | .fold(0, |a, &l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
[INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default
[INFO] [stdout] help: `get` is equivalent but more concise
[INFO] [stdout] |
[INFO] [stdout] 42 - .fold(0, |a, &l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] 42 + .fold(0, |a, &l| l.get(l.len() / 2).unwrap() + a)
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: called `.iter().nth()` on a `Vec`
[INFO] [stdout] --> src/d05.rs:71:25
[INFO] [stdout] |
[INFO] [stdout] 71 | .fold(0, |a, l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
[INFO] [stdout] help: `get` is equivalent but more concise
[INFO] [stdout] |
[INFO] [stdout] 71 - .fold(0, |a, l| l.iter().nth(l.len() / 2).unwrap() + a)
[INFO] [stdout] 71 + .fold(0, |a, l| l.get(l.len() / 2).unwrap() + a)
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: called `unwrap` on `self.guard_position` after checking its variant with `is_some`
[INFO] [stdout] --> src/d06.rs:19:34
[INFO] [stdout] |
[INFO] [stdout] 18 | if self.guard_position.is_some() {
[INFO] [stdout] | -------------------------------- help: try: `if let Some(
- ) = self.guard_position`
[INFO] [stdout] 19 | let (mut x, mut y) = self.guard_position.unwrap();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
[INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: called `unwrap` on `self.guard_position` after checking its variant with `is_some`
[INFO] [stdout] --> src/d06.rs:51:34
[INFO] [stdout] |
[INFO] [stdout] 50 | if self.guard_position.is_some() {
[INFO] [stdout] | -------------------------------- help: try: `if let Some(
- ) = self.guard_position`
[INFO] [stdout] 51 | let (mut x, mut y) = self.guard_position.unwrap();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: name `RIGHT` contains a capitalized acronym
[INFO] [stdout] --> src/d06.rs:101:5
[INFO] [stdout] |
[INFO] [stdout] 101 | RIGHT = 1,
[INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right`
[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 `DOWN` contains a capitalized acronym
[INFO] [stdout] --> src/d06.rs:102:5
[INFO] [stdout] |
[INFO] [stdout] 102 | DOWN = 2,
[INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down`
[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 `LEFT` contains a capitalized acronym
[INFO] [stdout] --> src/d06.rs:103:5
[INFO] [stdout] |
[INFO] [stdout] 103 | LEFT = 3,
[INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left`
[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: length comparison to zero
[INFO] [stdout] --> src/d07.rs:20:22
[INFO] [stdout] |
[INFO] [stdout] 20 | if acc > goal || v.len() == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: length comparison to zero
[INFO] [stdout] --> src/d07.rs:33:22
[INFO] [stdout] |
[INFO] [stdout] 33 | if acc > goal || v.len() == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions
[INFO] [stdout] --> src/d07.rs:42:25
[INFO] [stdout] |
[INFO] [stdout] 42 | fn calibration_sum(fun: &dyn Fn(i128, (i128, &[i128])) -> bool) -> i128 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
[INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this boolean expression can be simplified
[INFO] [stdout] --> src/d09.rs:26:15
[INFO] [stdout] |
[INFO] [stdout] 26 | while !(i < ranges[bucket]) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(i >= ranges[bucket])`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
[INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this boolean expression can be simplified
[INFO] [stdout] --> src/d09.rs:32:19
[INFO] [stdout] |
[INFO] [stdout] 32 | while !(files[last] > 0) {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(files[last] <= 0)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
[INFO] [stdout] --> src/d09.rs:42:21
[INFO] [stdout] |
[INFO] [stdout] 42 | fn findfree(ranges: &Vec, n: usize) -> Option<(usize, usize)> {
[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] 42 - fn findfree(ranges: &Vec, n: usize) -> Option<(usize, usize)> {
[INFO] [stdout] 42 + fn findfree(ranges: &[usize], n: usize) -> Option<(usize, usize)> {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this `if` can be collapsed into the outer `match`
[INFO] [stdout] --> src/d09.rs:63:17
[INFO] [stdout] |
[INFO] [stdout] 63 | / if x < locations[i] {
[INFO] [stdout] 64 | | locations[i] = x;
[INFO] [stdout] 65 | | ranges[b] += files[i];
[INFO] [stdout] 66 | | }
[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] 62 ~ Some((x, b))
[INFO] [stdout] 63 ~ if x < locations[i] => {
[INFO] [stdout] 64 | locations[i] = x;
[INFO] [stdout] 65 | ranges[b] += files[i];
[INFO] [stdout] 66 ~ }
[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/d09.rs:61:9
[INFO] [stdout] |
[INFO] [stdout] 61 | / match nl {
[INFO] [stdout] 62 | | Some((x, b)) => {
[INFO] [stdout] 63 | | if x < locations[i] {
[INFO] [stdout] 64 | | locations[i] = x;
[INFO] [stdout] ... |
[INFO] [stdout] 68 | | None => (),
[INFO] [stdout] 69 | | }
[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] 61 ~ if let Some((x, b)) = nl {
[INFO] [stdout] 62 + if x < locations[i] {
[INFO] [stdout] 63 + locations[i] = x;
[INFO] [stdout] 64 + ranges[b] += files[i];
[INFO] [stdout] 65 + }
[INFO] [stdout] 66 + }
[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/d10.rs:17:9
[INFO] [stdout] |
[INFO] [stdout] 17 | / match self.possible_moves.get(&(x, y)) {
[INFO] [stdout] 18 | | Some(v) => {
[INFO] [stdout] 19 | | for (i, j) in v {
[INFO] [stdout] 20 | | n.extend(self.get_to_nine(*i, *j));
[INFO] [stdout] ... |
[INFO] [stdout] 23 | | None => (),
[INFO] [stdout] 24 | | }
[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] 17 ~ if let Some(v) = self.possible_moves.get(&(x, y)) {
[INFO] [stdout] 18 + for (i, j) in v {
[INFO] [stdout] 19 + n.extend(self.get_to_nine(*i, *j));
[INFO] [stdout] 20 + }
[INFO] [stdout] 21 + }
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of `.is_multiple_of()`
[INFO] [stdout] --> src/d11.rs:24:23
[INFO] [stdout] |
[INFO] [stdout] 24 | } else if count_digits(s) % 2 == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(s).is_multiple_of(2)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of
[INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of `.is_multiple_of()`
[INFO] [stdout] --> src/d11.rs:48:23
[INFO] [stdout] |
[INFO] [stdout] 48 | } else if count_digits(s) % 2 == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(s).is_multiple_of(2)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions
[INFO] [stdout] --> src/d13.rs:74:34
[INFO] [stdout] |
[INFO] [stdout] 74 | fn parse_machine(input: &str) -> IResult<&str, ((i128, i128), (i128, i128), (i128, i128))> {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: importing legacy numeric constants
[INFO] [stdout] --> src/d16.rs:1:33
[INFO] [stdout] |
[INFO] [stdout] 1 | use std::{collections::HashMap, u128};
[INFO] [stdout] | ^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: remove this import
[INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
[INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: length comparison to zero
[INFO] [stdout] --> src/d16.rs:207:15
[INFO] [stdout] |
[INFO] [stdout] 207 | while q.len() > 0 {
[INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!q.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:229:31
[INFO] [stdout] |
[INFO] [stdout] 229 | *up_ent = up_ent.clone().min(*alt.get(&Up).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `(*up_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:232:34
[INFO] [stdout] |
[INFO] [stdout] 232 | *right_ent = right_ent.clone().min(*alt.get(&Right).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `(*right_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:235:33
[INFO] [stdout] |
[INFO] [stdout] 235 | *down_ent = down_ent.clone().min(*alt.get(&Down).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `(*down_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:238:33
[INFO] [stdout] |
[INFO] [stdout] 238 | *left_ent = left_ent.clone().min(*alt.get(&Left).unwrap());
[INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `(*left_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: using `clone` on type `u128` which implements the `Copy` trait
[INFO] [stdout] --> src/d16.rs:241:30
[INFO] [stdout] |
[INFO] [stdout] 241 | *q_ent = q_ent.clone().min(nc);
[INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `(*q_ent)`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this OR pattern can be rewritten using a range
[INFO] [stdout] --> src/d17.rs:29:13
[INFO] [stdout] |
[INFO] [stdout] 29 | 0 | 1 | 2 | 3 => x,
[INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `0..=3`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns
[INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of an assign operation
[INFO] [stdout] --> src/d17.rs:42:17
[INFO] [stdout] |
[INFO] [stdout] 42 | self.reg_a = self.reg_a / (1u32.shl(self.combo_of_x(arg)));
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_a /= (1u32.shl(self.combo_of_x(arg)))`
[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: manual implementation of an assign operation
[INFO] [stdout] --> src/d17.rs:46:17
[INFO] [stdout] |
[INFO] [stdout] 46 | self.reg_b = self.reg_b ^ arg;
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= arg`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of an assign operation
[INFO] [stdout] --> src/d17.rs:61:17
[INFO] [stdout] |
[INFO] [stdout] 61 | self.reg_b = self.reg_b ^ self.reg_c;
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= self.reg_c`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: manual implementation of an assign operation
[INFO] [stdout] --> src/d22.rs:71:13
[INFO] [stdout] |
[INFO] [stdout] 71 | *e = *e + v;
[INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `*e += v`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
[INFO] [stdout] --> src/d23.rs:35:5
[INFO] [stdout] |
[INFO] [stdout] 35 | / match map.get(s) {
[INFO] [stdout] 36 | | Some(n) => {
[INFO] [stdout] 37 | | for two in n {
[INFO] [stdout] 38 | | match map.get(two) {
[INFO] [stdout] ... |
[INFO] [stdout] 55 | | None => (),
[INFO] [stdout] 56 | | }
[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] 35 ~ if let Some(n) = map.get(s) {
[INFO] [stdout] 36 + for two in n {
[INFO] [stdout] 37 + match map.get(two) {
[INFO] [stdout] 38 + Some(m) => {
[INFO] [stdout] 39 + for three in m {
[INFO] [stdout] 40 + match map.get(three) {
[INFO] [stdout] 41 + Some(p) => {
[INFO] [stdout] 42 + if *three != *s && p.contains(s) {
[INFO] [stdout] 43 + sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 44 + }
[INFO] [stdout] 45 + }
[INFO] [stdout] 46 + None => (),
[INFO] [stdout] 47 + }
[INFO] [stdout] 48 + }
[INFO] [stdout] 49 + }
[INFO] [stdout] 50 + None => (),
[INFO] [stdout] 51 + }
[INFO] [stdout] 52 + }
[INFO] [stdout] 53 + }
[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/d23.rs:38:17
[INFO] [stdout] |
[INFO] [stdout] 38 | / match map.get(two) {
[INFO] [stdout] 39 | | Some(m) => {
[INFO] [stdout] 40 | | for three in m {
[INFO] [stdout] 41 | | match map.get(three) {
[INFO] [stdout] ... |
[INFO] [stdout] 51 | | None => (),
[INFO] [stdout] 52 | | }
[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] 38 ~ if let Some(m) = map.get(two) {
[INFO] [stdout] 39 + for three in m {
[INFO] [stdout] 40 + match map.get(three) {
[INFO] [stdout] 41 + Some(p) => {
[INFO] [stdout] 42 + if *three != *s && p.contains(s) {
[INFO] [stdout] 43 + sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 44 + }
[INFO] [stdout] 45 + }
[INFO] [stdout] 46 + None => (),
[INFO] [stdout] 47 + }
[INFO] [stdout] 48 + }
[INFO] [stdout] 49 + }
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this `if` can be collapsed into the outer `match`
[INFO] [stdout] --> src/d23.rs:43:37
[INFO] [stdout] |
[INFO] [stdout] 43 | / ... if *three != *s && p.contains(s) {
[INFO] [stdout] 44 | | ... sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 45 | | ... }
[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] help: collapse nested if block
[INFO] [stdout] |
[INFO] [stdout] 42 ~ Some(p)
[INFO] [stdout] 43 ~ if *three != *s && p.contains(s) => {
[INFO] [stdout] 44 | sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 45 ~ }
[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/d23.rs:41:29
[INFO] [stdout] |
[INFO] [stdout] 41 | / ... match map.get(three) {
[INFO] [stdout] 42 | | ... Some(p) => {
[INFO] [stdout] 43 | | ... if *three != *s && p.contains(s) {
[INFO] [stdout] 44 | | ... sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] ... |
[INFO] [stdout] 47 | | ... None => (),
[INFO] [stdout] 48 | | ... }
[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] 41 ~ if let Some(p) = map.get(three) {
[INFO] [stdout] 42 + if *three != *s && p.contains(s) {
[INFO] [stdout] 43 + sols.push((s.clone(), two.clone(), three.clone()));
[INFO] [stdout] 44 + }
[INFO] [stdout] 45 + }
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: you are using an explicit closure for cloning elements
[INFO] [stdout] --> src/d23.rs:113:21
[INFO] [stdout] |
[INFO] [stdout] 113 | let mut comps = clique.iter().map(|s| s.clone()).collect::>();
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `clique.iter().cloned()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
[INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler
[INFO] [stdout] --> src/d23.rs:136:43
[INFO] [stdout] |
[INFO] [stdout] 136 | let to_try = comps.difference(&c).collect::>();
[INFO] [stdout] | ^^ help: change this to: `c`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: length comparison to zero
[INFO] [stdout] --> src/d23.rs:147:12
[INFO] [stdout] |
[INFO] [stdout] 147 | if cliquesn.len() == 0 {
[INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `cliquesn.is_empty()`
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do
[INFO] [stdout] --> src/d24.rs:88:15
[INFO] [stdout] |
[INFO] [stdout] 88 | fn eval(name: &String, env: &mut HashMap) -> u128 {
[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] 88 ~ fn eval(name: &str, env: &mut HashMap) -> u128 {
[INFO] [stdout] 89 | use Exp::*;
[INFO] [stdout] 90 ~ let exp = env.entry(name.to_owned()).or_insert(Const(0)).clone();
[INFO] [stdout] 91 | match exp {
[INFO] [stdout] ...
[INFO] [stdout] 94 | let v = eval(&e1, env) & eval(&e2, env);
[INFO] [stdout] 95 ~ let entry = env.entry(name.to_owned()).or_insert(Const(0));
[INFO] [stdout] 96 | *entry = Const(v);
[INFO] [stdout] ...
[INFO] [stdout] 100 | let v = eval(&e1, env) ^ eval(&e2, env);
[INFO] [stdout] 101 ~ let entry = env.entry(name.to_owned()).or_insert(Const(0));
[INFO] [stdout] 102 | *entry = Const(v);
[INFO] [stdout] ...
[INFO] [stdout] 106 | let v = eval(&e1, env) | eval(&e2, env);
[INFO] [stdout] 107 ~ let entry = env.entry(name.to_owned()).or_insert(Const(0));
[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/d25.rs:33:23
[INFO] [stdout] |
[INFO] [stdout] 33 | fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 33 - fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] 33 + fn lock_key_fit(lock: &[i32], key: &Vec) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
[INFO] [stdout] --> src/d25.rs:33:39
[INFO] [stdout] |
[INFO] [stdout] 33 | fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] | ^^^^^^^^^
[INFO] [stdout] |
[INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
[INFO] [stdout] help: change this to
[INFO] [stdout] |
[INFO] [stdout] 33 - fn lock_key_fit(lock: &Vec, key: &Vec) -> bool {
[INFO] [stdout] 33 + fn lock_key_fit(lock: &Vec, key: &[i32]) -> bool {
[INFO] [stdout] |
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.75s
[INFO] running `Command { std: "docker" "inspect" "525787d0f3b1242881d772d656eb1017803af81a4698ccba51896673b5af2e93", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "525787d0f3b1242881d772d656eb1017803af81a4698ccba51896673b5af2e93", kill_on_drop: false }`
[INFO] [stdout] 525787d0f3b1242881d772d656eb1017803af81a4698ccba51896673b5af2e93