[INFO] cloning repository https://github.com/flurie/aoc-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/flurie/aoc-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflurie%2Faoc-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflurie%2Faoc-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7db9d078440390e8c49fffdca13c197b2bb3faab [INFO] linting flurie/aoc-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflurie%2Faoc-rust" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-2-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/flurie/aoc-rust [INFO] finished tweaking git repo https://github.com/flurie/aoc-rust [INFO] tweaked toml for git repo https://github.com/flurie/aoc-rust written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/flurie/aoc-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/flurie/aoc-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-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 62f777dab713408f82dba0c28dc6c541276c0ef6a4f730de503d0c91adbeaed4 [INFO] running `Command { std: "docker" "start" "-a" "62f777dab713408f82dba0c28dc6c541276c0ef6a4f730de503d0c91adbeaed4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "62f777dab713408f82dba0c28dc6c541276c0ef6a4f730de503d0c91adbeaed4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "62f777dab713408f82dba0c28dc6c541276c0ef6a4f730de503d0c91adbeaed4", kill_on_drop: false }` [INFO] [stdout] 62f777dab713408f82dba0c28dc6c541276c0ef6a4f730de503d0c91adbeaed4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 434dd332989e189b0c29f081e91510dcad626deb5e2d03e586a86b5531f41c0f [INFO] running `Command { std: "docker" "start" "-a" "434dd332989e189b0c29f081e91510dcad626deb5e2d03e586a86b5531f41c0f", kill_on_drop: false }` [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking advent_of_code v0.9.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/commands/all.rs:170:26 [INFO] [stdout] | [INFO] [stdout] 170 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 171 | | .split(" samples)") [INFO] [stdout] 172 | | .next()? [INFO] [stdout] 173 | | .split('(') [INFO] [stdout] 174 | | .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] 174 - .last()? [INFO] [stdout] 174 + .next_back()? [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:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | 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:54:28 [INFO] [stdout] | [INFO] [stdout] 54 | let bench_iterations = cmp::min( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 55 | | 10000, [INFO] [stdout] 56 | | cmp::max( [INFO] [stdout] 57 | | Duration::from_secs(1).as_nanos() / cmp::max(base_time.as_nanos(), 10), [INFO] [stdout] 58 | | 10, [INFO] [stdout] 59 | | ), [INFO] [stdout] 60 | | ); [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/commands/all.rs:170:26 [INFO] [stdout] | [INFO] [stdout] 170 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 171 | | .split(" samples)") [INFO] [stdout] 172 | | .next()? [INFO] [stdout] 173 | | .split('(') [INFO] [stdout] 174 | | .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] 174 - .last()? [INFO] [stdout] 174 + .next_back()? [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:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | 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:54:28 [INFO] [stdout] | [INFO] [stdout] 54 | let bench_iterations = cmp::min( [INFO] [stdout] | ____________________________^ [INFO] [stdout] 55 | | 10000, [INFO] [stdout] 56 | | cmp::max( [INFO] [stdout] 57 | | Duration::from_secs(1).as_nanos() / cmp::max(base_time.as_nanos(), 10), [INFO] [stdout] 58 | | 10, [INFO] [stdout] 59 | | ), [INFO] [stdout] 60 | | ); [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bin/06.rs:51:38 [INFO] [stdout] | [INFO] [stdout] 51 | let button = but.clone() as u64; [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `but` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bin/06.rs:82:38 [INFO] [stdout] | [INFO] [stdout] 82 | let button = but.clone() as u64; [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `but` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/bin/03.rs:27:36 [INFO] [stdout] | [INFO] [stdout] 27 | let b = [l.as_bytes(), &[b'.', b'.', b'.']].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `b"..."` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/bin/03.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / (self.x_start..self.x_end + 1) [INFO] [stdout] 14 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(self.x_start..self.x_end + 1)` [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::str::Lines<'_>` [INFO] [stdout] --> src/bin/03.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | s.lines().into_iter().enumerate().for_each(|(y, l)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `s.lines()` [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 `unwrap` on `part` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/03.rs:69:32 [INFO] [stdout] | [INFO] [stdout] 68 | if part.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = part` [INFO] [stdout] 69 | parts.push(part.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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/bin/03.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | let part = match w { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 36 | | &[i, j, k] [INFO] [stdout] 37 | | if i.is_ascii_digit() && j.is_ascii_digit() && k.is_ascii_digit() => [INFO] [stdout] ... | [INFO] [stdout] 66 | | _ => None, [INFO] [stdout] 67 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 35 ~ let part = match *w { [INFO] [stdout] 36 ~ [i, j, k] [INFO] [stdout] 37 | if i.is_ascii_digit() && j.is_ascii_digit() && k.is_ascii_digit() => [INFO] [stdout] ... [INFO] [stdout] 45 | } [INFO] [stdout] 46 ~ [i, j, _] [INFO] [stdout] 47 | if i.is_ascii_digit() [INFO] [stdout] ... [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ [i, _, _] if i.is_ascii_digit() && (x_val > last_x_end || y_val > last_y) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/03.rs:105:41 [INFO] [stdout] | [INFO] [stdout] 105 | _ if !b.is_ascii_digit() && !(b == &b'.') => Kind::Symbol, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(b != &b'.')` [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/03.rs:114:41 [INFO] [stdout] | [INFO] [stdout] 114 | _ if !b.is_ascii_digit() && !(b == &b'.') => Kind::Symbol, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(b != &b'.')` [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: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/bin/03.rs:126:17 [INFO] [stdout] | [INFO] [stdout] 126 | let f = s [INFO] [stdout] | _________________^ [INFO] [stdout] 127 | | .lines() [INFO] [stdout] 128 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 126 ~ let f = s [INFO] [stdout] 127 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/03.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | .map(|b| Elem::from_byte(b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Elem::from_byte` [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: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/bin/03.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 140 | let f = s [INFO] [stdout] | _________________^ [INFO] [stdout] 141 | | .lines() [INFO] [stdout] 142 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 140 ~ let f = s [INFO] [stdout] 141 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `xs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `ys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Filter, {closure@src/bin/03.rs:175:21: 175:31}>` [INFO] [stdout] --> src/bin/03.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / cross [INFO] [stdout] 174 | | .into_iter() [INFO] [stdout] 175 | | .filter(|(xs, ys)| xs >= &0 && ys >= &0) [INFO] [stdout] 176 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 173 ~ cross [INFO] [stdout] 174 + .into_iter() [INFO] [stdout] 175 + .filter(|(xs, ys)| xs >= &0 && ys >= &0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:191:37 [INFO] [stdout] | [INFO] [stdout] 191 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `xs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:191:49 [INFO] [stdout] | [INFO] [stdout] 191 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `ys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/bin/03.rs:212:10 [INFO] [stdout] | [INFO] [stdout] 212 | .filter_map(|part| { [INFO] [stdout] | __________^ [INFO] [stdout] 213 | | if part [INFO] [stdout] 214 | | .coords() [INFO] [stdout] 215 | | .into_iter() [INFO] [stdout] ... | [INFO] [stdout] 222 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/bin/02.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, u32}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/02.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | .map(|p| Play::from_string(p)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Play::from_string` [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: importing legacy numeric constants [INFO] [stdout] --> src/bin/02.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, u32}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/bin/03.rs:27:36 [INFO] [stdout] | [INFO] [stdout] 27 | let b = [l.as_bytes(), &[b'.', b'.', b'.']].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `b"..."` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/02.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | .map(|p| Play::from_string(p)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Play::from_string` [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: can be more succinctly written as a byte str [INFO] [stdout] --> src/bin/01.rs:21:43 [INFO] [stdout] | [INFO] [stdout] 21 | let chars = [line.as_bytes(), &[b'z', b'z', b'z', b'z']].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b"zzzz"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/bin/05.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | to.clone() [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `to` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/05.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 132 | let lo = h2lo.translate(h); [INFO] [stdout] | --------------------------- unnecessary `let` binding [INFO] [stdout] 133 | lo [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 132 ~ [INFO] [stdout] 133 ~ h2lo.translate(h) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/05.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 174 | let lo = h2lo.translate(h); [INFO] [stdout] | --------------------------- unnecessary `let` binding [INFO] [stdout] 175 | lo [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 174 ~ [INFO] [stdout] 175 ~ h2lo.translate(h) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bin/06.rs:51:38 [INFO] [stdout] | [INFO] [stdout] 51 | let button = but.clone() as u64; [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `but` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/bin/06.rs:82:38 [INFO] [stdout] | [INFO] [stdout] 82 | let button = but.clone() as u64; [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `but` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: can be more succinctly written as a byte str [INFO] [stdout] --> src/bin/01.rs:21:43 [INFO] [stdout] | [INFO] [stdout] 21 | let chars = [line.as_bytes(), &[b'z', b'z', b'z', b'z']].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `b"zzzz"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices [INFO] [stdout] = note: `#[warn(clippy::byte_char_slices)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/04.rs:54:14 [INFO] [stdout] | [INFO] [stdout] 54 | .map(|l| Game::from_string(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Game::from_string` [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: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/04.rs:59:15 [INFO] [stdout] | [INFO] [stdout] 59 | .fold(0 as u32, |acc, (i, g)| { [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/04.rs:66:59 [INFO] [stdout] | [INFO] [stdout] 66 | let total = (it + 1..it + score + 1).fold(1 as u32, |r_acc, e| { [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/04.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | let new_i = cards_for.get(&e).unwrap_or(&0).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*cards_for.get(&e).unwrap_or(&0)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/07.rs:32:37 [INFO] [stdout] | [INFO] [stdout] 32 | counts.sort_by(|a, b| b.cmp(&a)); [INFO] [stdout] | ^^ help: change this to: `a` [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] --> src/bin/07.rs:32:37 [INFO] [stdout] | [INFO] [stdout] 32 | counts.sort_by(|a, b| b.cmp(&a)); [INFO] [stdout] | ^^ help: change this to: `a` [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: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/bin/05.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | to.clone() [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `to` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/05.rs:133:13 [INFO] [stdout] | [INFO] [stdout] 132 | let lo = h2lo.translate(h); [INFO] [stdout] | --------------------------- unnecessary `let` binding [INFO] [stdout] 133 | lo [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 132 ~ [INFO] [stdout] 133 ~ h2lo.translate(h) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/05.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 174 | let lo = h2lo.translate(h); [INFO] [stdout] | --------------------------- unnecessary `let` binding [INFO] [stdout] 175 | lo [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 174 ~ [INFO] [stdout] 175 ~ h2lo.translate(h) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/bin/03.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / (self.x_start..self.x_end + 1) [INFO] [stdout] 14 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(self.x_start..self.x_end + 1)` [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::str::Lines<'_>` [INFO] [stdout] --> src/bin/03.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | s.lines().into_iter().enumerate().for_each(|(y, l)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `s.lines()` [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 `unwrap` on `part` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/03.rs:69:32 [INFO] [stdout] | [INFO] [stdout] 68 | if part.is_some() { [INFO] [stdout] | ----------------- help: try: `if let Some() = part` [INFO] [stdout] 69 | parts.push(part.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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/bin/03.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | let part = match w { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 36 | | &[i, j, k] [INFO] [stdout] 37 | | if i.is_ascii_digit() && j.is_ascii_digit() && k.is_ascii_digit() => [INFO] [stdout] ... | [INFO] [stdout] 66 | | _ => None, [INFO] [stdout] 67 | | }; [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 35 ~ let part = match *w { [INFO] [stdout] 36 ~ [i, j, k] [INFO] [stdout] 37 | if i.is_ascii_digit() && j.is_ascii_digit() && k.is_ascii_digit() => [INFO] [stdout] ... [INFO] [stdout] 45 | } [INFO] [stdout] 46 ~ [i, j, _] [INFO] [stdout] 47 | if i.is_ascii_digit() [INFO] [stdout] ... [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ [i, _, _] if i.is_ascii_digit() && (x_val > last_x_end || y_val > last_y) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/03.rs:105:41 [INFO] [stdout] | [INFO] [stdout] 105 | _ if !b.is_ascii_digit() && !(b == &b'.') => Kind::Symbol, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(b != &b'.')` [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/03.rs:114:41 [INFO] [stdout] | [INFO] [stdout] 114 | _ if !b.is_ascii_digit() && !(b == &b'.') => Kind::Symbol, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(b != &b'.')` [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: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/bin/03.rs:126:17 [INFO] [stdout] | [INFO] [stdout] 126 | let f = s [INFO] [stdout] | _________________^ [INFO] [stdout] 127 | | .lines() [INFO] [stdout] 128 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 126 ~ let f = s [INFO] [stdout] 127 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/03.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | .map(|b| Elem::from_byte(b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Elem::from_byte` [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: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/bin/03.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 140 | let f = s [INFO] [stdout] | _________________^ [INFO] [stdout] 141 | | .lines() [INFO] [stdout] 142 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 140 ~ let f = s [INFO] [stdout] 141 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:170:37 [INFO] [stdout] | [INFO] [stdout] 170 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `xs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:170:49 [INFO] [stdout] | [INFO] [stdout] 170 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `ys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Filter, {closure@src/bin/03.rs:175:21: 175:31}>` [INFO] [stdout] --> src/bin/03.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | / cross [INFO] [stdout] 174 | | .into_iter() [INFO] [stdout] 175 | | .filter(|(xs, ys)| xs >= &0 && ys >= &0) [INFO] [stdout] 176 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 173 ~ cross [INFO] [stdout] 174 + .into_iter() [INFO] [stdout] 175 + .filter(|(xs, ys)| xs >= &0 && ys >= &0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:191:37 [INFO] [stdout] | [INFO] [stdout] 191 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `xs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/03.rs:191:49 [INFO] [stdout] | [INFO] [stdout] 191 | .map(move |xs| (xs.clone(), ys.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `ys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/bin/03.rs:212:10 [INFO] [stdout] | [INFO] [stdout] 212 | .filter_map(|part| { [INFO] [stdout] | __________^ [INFO] [stdout] 213 | | if part [INFO] [stdout] 214 | | .coords() [INFO] [stdout] 215 | | .into_iter() [INFO] [stdout] ... | [INFO] [stdout] 222 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/bin/09.rs:27:24 [INFO] [stdout] | [INFO] [stdout] 27 | let last_val = diff_tmp.clone().last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*diff_tmp.clone().last().unwrap()` [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: redundant closure [INFO] [stdout] --> src/bin/04.rs:54:14 [INFO] [stdout] | [INFO] [stdout] 54 | .map(|l| Game::from_string(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Game::from_string` [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: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/04.rs:59:15 [INFO] [stdout] | [INFO] [stdout] 59 | .fold(0 as u32, |acc, (i, g)| { [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: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/bin/09.rs:27:24 [INFO] [stdout] | [INFO] [stdout] 27 | let last_val = diff_tmp.clone().last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*diff_tmp.clone().last().unwrap()` [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: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/bin/04.rs:66:59 [INFO] [stdout] | [INFO] [stdout] 66 | let total = (it + 1..it + score + 1).fold(1 as u32, |r_acc, e| { [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: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/bin/04.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | let new_i = cards_for.get(&e).unwrap_or(&0).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*cards_for.get(&e).unwrap_or(&0)` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.04s [INFO] running `Command { std: "docker" "inspect" "434dd332989e189b0c29f081e91510dcad626deb5e2d03e586a86b5531f41c0f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "434dd332989e189b0c29f081e91510dcad626deb5e2d03e586a86b5531f41c0f", kill_on_drop: false }` [INFO] [stdout] 434dd332989e189b0c29f081e91510dcad626deb5e2d03e586a86b5531f41c0f