[INFO] cloning repository https://github.com/scott113341/advent_of_code_2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/scott113341/advent_of_code_2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fscott113341%2Fadvent_of_code_2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fscott113341%2Fadvent_of_code_2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 567cecc3add67b3778c0eff3ac7623e67afef404 [INFO] linting scott113341/advent_of_code_2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fscott113341%2Fadvent_of_code_2021" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/scott113341/advent_of_code_2021 [INFO] finished tweaking git repo https://github.com/scott113341/advent_of_code_2021 [INFO] tweaked toml for git repo https://github.com/scott113341/advent_of_code_2021 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/scott113341/advent_of_code_2021 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/scott113341/advent_of_code_2021 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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 9801bce6670d6b87b412faeb9370c17891a75da8f7577d7a0e0be0c8d7933560 [INFO] running `Command { std: "docker" "start" "-a" "9801bce6670d6b87b412faeb9370c17891a75da8f7577d7a0e0be0c8d7933560", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9801bce6670d6b87b412faeb9370c17891a75da8f7577d7a0e0be0c8d7933560", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9801bce6670d6b87b412faeb9370c17891a75da8f7577d7a0e0be0c8d7933560", kill_on_drop: false }` [INFO] [stdout] 9801bce6670d6b87b412faeb9370c17891a75da8f7577d7a0e0be0c8d7933560 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] b57714c5c5ef7554920c20eb0cf3968c4f71e8929270e1acf28274b020a9ec01 [INFO] running `Command { std: "docker" "start" "-a" "b57714c5c5ef7554920c20eb0cf3968c4f71e8929270e1acf28274b020a9ec01", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Checking aho-corasick v0.7.19 [INFO] [stderr] Checking day_07 v0.1.0 (/opt/rustwide/workdir/day_07) [INFO] [stderr] Checking day_10 v0.1.0 (/opt/rustwide/workdir/day_10) [INFO] [stderr] Checking day_01 v0.1.0 (/opt/rustwide/workdir/day_01) [INFO] [stderr] Checking day_03 v0.1.0 (/opt/rustwide/workdir/day_03) [INFO] [stderr] Checking day_04 v0.1.0 (/opt/rustwide/workdir/day_04) [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day_03/src/data.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | gr = gr << 1; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `gr <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_09 v0.1.0 (/opt/rustwide/workdir/day_09) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day_03/src/data.rs:90:46 [INFO] [stdout] | [INFO] [stdout] 90 | KeepLeastCommonTiebreakerZero => !(zero_count <= one_count) as u32, // 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(zero_count > one_count)` [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: useless conversion to the same type: `u32` [INFO] [stdout] --> day_03/src/main.rs:28:26 [INFO] [stdout] | [INFO] [stdout] 28 | let mask = 2_u32.pow(bits.into()) - 1; [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_13 v0.1.0 (/opt/rustwide/workdir/day_13) [INFO] [stderr] Checking day_15 v0.1.0 (/opt/rustwide/workdir/day_15) [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day_03/src/data.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | gr = gr << 1; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `gr <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day_03/src/data.rs:90:46 [INFO] [stdout] | [INFO] [stdout] 90 | KeepLeastCommonTiebreakerZero => !(zero_count <= one_count) as u32, // 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(zero_count > one_count)` [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: useless conversion to the same type: `u32` [INFO] [stdout] --> day_03/src/main.rs:28:26 [INFO] [stdout] | [INFO] [stdout] 28 | let mask = 2_u32.pow(bits.into()) - 1; [INFO] [stdout] | ^^^^^^^^^^^ help: consider removing `.into()`: `bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_04/src/data.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn parse_numbers_to_call(lines: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1 - pub fn parse_numbers_to_call(lines: &Vec) -> Vec { [INFO] [stdout] 1 + pub fn parse_numbers_to_call(lines: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_04/src/data.rs:10:28 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn parse_boards(lines: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 10 - pub fn parse_boards(lines: &Vec) -> Vec { [INFO] [stdout] 10 + pub fn parse_boards(lines: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04/src/data.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | assert_eq!(board.mark_number(n), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 114 - assert_eq!(board.mark_number(n), false); [INFO] [stdout] 114 + assert!(!board.mark_number(n)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_04/src/data.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | assert_eq!(board.mark_number(24), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 118 - assert_eq!(board.mark_number(24), true); [INFO] [stdout] 118 + assert!(board.mark_number(24)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day_04/src/main.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|b| RefCell::new(b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RefCell::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> day_09/src/main.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | .fold(1, |total, size| total * size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [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: using `.clone()` on a double reference, which returns `&data::Coord` instead of cloning the inner type [INFO] [stdout] --> day_09/src/data.rs:46:41 [INFO] [stdout] | [INFO] [stdout] 46 | counted.insert(coord.clone()); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_15/src/data.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn new(lines: &Vec) -> Cave { [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] 17 - pub fn new(lines: &Vec) -> Cave { [INFO] [stdout] 17 + pub fn new(lines: &[String]) -> Cave { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> day_15/src/data.rs:65:10 [INFO] [stdout] | [INFO] [stdout] 65 | .filter_map(|e| e) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | self.get(&up).and_then(|risk| Some((up, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&up).map(|risk| (up, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | self.get(&down).and_then(|risk| Some((down, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&down).map(|risk| (down, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | self.get(&left).and_then(|risk| Some((left, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&left).map(|risk| (left, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_12 v0.1.0 (/opt/rustwide/workdir/day_12) [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | self.get(&right).and_then(|risk| Some((right, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&right).map(|risk| (right, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_02 v0.1.0 (/opt/rustwide/workdir/day_02) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_15/src/data.rs:85:43 [INFO] [stdout] | [INFO] [stdout] 85 | if visited_nodes.contains_key(&end_node) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `end_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@day_15/src/main.rs:35:39: 35:42}>` [INFO] [stdout] --> day_15/src/main.rs:35:22 [INFO] [stdout] | [INFO] [stdout] 35 | let digits = line.chars().map(|c| c.to_digit(10).unwrap()).into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.chars().map(|c| c.to_digit(10).unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@day_15/src/main.rs:51:43: 51:46}>` [INFO] [stdout] --> day_15/src/main.rs:51:26 [INFO] [stdout] | [INFO] [stdout] 51 | let digits = line.chars().map(|c| c.to_digit(10).unwrap()).into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.chars().map(|c| c.to_digit(10).unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_04/src/data.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn parse_numbers_to_call(lines: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1 - pub fn parse_numbers_to_call(lines: &Vec) -> Vec { [INFO] [stdout] 1 + pub fn parse_numbers_to_call(lines: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_06 v0.1.0 (/opt/rustwide/workdir/day_06) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_04/src/data.rs:10:28 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn parse_boards(lines: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 10 - pub fn parse_boards(lines: &Vec) -> Vec { [INFO] [stdout] 10 + pub fn parse_boards(lines: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_13/src/data.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn new(lines: &Vec) -> Paper { [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] 42 - pub fn new(lines: &Vec) -> Paper { [INFO] [stdout] 42 + pub fn new(lines: &[String]) -> Paper { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day_04/src/main.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|b| RefCell::new(b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RefCell::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_13/src/data.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn new(lines: &Vec) -> Paper { [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] 42 - pub fn new(lines: &Vec) -> Paper { [INFO] [stdout] 42 + pub fn new(lines: &[String]) -> Paper { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_08 v0.1.0 (/opt/rustwide/workdir/day_08) [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> day_12/src/data.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn cave<'a>(&self, name: impl Into) -> &Cave { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> day_12/src/data.rs:33:27 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn adjacent_caves<'a>(&self, name: impl Into) -> Vec<&Cave> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_05 v0.1.0 (/opt/rustwide/workdir/day_05) [INFO] [stderr] Checking day_14 v0.1.0 (/opt/rustwide/workdir/day_14) [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> day_12/src/data.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | / if cave.is_small && path.contains(cave) { [INFO] [stdout] 50 | | false [INFO] [stdout] 51 | | } else { [INFO] [stdout] 52 | | true [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `!(cave.is_small && path.contains(cave))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12/src/main.rs:19:32 [INFO] [stdout] | [INFO] [stdout] 19 | part_1_paths(&cave_system, &start, vec![start.clone()]).len() [INFO] [stdout] | ^^^^^^ help: change this to: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12/src/main.rs:25:32 [INFO] [stdout] | [INFO] [stdout] 25 | part_2_paths(&cave_system, &start, vec![start.clone()]).len() [INFO] [stdout] | ^^^^^^ help: change this to: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day_15/src/data.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn new(lines: &Vec) -> Cave { [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] 17 - pub fn new(lines: &Vec) -> Cave { [INFO] [stdout] 17 + pub fn new(lines: &[String]) -> Cave { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> day_15/src/data.rs:65:10 [INFO] [stdout] | [INFO] [stdout] 65 | .filter_map(|e| e) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | self.get(&up).and_then(|risk| Some((up, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&up).map(|risk| (up, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | self.get(&down).and_then(|risk| Some((down, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&down).map(|risk| (down, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | self.get(&left).and_then(|risk| Some((left, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&left).map(|risk| (left, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> day_15/src/data.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | self.get(&right).and_then(|risk| Some((right, risk))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get(&right).map(|risk| (right, risk))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_15/src/data.rs:85:43 [INFO] [stdout] | [INFO] [stdout] 85 | if visited_nodes.contains_key(&end_node) { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `end_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@day_15/src/main.rs:35:39: 35:42}>` [INFO] [stdout] --> day_15/src/main.rs:35:22 [INFO] [stdout] | [INFO] [stdout] 35 | let digits = line.chars().map(|c| c.to_digit(10).unwrap()).into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.chars().map(|c| c.to_digit(10).unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@day_15/src/main.rs:51:43: 51:46}>` [INFO] [stdout] --> day_15/src/main.rs:51:26 [INFO] [stdout] | [INFO] [stdout] 51 | let digits = line.chars().map(|c| c.to_digit(10).unwrap()).into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.chars().map(|c| c.to_digit(10).unwrap())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_06/src/main.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | fish_state.skip(79).next().unwrap().fish_count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(79)` [INFO] [stdout] | [INFO] [stdout] help: for this change `fish_state` has to be mutable [INFO] [stdout] --> day_06/src/main.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let fish_state: FishState = initial_fish.into(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_06/src/main.rs:22:15 [INFO] [stdout] | [INFO] [stdout] 22 | fish_state.skip(255).next().unwrap().fish_count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(255)` [INFO] [stdout] | [INFO] [stdout] help: for this change `fish_state` has to be mutable [INFO] [stdout] --> day_06/src/main.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let fish_state: FishState = initial_fish.into(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> day_08/src/data.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 142 | pub struct Solution { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[char; 7]` which implements the `Copy` trait [INFO] [stdout] --> day_08/src/data.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | / self.segments [INFO] [stdout] 171 | | .clone() [INFO] [stdout] | |____________________^ help: try removing the `clone` call: `self.segments` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day_14/src/data.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | .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: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_06/src/main.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | fish_state.skip(79).next().unwrap().fish_count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(79)` [INFO] [stdout] | [INFO] [stdout] help: for this change `fish_state` has to be mutable [INFO] [stdout] --> day_06/src/main.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let fish_state: FishState = initial_fish.into(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> day_06/src/main.rs:22:15 [INFO] [stdout] | [INFO] [stdout] 22 | fish_state.skip(255).next().unwrap().fish_count() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(255)` [INFO] [stdout] | [INFO] [stdout] help: for this change `fish_state` has to be mutable [INFO] [stdout] --> day_06/src/main.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let fish_state: FishState = initial_fish.into(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day_14/src/data.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | .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] [stderr] Checking day_11 v0.1.0 (/opt/rustwide/workdir/day_11) [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_11/src/input/mod.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|line| { [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | line.chars() [INFO] [stdout] 9 | | .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 10 | | .collect::>() [INFO] [stdout] 11 | | }) [INFO] [stdout] 12 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 7 ~ .flat_map(|line| { [INFO] [stdout] 8 + line.chars() [INFO] [stdout] 9 + .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 10 + .collect::>() [INFO] [stdout] 11 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_11/src/input/mod.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | .map(|line| { [INFO] [stdout] | __________^ [INFO] [stdout] 24 | | line.chars() [INFO] [stdout] 25 | | .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 26 | | .collect::>() [INFO] [stdout] 27 | | }) [INFO] [stdout] 28 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 23 ~ .flat_map(|line| { [INFO] [stdout] 24 + line.chars() [INFO] [stdout] 25 + .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 26 + .collect::>() [INFO] [stdout] 27 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> day_09/src/main.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | .fold(1, |total, size| total * size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [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: using `.clone()` on a double reference, which returns `&data::Coord` instead of cloning the inner type [INFO] [stdout] --> day_09/src/data.rs:46:41 [INFO] [stdout] | [INFO] [stdout] 46 | counted.insert(coord.clone()); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> day_08/src/data.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 142 | pub struct Solution { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[char; 7]` which implements the `Copy` trait [INFO] [stdout] --> day_08/src/data.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | / self.segments [INFO] [stdout] 171 | | .clone() [INFO] [stdout] | |____________________^ help: try removing the `clone` call: `self.segments` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_11/src/input/mod.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|line| { [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | line.chars() [INFO] [stdout] 9 | | .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 10 | | .collect::>() [INFO] [stdout] 11 | | }) [INFO] [stdout] 12 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 7 ~ .flat_map(|line| { [INFO] [stdout] 8 + line.chars() [INFO] [stdout] 9 + .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 10 + .collect::>() [INFO] [stdout] 11 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> day_11/src/input/mod.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | .map(|line| { [INFO] [stdout] | __________^ [INFO] [stdout] 24 | | line.chars() [INFO] [stdout] 25 | | .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 26 | | .collect::>() [INFO] [stdout] 27 | | }) [INFO] [stdout] 28 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 23 ~ .flat_map(|line| { [INFO] [stdout] 24 + line.chars() [INFO] [stdout] 25 + .map(|c| c.to_digit(10).unwrap() as usize) [INFO] [stdout] 26 + .collect::>() [INFO] [stdout] 27 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> day_12/src/data.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn cave<'a>(&self, name: impl Into) -> &Cave { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> day_12/src/data.rs:33:27 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn adjacent_caves<'a>(&self, name: impl Into) -> Vec<&Cave> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> day_12/src/data.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | / if cave.is_small && path.contains(cave) { [INFO] [stdout] 50 | | false [INFO] [stdout] 51 | | } else { [INFO] [stdout] 52 | | true [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `!(cave.is_small && path.contains(cave))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12/src/main.rs:19:32 [INFO] [stdout] | [INFO] [stdout] 19 | part_1_paths(&cave_system, &start, vec![start.clone()]).len() [INFO] [stdout] | ^^^^^^ help: change this to: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day_12/src/main.rs:25:32 [INFO] [stdout] | [INFO] [stdout] 25 | part_2_paths(&cave_system, &start, vec![start.clone()]).len() [INFO] [stdout] | ^^^^^^ help: change this to: `start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking regex v1.6.0 [INFO] [stderr] Checking day_17 v0.1.0 (/opt/rustwide/workdir/day_17) [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_17/src/data.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | assert_eq!(pat.in_target_area(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 128 - assert_eq!(pat.in_target_area(), false); [INFO] [stdout] 128 + assert!(!pat.in_target_area()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> day_17/src/data.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | assert_eq!(pat.in_target_area(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 131 - assert_eq!(pat.in_target_area(), true); [INFO] [stdout] 131 + assert!(pat.in_target_area()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.18s [INFO] running `Command { std: "docker" "inspect" "b57714c5c5ef7554920c20eb0cf3968c4f71e8929270e1acf28274b020a9ec01", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b57714c5c5ef7554920c20eb0cf3968c4f71e8929270e1acf28274b020a9ec01", kill_on_drop: false }` [INFO] [stdout] b57714c5c5ef7554920c20eb0cf3968c4f71e8929270e1acf28274b020a9ec01