[INFO] cloning repository https://github.com/benjfield/advent-of-code-2018-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/benjfield/advent-of-code-2018-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenjfield%2Fadvent-of-code-2018-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenjfield%2Fadvent-of-code-2018-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f78b684ab5c6eb3d7d1ebba7d9c0e91e17ef8285 [INFO] linting benjfield/advent-of-code-2018-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenjfield%2Fadvent-of-code-2018-rust" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-0-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/benjfield/advent-of-code-2018-rust [INFO] finished tweaking git repo https://github.com/benjfield/advent-of-code-2018-rust [INFO] tweaked toml for git repo https://github.com/benjfield/advent-of-code-2018-rust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/benjfield/advent-of-code-2018-rust on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/benjfield/advent-of-code-2018-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded mintex v0.1.2 [INFO] [stderr] Downloaded tinyjson v2.5.1 [INFO] [stderr] Downloaded dhat v0.3.2 [INFO] [stderr] Downloaded sys-info v0.9.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e581e7e92105fe2e6fe8f20bcf371745a1136de8aa72da4520c48a2daa78468d [INFO] running `Command { std: "docker" "start" "-a" "e581e7e92105fe2e6fe8f20bcf371745a1136de8aa72da4520c48a2daa78468d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e581e7e92105fe2e6fe8f20bcf371745a1136de8aa72da4520c48a2daa78468d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e581e7e92105fe2e6fe8f20bcf371745a1136de8aa72da4520c48a2daa78468d", kill_on_drop: false }` [INFO] [stdout] e581e7e92105fe2e6fe8f20bcf371745a1136de8aa72da4520c48a2daa78468d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 33657bbda005a9ee03f455e2a8ff91764e2ee280ba088c9517b3c8ad87810c8c [INFO] running `Command { std: "docker" "start" "-a" "33657bbda005a9ee03f455e2a8ff91764e2ee280ba088c9517b3c8ad87810c8c", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Checking regex-syntax v0.8.3 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking tinyjson v2.5.1 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-automata v0.4.6 [INFO] [stderr] Checking regex v1.10.4 [INFO] [stderr] Checking advent_of_code v0.11.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/template/readme_benchmarks.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | Parser(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 12 - Parser(String), [INFO] [stdout] 12 + Parser(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/template/readme_benchmarks.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | IO(io::Error), [INFO] [stdout] | -- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 13 - IO(io::Error), [INFO] [stdout] 13 + IO(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/template/run_multi.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | IO(io::Error), [INFO] [stdout] | -- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 52 - IO(io::Error), [INFO] [stdout] 52 + IO(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/template/commands/scaffold.rs:17:36 [INFO] [stdout] | [INFO] [stdout] 17 | OpenOptions::new().write(true).create(true).open(path) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/template/runner.rs:61:28 [INFO] [stdout] | [INFO] [stdout] 61 | let bench_iterations = cmp::min( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 62 | | 10000, [INFO] [stdout] 63 | | cmp::max( [INFO] [stdout] 64 | | Duration::from_secs(1).as_nanos() / cmp::max(base_time.as_nanos(), 10), [INFO] [stdout] 65 | | 10, [INFO] [stdout] 66 | | ), [INFO] [stdout] 67 | | ); [INFO] [stdout] | |_____^ help: replace with clamp: `(Duration::from_secs(1).as_nanos() / cmp::max(base_time.as_nanos(), 10)).clamp(10, 10000)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/run_multi.rs:172:26 [INFO] [stdout] | [INFO] [stdout] 172 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 173 | | .split(" samples)") [INFO] [stdout] 174 | | .next()? [INFO] [stdout] 175 | | .split('(') [INFO] [stdout] 176 | | .last()? [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 176 - .last()? [INFO] [stdout] 176 + .next_back()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 61 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/template/readme_benchmarks.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | Parser(String), [INFO] [stdout] | ------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 12 - Parser(String), [INFO] [stdout] 12 + Parser(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/template/readme_benchmarks.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | IO(io::Error), [INFO] [stdout] | -- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 13 - IO(io::Error), [INFO] [stdout] 13 + IO(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/template/run_multi.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | IO(io::Error), [INFO] [stdout] | -- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 52 - IO(io::Error), [INFO] [stdout] 52 + IO(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: file opened with `create`, but `truncate` behavior not defined [INFO] [stdout] --> src/template/commands/scaffold.rs:17:36 [INFO] [stdout] | [INFO] [stdout] 17 | OpenOptions::new().write(true).create(true).open(path) [INFO] [stdout] | ^^^^^^^^^^^^- help: add: `.truncate(true)` [INFO] [stdout] | [INFO] [stdout] = help: if you intend to overwrite an existing file entirely, call `.truncate(true)` [INFO] [stdout] = help: if you instead know that you may want to keep some parts of the old file, call `.truncate(false)` [INFO] [stdout] = help: alternatively, use `.append(true)` to append to the file instead of overwriting it [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options [INFO] [stdout] = note: `#[warn(clippy::suspicious_open_options)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/template/runner.rs:61:28 [INFO] [stdout] | [INFO] [stdout] 61 | let bench_iterations = cmp::min( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 62 | | 10000, [INFO] [stdout] 63 | | cmp::max( [INFO] [stdout] 64 | | Duration::from_secs(1).as_nanos() / cmp::max(base_time.as_nanos(), 10), [INFO] [stdout] 65 | | 10, [INFO] [stdout] 66 | | ), [INFO] [stdout] 67 | | ); [INFO] [stdout] | |_____^ help: replace with clamp: `(Duration::from_secs(1).as_nanos() / cmp::max(base_time.as_nanos(), 10)).clamp(10, 10000)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/08.rs:68:14 [INFO] [stdout] | [INFO] [stdout] 68 | (NavNode{children: children, metadata: metadata}, &remaining_numbers_list[metadata_entries_size..]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `children` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/08.rs:68:34 [INFO] [stdout] | [INFO] [stdout] 68 | (NavNode{children: children, metadata: metadata}, &remaining_numbers_list[metadata_entries_size..]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `metadata` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/bin/08.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/08.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | if self.children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.children.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: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/run_multi.rs:172:26 [INFO] [stdout] | [INFO] [stdout] 172 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 173 | | .split(" samples)") [INFO] [stdout] 174 | | .next()? [INFO] [stdout] 175 | | .split('(') [INFO] [stdout] 176 | | .last()? [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 176 - .last()? [INFO] [stdout] 176 + .next_back()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/08.rs:68:14 [INFO] [stdout] | [INFO] [stdout] 68 | (NavNode{children: children, metadata: metadata}, &remaining_numbers_list[metadata_entries_size..]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `children` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:21:26 [INFO] [stdout] | [INFO] [stdout] 21 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 21 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 21 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 21 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 21 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | if !capture.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `capture.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `capture` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/12.rs:41:46 [INFO] [stdout] | [INFO] [stdout] 40 | if !capture.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 41 | let (_, [pattern, result]) = capture.unwrap().extract(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 66 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 66 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:66:48 [INFO] [stdout] | [INFO] [stdout] 66 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 66 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 66 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/12.rs:94:6 [INFO] [stdout] | [INFO] [stdout] 94 | .fold( [INFO] [stdout] | ______^ [INFO] [stdout] 95 | | 0, [INFO] [stdout] 96 | | |total, value| { [INFO] [stdout] 97 | | total + value [INFO] [stdout] 98 | | } [INFO] [stdout] 99 | | ); [INFO] [stdout] | |_____^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:118:26 [INFO] [stdout] | [INFO] [stdout] 118 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 118 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 118 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:118:44 [INFO] [stdout] | [INFO] [stdout] 118 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 118 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 118 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:137:16 [INFO] [stdout] | [INFO] [stdout] 137 | if !capture.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `capture.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `capture` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/12.rs:138:46 [INFO] [stdout] | [INFO] [stdout] 137 | if !capture.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 138 | let (_, [pattern, result]) = capture.unwrap().extract(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/08.rs:68:34 [INFO] [stdout] | [INFO] [stdout] 68 | (NavNode{children: children, metadata: metadata}, &remaining_numbers_list[metadata_entries_size..]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `metadata` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 61 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 61 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:167:30 [INFO] [stdout] | [INFO] [stdout] 167 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 167 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 167 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:167:48 [INFO] [stdout] | [INFO] [stdout] 167 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 167 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 167 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/12.rs:194:10 [INFO] [stdout] | [INFO] [stdout] 194 | .fold( [INFO] [stdout] | __________^ [INFO] [stdout] 195 | | 0, [INFO] [stdout] 196 | | |total, value| { [INFO] [stdout] 197 | | total + value [INFO] [stdout] 198 | | } [INFO] [stdout] 199 | | ); [INFO] [stdout] | |_________^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:15:23 [INFO] [stdout] | [INFO] [stdout] 15 | marbles.push_back(0 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | marbles.push_front(1 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `1_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/09.rs:18:32 [INFO] [stdout] | [INFO] [stdout] 18 | let mut scores: Vec = iter::repeat(0).take(total_number_of_players as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, total_number_of_players as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:57:23 [INFO] [stdout] | [INFO] [stdout] 57 | marbles.push_back(0 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:58:24 [INFO] [stdout] | [INFO] [stdout] 58 | marbles.push_front(1 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `1_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/09.rs:60:32 [INFO] [stdout] | [INFO] [stdout] 60 | let mut scores: Vec = iter::repeat(0).take(total_number_of_players as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, total_number_of_players as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if this_preceding_steps.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `this_preceding_steps.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/bin/07.rs:48:11 [INFO] [stdout] | [INFO] [stdout] 48 | while next_steps.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!next_steps.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: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | if this_preceding_steps.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `this_preceding_steps.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: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:134:66 [INFO] [stdout] | [INFO] [stdout] 134 | while (worker_queue.len() as u32) < number_of_workers && next_steps.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!next_steps.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: consider using `sort_by_key` [INFO] [stdout] --> src/bin/07.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | worker_queue.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 - worker_queue.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 142 + worker_queue.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:147:15 [INFO] [stdout] | [INFO] [stdout] 147 | while worker_queue.len() > 0 && worker_queue.last().unwrap().1 == current_time { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!worker_queue.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: methods `size` and `remainders_after_rectangle_removal` are never used [INFO] [stdout] --> src/bin/03.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 21 | impl Rectangle { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 22 | fn size(self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn remainders_after_rectangle_removal(self, rectangle_to_remove: Rectangle) -> 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: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | if this_preceding_steps.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `this_preceding_steps.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/bin/07.rs:48:11 [INFO] [stdout] | [INFO] [stdout] 48 | while next_steps.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!next_steps.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: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:126:12 [INFO] [stdout] | [INFO] [stdout] 126 | if this_preceding_steps.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `this_preceding_steps.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: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:134:66 [INFO] [stdout] | [INFO] [stdout] 134 | while (worker_queue.len() as u32) < number_of_workers && next_steps.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!next_steps.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: consider using `sort_by_key` [INFO] [stdout] --> src/bin/07.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | worker_queue.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 - worker_queue.sort_by(|a, b| b.1.cmp(&a.1)); [INFO] [stdout] 142 + worker_queue.sort_by_key(|b| std::cmp::Reverse(b.1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/07.rs:147:15 [INFO] [stdout] | [INFO] [stdout] 147 | while worker_queue.len() > 0 && worker_queue.last().unwrap().1 == current_time { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!worker_queue.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: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:21:26 [INFO] [stdout] | [INFO] [stdout] 21 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 21 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 21 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 21 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 21 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | if !capture.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `capture.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `capture` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/12.rs:41:46 [INFO] [stdout] | [INFO] [stdout] 40 | if !capture.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 41 | let (_, [pattern, result]) = capture.unwrap().extract(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 66 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 66 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:66:48 [INFO] [stdout] | [INFO] [stdout] 66 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 66 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 66 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/12.rs:94:6 [INFO] [stdout] | [INFO] [stdout] 94 | .fold( [INFO] [stdout] | ______^ [INFO] [stdout] 95 | | 0, [INFO] [stdout] 96 | | |total, value| { [INFO] [stdout] 97 | | total + value [INFO] [stdout] 98 | | } [INFO] [stdout] 99 | | ); [INFO] [stdout] | |_____^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:118:26 [INFO] [stdout] | [INFO] [stdout] 118 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 118 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 118 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:118:44 [INFO] [stdout] | [INFO] [stdout] 118 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 118 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 118 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:137:16 [INFO] [stdout] | [INFO] [stdout] 137 | if !capture.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `capture.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `capture` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/12.rs:138:46 [INFO] [stdout] | [INFO] [stdout] 137 | if !capture.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 138 | let (_, [pattern, result]) = capture.unwrap().extract(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:167:30 [INFO] [stdout] | [INFO] [stdout] 167 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 167 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 167 + (HashSet::new(), i32::MAX, i32::min_value()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/bin/12.rs:167:48 [INFO] [stdout] | [INFO] [stdout] 167 | (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 167 - (HashSet::new(), i32::max_value(), i32::min_value()), [INFO] [stdout] 167 + (HashSet::new(), i32::max_value(), i32::MIN), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/12.rs:194:10 [INFO] [stdout] | [INFO] [stdout] 194 | .fold( [INFO] [stdout] | __________^ [INFO] [stdout] 195 | | 0, [INFO] [stdout] 196 | | |total, value| { [INFO] [stdout] 197 | | total + value [INFO] [stdout] 198 | | } [INFO] [stdout] 199 | | ); [INFO] [stdout] | |_________^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | fn tick(lights: &mut Vec<(i32, i32, i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn tick(lights: &mut Vec<(i32, i32, i32, i32)>) { [INFO] [stdout] 24 + fn tick(lights: &mut [(i32, i32, i32, i32)]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | fn generate_bounds(lights: &Vec<(i32, i32, i32, i32)>) -> (i32, i32, i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 - fn generate_bounds(lights: &Vec<(i32, i32, i32, i32)>) -> (i32, i32, i32, i32) { [INFO] [stdout] 31 + fn generate_bounds(lights: &[(i32, i32, i32, i32)]) -> (i32, i32, i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/10.rs:58:72 [INFO] [stdout] | [INFO] [stdout] 58 | fn generate_size_bounds_and_set(lights: &Vec<(i32, i32, i32, i32)>) -> (i64, (i32, i32, i32, i32), HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/10.rs:79:17 [INFO] [stdout] | [INFO] [stdout] 79 | row_string.push_str("#"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `row_string.push('#')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/10.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | row_string.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `row_string.push('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> src/bin/08.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/08.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | if self.children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.children.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: called `unwrap` on `start_value_option` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/05.rs:13:31 [INFO] [stdout] | [INFO] [stdout] 10 | if start_value_option.is_none() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = start_value_option` [INFO] [stdout] ... [INFO] [stdout] 13 | let start_value = start_value_option.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: length comparison to zero [INFO] [stdout] --> src/bin/05.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | while add_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!add_stack.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: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/bin/05.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | ... if !(add_value.to_ascii_lowercase() == start_value.to_ascii_lowercase() && add_value.is_ascii_lowercase() != start_value.is_as... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 14 - if !(add_value.to_ascii_lowercase() == start_value.to_ascii_lowercase() && add_value.is_ascii_lowercase() != start_value.is_ascii_lowercase()) { [INFO] [stdout] 14 + if !(add_value.eq_ignore_ascii_case(&start_value) && add_value.is_ascii_lowercase() != start_value.is_ascii_lowercase()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/05.rs:27:6 [INFO] [stdout] | [INFO] [stdout] 27 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/05.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/bin/05.rs:88:10 [INFO] [stdout] | [INFO] [stdout] 88 | Some(best_letter_count as u32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `best_letter_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `start_value_option` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/05.rs:13:31 [INFO] [stdout] | [INFO] [stdout] 10 | if start_value_option.is_none() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = start_value_option` [INFO] [stdout] ... [INFO] [stdout] 13 | let start_value = start_value_option.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: length comparison to zero [INFO] [stdout] --> src/bin/05.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | while add_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!add_stack.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: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/bin/05.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | ... if !(add_value.to_ascii_lowercase() == start_value.to_ascii_lowercase() && add_value.is_ascii_lowercase() != start_value.is_as... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 14 - if !(add_value.to_ascii_lowercase() == start_value.to_ascii_lowercase() && add_value.is_ascii_lowercase() != start_value.is_ascii_lowercase()) { [INFO] [stdout] 14 + if !(add_value.eq_ignore_ascii_case(&start_value) && add_value.is_ascii_lowercase() != start_value.is_ascii_lowercase()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/05.rs:27:6 [INFO] [stdout] | [INFO] [stdout] 27 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/05.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/bin/05.rs:88:10 [INFO] [stdout] | [INFO] [stdout] 88 | Some(best_letter_count as u32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `best_letter_count` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/bin/11.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | let mut power_level = (rack_id * y + serial_number) * &rack_id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `rack_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/11.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | if !a.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `a.is_some()` [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/bin/11.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if !d.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `d.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/11.rs:61:16 [INFO] [stdout] | [INFO] [stdout] 61 | if !b.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `b.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/11.rs:66:16 [INFO] [stdout] | [INFO] [stdout] 66 | if !c.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `a` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:52:37 [INFO] [stdout] | [INFO] [stdout] 51 | if !a.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 52 | this_power_level += a.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `d` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:57:37 [INFO] [stdout] | [INFO] [stdout] 56 | if !d.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 57 | this_power_level += d.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `b` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 61 | if !b.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 62 | this_power_level -= b.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `c` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:67:37 [INFO] [stdout] | [INFO] [stdout] 66 | if !c.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 67 | this_power_level -= c.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:92:36 [INFO] [stdout] | [INFO] [stdout] 92 | let answer = format!("{},{}", x.to_string(), y.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:92:51 [INFO] [stdout] | [INFO] [stdout] 92 | let answer = format!("{},{}", x.to_string(), y.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:126:39 [INFO] [stdout] | [INFO] [stdout] 126 | let answer = format!("{},{},{}", x.to_string(), y.to_string(), size.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:126:54 [INFO] [stdout] | [INFO] [stdout] 126 | let answer = format!("{},{},{}", x.to_string(), y.to_string(), size.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:126:72 [INFO] [stdout] | [INFO] [stdout] 126 | let answer = format!("{},{},{}", x.to_string(), y.to_string(), size.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:15:23 [INFO] [stdout] | [INFO] [stdout] 15 | marbles.push_back(0 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | marbles.push_front(1 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `1_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/09.rs:18:32 [INFO] [stdout] | [INFO] [stdout] 18 | let mut scores: Vec = iter::repeat(0).take(total_number_of_players as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, total_number_of_players as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:57:23 [INFO] [stdout] | [INFO] [stdout] 57 | marbles.push_back(0 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/09.rs:58:24 [INFO] [stdout] | [INFO] [stdout] 58 | marbles.push_front(1 as u32); [INFO] [stdout] | ^^^^^^^^ help: try: `1_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/09.rs:60:32 [INFO] [stdout] | [INFO] [stdout] 60 | let mut scores: Vec = iter::repeat(0).take(total_number_of_players as usize).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, total_number_of_players as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/bin/11.rs:7:27 [INFO] [stdout] | [INFO] [stdout] 7 | let mut power_level = (rack_id * y + serial_number) * &rack_id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `rack_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/11.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | if !a.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `a.is_some()` [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/bin/11.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if !d.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `d.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/11.rs:61:16 [INFO] [stdout] | [INFO] [stdout] 61 | if !b.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `b.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/11.rs:66:16 [INFO] [stdout] | [INFO] [stdout] 66 | if !c.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `a` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:52:37 [INFO] [stdout] | [INFO] [stdout] 51 | if !a.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 52 | this_power_level += a.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `d` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:57:37 [INFO] [stdout] | [INFO] [stdout] 56 | if !d.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 57 | this_power_level += d.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `b` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 61 | if !b.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 62 | this_power_level -= b.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `c` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/11.rs:67:37 [INFO] [stdout] | [INFO] [stdout] 66 | if !c.is_none() { [INFO] [stdout] | ----------- the check is happening here [INFO] [stdout] 67 | this_power_level -= c.unwrap() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:92:36 [INFO] [stdout] | [INFO] [stdout] 92 | let answer = format!("{},{}", x.to_string(), y.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:92:51 [INFO] [stdout] | [INFO] [stdout] 92 | let answer = format!("{},{}", x.to_string(), y.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:126:39 [INFO] [stdout] | [INFO] [stdout] 126 | let answer = format!("{},{},{}", x.to_string(), y.to_string(), size.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:126:54 [INFO] [stdout] | [INFO] [stdout] 126 | let answer = format!("{},{},{}", x.to_string(), y.to_string(), size.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/bin/11.rs:126:72 [INFO] [stdout] | [INFO] [stdout] 126 | let answer = format!("{},{},{}", x.to_string(), y.to_string(), size.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `size` and `remainders_after_rectangle_removal` are never used [INFO] [stdout] --> src/bin/03.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 21 | impl Rectangle { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 22 | fn size(self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn remainders_after_rectangle_removal(self, rectangle_to_remove: Rectangle) -> 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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | fn tick(lights: &mut Vec<(i32, i32, i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn tick(lights: &mut Vec<(i32, i32, i32, i32)>) { [INFO] [stdout] 24 + fn tick(lights: &mut [(i32, i32, i32, i32)]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | fn generate_bounds(lights: &Vec<(i32, i32, i32, i32)>) -> (i32, i32, i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 31 - fn generate_bounds(lights: &Vec<(i32, i32, i32, i32)>) -> (i32, i32, i32, i32) { [INFO] [stdout] 31 + fn generate_bounds(lights: &[(i32, i32, i32, i32)]) -> (i32, i32, i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/10.rs:58:72 [INFO] [stdout] | [INFO] [stdout] 58 | fn generate_size_bounds_and_set(lights: &Vec<(i32, i32, i32, i32)>) -> (i64, (i32, i32, i32, i32), HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/10.rs:79:17 [INFO] [stdout] | [INFO] [stdout] 79 | row_string.push_str("#"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `row_string.push('#')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/10.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | row_string.push_str("."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `row_string.push('.')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.68s [INFO] running `Command { std: "docker" "inspect" "33657bbda005a9ee03f455e2a8ff91764e2ee280ba088c9517b3c8ad87810c8c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "33657bbda005a9ee03f455e2a8ff91764e2ee280ba088c9517b3c8ad87810c8c", kill_on_drop: false }` [INFO] [stdout] 33657bbda005a9ee03f455e2a8ff91764e2ee280ba088c9517b3c8ad87810c8c