[INFO] cloning repository https://github.com/PatrykBukowski/aoc-2023-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/PatrykBukowski/aoc-2023-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPatrykBukowski%2Faoc-2023-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPatrykBukowski%2Faoc-2023-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 492ccf5aed3fea6774bca19dc9f628d736cb9d36 [INFO] linting PatrykBukowski/aoc-2023-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPatrykBukowski%2Faoc-2023-rust" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/PatrykBukowski/aoc-2023-rust [INFO] finished tweaking git repo https://github.com/PatrykBukowski/aoc-2023-rust [INFO] tweaked toml for git repo https://github.com/PatrykBukowski/aoc-2023-rust written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/PatrykBukowski/aoc-2023-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/PatrykBukowski/aoc-2023-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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9260ed41a70d9fcbd4af2f51e9bdf551e4e4542f66623b6dafe4940df11dadb0 [INFO] running `Command { std: "docker" "start" "-a" "9260ed41a70d9fcbd4af2f51e9bdf551e4e4542f66623b6dafe4940df11dadb0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9260ed41a70d9fcbd4af2f51e9bdf551e4e4542f66623b6dafe4940df11dadb0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9260ed41a70d9fcbd4af2f51e9bdf551e4e4542f66623b6dafe4940df11dadb0", kill_on_drop: false }` [INFO] [stdout] 9260ed41a70d9fcbd4af2f51e9bdf551e4e4542f66623b6dafe4940df11dadb0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6f9ca5129fdde9f93e88b6f786063480de43d6f4afd8c9e5aa2d3c6b9ee80cc4 [INFO] running `Command { std: "docker" "start" "-a" "6f9ca5129fdde9f93e88b6f786063480de43d6f4afd8c9e5aa2d3c6b9ee80cc4", kill_on_drop: false }` [INFO] [stderr] Checking aoc-2023-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `fmt::Error` [INFO] [stdout] --> src/day3_2.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{fmt::Error, fs::File, io::Read}; [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: `fmt::Error` [INFO] [stdout] --> src/day3_2.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{fmt::Error, fs::File, io::Read}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day1_1.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if element.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `element.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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/day1_1.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | if current_char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/day1_1.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / let mut result: Vec = Vec::new(); [INFO] [stdout] 35 | | result.push(values.first().unwrap_or(&String::new()).to_string()); [INFO] [stdout] 36 | | result.push(values.last().unwrap_or(&String::new()).to_string()); [INFO] [stdout] | |_____________________________________________________________________^ help: consider using the `vec![]` macro: `let result: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day1_2.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if element.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `element.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day1_2.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | / match value.find(el.v) { [INFO] [stdout] 59 | | Some(val) => ee.push((val, el.r)), [INFO] [stdout] 60 | | None => {} [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(val) = value.find(el.v) { ee.push((val, el.r)) }` [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] [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/day1_2.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match value.rfind(el.v) { [INFO] [stdout] 63 | | Some(val) => ee.push((val, el.r)), [INFO] [stdout] 64 | | None => {} [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(val) = value.rfind(el.v) { ee.push((val, el.r)) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/day1_2.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | ee.sort_by(|a, b| a.0.cmp(&b.0)); [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] 67 - ee.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 67 + ee.sort_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/day1_2.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | / let mut result: Vec = Vec::new(); [INFO] [stdout] 69 | | result.push(ee.first().unwrap_or(&(0, "")).1.to_string()); [INFO] [stdout] 70 | | result.push(ee.last().unwrap_or(&(0, "")).1.to_string()); [INFO] [stdout] | |_____________________________________________________________^ help: consider using the `vec![]` macro: `let result: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day2_1.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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/day1_1.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if element.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `element.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day2_1.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | fn get_value_from_string(value: &String) -> u16 { [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] 33 - fn get_value_from_string(value: &String) -> u16 { [INFO] [stdout] 33 + fn get_value_from_string(value: &str) -> u16 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/day1_1.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | if current_char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day2_2.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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/day2_2.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | fn get_value_from_string(value: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 33 - fn get_value_from_string(value: &String) -> u32 { [INFO] [stdout] 33 + fn get_value_from_string(value: &str) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/day1_1.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / let mut result: Vec = Vec::new(); [INFO] [stdout] 35 | | result.push(values.first().unwrap_or(&String::new()).to_string()); [INFO] [stdout] 36 | | result.push(values.last().unwrap_or(&String::new()).to_string()); [INFO] [stdout] | |_____________________________________________________________________^ help: consider using the `vec![]` macro: `let result: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day1_2.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if element.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `element.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day1_2.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | / match value.find(el.v) { [INFO] [stdout] 59 | | Some(val) => ee.push((val, el.r)), [INFO] [stdout] 60 | | None => {} [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(val) = value.find(el.v) { ee.push((val, el.r)) }` [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] [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/day1_2.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / match value.rfind(el.v) { [INFO] [stdout] 63 | | Some(val) => ee.push((val, el.r)), [INFO] [stdout] 64 | | None => {} [INFO] [stdout] 65 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(val) = value.rfind(el.v) { ee.push((val, el.r)) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/day1_2.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | ee.sort_by(|a, b| a.0.cmp(&b.0)); [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] 67 - ee.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 67 + ee.sort_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/day1_2.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | / let mut result: Vec = Vec::new(); [INFO] [stdout] 69 | | result.push(ee.first().unwrap_or(&(0, "")).1.to_string()); [INFO] [stdout] 70 | | result.push(ee.last().unwrap_or(&(0, "")).1.to_string()); [INFO] [stdout] | |_____________________________________________________________^ help: consider using the `vec![]` macro: `let result: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [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/day3_1.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | / match number.parse() { [INFO] [stdout] 17 | | Ok(value) => { [INFO] [stdout] 18 | | if is_around { [INFO] [stdout] 19 | | number_vec.push(value) [INFO] [stdout] ... | [INFO] [stdout] 22 | | Err(_) => {} [INFO] [stdout] 23 | | } [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] 16 ~ if let Ok(value) = number.parse() { [INFO] [stdout] 17 + if is_around { [INFO] [stdout] 18 + number_vec.push(value) [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day2_1.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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/day2_1.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | fn get_value_from_string(value: &String) -> u16 { [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] 33 - fn get_value_from_string(value: &String) -> u16 { [INFO] [stdout] 33 + fn get_value_from_string(value: &str) -> u16 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day2_2.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | if value.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `value.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/day2_2.rs:33:33 [INFO] [stdout] | [INFO] [stdout] 33 | fn get_value_from_string(value: &String) -> u32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 33 - fn get_value_from_string(value: &String) -> u32 { [INFO] [stdout] 33 + fn get_value_from_string(value: &str) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day3_2.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | .filter(|val| val.value.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!val.value.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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day3_2.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | .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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day3_1.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | / match number.parse() { [INFO] [stdout] 17 | | Ok(value) => { [INFO] [stdout] 18 | | if is_around { [INFO] [stdout] 19 | | number_vec.push(value) [INFO] [stdout] ... | [INFO] [stdout] 22 | | Err(_) => {} [INFO] [stdout] 23 | | } [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] 16 ~ if let Ok(value) = number.parse() { [INFO] [stdout] 17 + if is_around { [INFO] [stdout] 18 + number_vec.push(value) [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3_2.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 | | || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 | | || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 123 | | || (ax == bx && ay + 1 == by) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 123 - || (ax == bx && ay + 1 == by) [INFO] [stdout] 120 + !(ax - 1 != bx && ay + 1 != by || ax - 1 != bx && ax != bx || ay - 1 != by && ay != by && ay + 1 != by) [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 123 - || (ax == bx && ay + 1 == by) [INFO] [stdout] 120 + (ay + 1 == by || ay == by || ay - 1 == by) && (ax == bx || ax - 1 == bx) && (ay + 1 == by || ax - 1 == bx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3_2.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 | | || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 | | || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] | |_________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 120 + !(ax - 1 != bx || ay - 1 != by && ay != by && ay + 1 != by) [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 120 + (ay + 1 == by || ay == by || ay - 1 == by) && ax - 1 == bx [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3_2.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 | | || (ax - 1 == bx && ay == by) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 120 + !(ax - 1 != bx || ay - 1 != by && ay != by) [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 120 + (ay == by || ay - 1 == by) && ax - 1 == bx [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day3_2.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | .filter(|val| val.value.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!val.value.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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day3_2.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | .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 boolean expression can be simplified [INFO] [stdout] --> src/day3_2.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 | | || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 | | || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 123 | | || (ax == bx && ay + 1 == by) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 123 - || (ax == bx && ay + 1 == by) [INFO] [stdout] 120 + !(ax - 1 != bx && ay + 1 != by || ax - 1 != bx && ax != bx || ay - 1 != by && ay != by && ay + 1 != by) [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 123 - || (ax == bx && ay + 1 == by) [INFO] [stdout] 120 + (ay + 1 == by || ay == by || ay - 1 == by) && (ax == bx || ax - 1 == bx) && (ay + 1 == by || ax - 1 == bx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3_2.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 | | || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 | | || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] | |_________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 120 + !(ax - 1 != bx || ay - 1 != by && ay != by && ay + 1 != by) [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 122 - || (ax - 1 == bx && ay + 1 == by) [INFO] [stdout] 120 + (ay + 1 == by || ay == by || ay - 1 == by) && ax - 1 == bx [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day3_2.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 | | || (ax - 1 == bx && ay == by) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 120 + !(ax - 1 != bx || ay - 1 != by && ay != by) [INFO] [stdout] | [INFO] [stdout] 120 - (ax - 1 == bx && ay - 1 == by) [INFO] [stdout] 121 - || (ax - 1 == bx && ay == by) [INFO] [stdout] 120 + (ay == by || ay - 1 == by) && ax - 1 == bx [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s [INFO] running `Command { std: "docker" "inspect" "6f9ca5129fdde9f93e88b6f786063480de43d6f4afd8c9e5aa2d3c6b9ee80cc4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6f9ca5129fdde9f93e88b6f786063480de43d6f4afd8c9e5aa2d3c6b9ee80cc4", kill_on_drop: false }` [INFO] [stdout] 6f9ca5129fdde9f93e88b6f786063480de43d6f4afd8c9e5aa2d3c6b9ee80cc4