[INFO] cloning repository https://github.com/gillett-hernandez/minesweeper_rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/gillett-hernandez/minesweeper_rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgillett-hernandez%2Fminesweeper_rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgillett-hernandez%2Fminesweeper_rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] cce6a5792dec36526f858d86acc3b9db2d6047ee [INFO] linting gillett-hernandez/minesweeper_rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgillett-hernandez%2Fminesweeper_rs" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/gillett-hernandez/minesweeper_rs [INFO] finished tweaking git repo https://github.com/gillett-hernandez/minesweeper_rs [INFO] tweaked toml for git repo https://github.com/gillett-hernandez/minesweeper_rs written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/gillett-hernandez/minesweeper_rs 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/gillett-hernandez/minesweeper_rs already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded crossbeam-utils v0.8.5 [INFO] [stderr] Downloaded unidiff v0.3.3 [INFO] [stderr] Downloaded cmake v0.1.45 [INFO] [stderr] Downloaded structopt v0.3.22 [INFO] [stderr] Downloaded xkb v0.2.1 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.5 [INFO] [stderr] Downloaded xkbcommon-sys v0.7.5 [INFO] [stderr] Downloaded minifb v0.19.3 [INFO] [stderr] Downloaded structopt-derive v0.4.15 [INFO] [stderr] Downloaded syn v1.0.73 [INFO] [stderr] Downloaded tar v0.4.35 [INFO] [stderr] Downloaded libc v0.2.98 [INFO] [stderr] Downloaded nom v6.2.1 [INFO] [stderr] Downloaded orbclient v0.3.31 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 7c02e6833f92467869d2728f8be321cd2e64ec2fbc1fa98549d9b8d85291e1f2 [INFO] running `Command { std: "docker" "start" "-a" "7c02e6833f92467869d2728f8be321cd2e64ec2fbc1fa98549d9b8d85291e1f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7c02e6833f92467869d2728f8be321cd2e64ec2fbc1fa98549d9b8d85291e1f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7c02e6833f92467869d2728f8be321cd2e64ec2fbc1fa98549d9b8d85291e1f2", kill_on_drop: false }` [INFO] [stdout] 7c02e6833f92467869d2728f8be321cd2e64ec2fbc1fa98549d9b8d85291e1f2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 3292a8f4a3e908c42f79e7dbcce7064482d9038db98c16d03cf28155f0a4bd79 [INFO] running `Command { std: "docker" "start" "-a" "3292a8f4a3e908c42f79e7dbcce7064482d9038db98c16d03cf28155f0a4bd79", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.98 [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Compiling proc-macro2 v1.0.27 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling pkg-config v0.3.19 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling crossbeam-utils v0.8.5 [INFO] [stderr] Compiling xml-rs v0.8.3 [INFO] [stderr] Compiling glob v0.3.0 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling memoffset v0.6.4 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling unicode-width v0.1.8 [INFO] [stderr] Compiling libloading v0.7.0 [INFO] [stderr] Compiling humantime v2.1.0 [INFO] [stderr] Compiling termcolor v1.1.2 [INFO] [stderr] Compiling textwrap v0.11.0 [INFO] [stderr] Compiling ansi_term v0.11.0 [INFO] [stderr] Compiling vec_map v0.8.2 [INFO] [stderr] Compiling strsim v0.8.0 [INFO] [stderr] Compiling bindgen v0.56.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling nom v5.1.2 [INFO] [stderr] Compiling nom v6.2.1 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Compiling maybe-uninit v2.0.0 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling rayon-core v1.9.1 [INFO] [stderr] Compiling clang-sys v1.2.0 [INFO] [stderr] Compiling syn v1.0.73 [INFO] [stderr] Compiling aho-corasick v0.7.15 [INFO] [stderr] Compiling wayland-sys v0.28.6 [INFO] [stderr] Compiling x11-dl v2.18.5 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling cc v1.0.69 [INFO] [stderr] Compiling unicode-segmentation v1.8.0 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Compiling rayon v1.5.1 [INFO] [stderr] Checking once_cell v1.8.0 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Checking smallvec v1.6.1 [INFO] [stderr] Checking downcast-rs v1.2.0 [INFO] [stderr] Checking scopeguard v1.1.0 [INFO] [stderr] Checking ppv-lite86 v0.2.10 [INFO] [stderr] Compiling wayland-scanner v0.28.6 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Checking nix v0.20.0 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling which v3.1.1 [INFO] [stderr] Compiling clap v2.33.3 [INFO] [stderr] Compiling regex v1.4.6 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking crossbeam-deque v0.8.0 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Compiling minifb v0.19.3 [INFO] [stderr] Checking crossbeam-channel v0.5.1 [INFO] [stderr] Checking remove_dir_all v0.5.3 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking raw-window-handle v0.3.3 [INFO] [stderr] Compiling wayland-client v0.28.6 [INFO] [stderr] Compiling env_logger v0.8.4 [INFO] [stderr] Compiling wayland-protocols v0.28.6 [INFO] [stderr] Checking tempfile v3.2.0 [INFO] [stderr] Checking xcursor v0.3.3 [INFO] [stderr] Compiling cexpr v0.4.0 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking wayland-commons v0.28.6 [INFO] [stderr] Compiling structopt-derive v0.4.15 [INFO] [stderr] Checking structopt v0.3.22 [INFO] [stderr] Checking wayland-cursor v0.28.6 [INFO] [stderr] Compiling xkbcommon-sys v0.7.5 [INFO] [stderr] Checking xkb v0.2.1 [INFO] [stderr] Checking minesweeper_rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/lib.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | drop(last); [INFO] [stdout] | ^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut usize` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 31 - drop(last); [INFO] [stdout] 31 + let _ = last; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let mut combination_iterator = CombinationIterator::new(10, 3); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/lib.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | drop(last); [INFO] [stdout] | ^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut usize` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 31 - drop(last); [INFO] [stdout] 31 + let _ = last; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/lib.rs:72:26 [INFO] [stdout] | [INFO] [stdout] 72 | assert!(count == 10 * 9 * 8 / 3 / 2 / 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(10 * 9 * 8 / 3 / 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lib.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | let groups = vec![0; 3]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/lib.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | drop(last); [INFO] [stdout] | ^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut usize` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 31 - drop(last); [INFO] [stdout] 31 + let _ = last; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Borrow` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | borrow::Borrow, [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 imports: `KeyRepeat`, `MouseButton`, and `MouseMode` [INFO] [stdout] --> src/main.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | use minifb::{Key, KeyRepeat, MouseButton, MouseMode, Scale, Window, WindowOptions}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found module declaration for lib.rs [INFO] [stdout] --> src/main.rs:12:1 [INFO] [stdout] | [INFO] [stdout] 12 | mod lib; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: lib.rs is the root of this crate's library target [INFO] [stdout] = help: to refer to it from other targets, use the library's name as the path [INFO] [stdout] = note: `#[warn(special_module_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Borrow` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | borrow::Borrow, [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 imports: `KeyRepeat`, `MouseButton`, and `MouseMode` [INFO] [stdout] --> src/main.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 6 | use minifb::{Key, KeyRepeat, MouseButton, MouseMode, Scale, Window, WindowOptions}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bomb` [INFO] [stdout] --> src/game.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | for bomb in 0..num_bombs { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_bomb` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/game.rs:180:21 [INFO] [stdout] | [INFO] [stdout] 180 | let mut click_neighbors = false; [INFO] [stdout] | ----^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cell2` [INFO] [stdout] --> src/game.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | for (i, (cell1, cell2)) in self.field.iter().zip(hypothetical.field.iter()).enumerate() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_cell2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/lib.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let mut combination_iterator = CombinationIterator::new(10, 3); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solver.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | let mut suggested_cell = Event::None; [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `suggested_cell` [INFO] [stdout] --> src/solver.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | let mut suggested_cell = Event::None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_suggested_cell` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:315:30 [INFO] [stdout] | [INFO] [stdout] 315 | for (i, cell) in unknown_cells.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/main.rs:336:45 [INFO] [stdout] | [INFO] [stdout] 336 | histogram.par_iter_mut().for_each(|(k, v)| *v += 1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `event` is never read [INFO] [stdout] --> src/main.rs:150:21 [INFO] [stdout] | [INFO] [stdout] 150 | let mut event = Event::None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/lib.rs:72:26 [INFO] [stdout] | [INFO] [stdout] 72 | assert!(count == 10 * 9 * 8 / 3 / 2 / 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(10 * 9 * 8 / 3 / 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/solver.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | / let mut solvers: Vec> = Vec::new(); [INFO] [stdout] 232 | | solvers.push(Box::new(ExhaustedCellDetection { [INFO] [stdout] 233 | | initialized: false, [INFO] [stdout] 234 | | cells_of_interest: vec![], [INFO] [stdout] ... | [INFO] [stdout] 238 | | cells_of_interest: vec![], [INFO] [stdout] 239 | | })); [INFO] [stdout] | |____________^ help: consider using the `vec![]` macro: `let solvers: 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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/solver.rs:248:14 [INFO] [stdout] | [INFO] [stdout] 248 | .map(|solver| solver.attempt(game_state)) // attempt to solve with each strategy [INFO] [stdout] | ______________^ [INFO] [stdout] 249 | | .flatten() // flatten to a iterator of events [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|solver| solver.attempt(game_state))` [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] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/solver.rs:246:34 [INFO] [stdout] | [INFO] [stdout] 246 | let events: Vec = (&mut self.strategies) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.strategies` [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/solver.rs:265:27 [INFO] [stdout] | [INFO] [stdout] 265 | solver.update(&game_state, event); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `game_state` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | / match cell { [INFO] [stdout] 160 | | Cell { [INFO] [stdout] 161 | | visibility: CellVisibility::Unknown, [INFO] [stdout] 162 | | .. [INFO] [stdout] ... | [INFO] [stdout] 166 | | _ => {} [INFO] [stdout] 167 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 159 ~ if let Cell { [INFO] [stdout] 160 + visibility: CellVisibility::Unknown, [INFO] [stdout] 161 + .. [INFO] [stdout] 162 + } = cell { [INFO] [stdout] 163 + unknown_cells.push((x, y)); [INFO] [stdout] 164 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:182:11 [INFO] [stdout] | [INFO] [stdout] 182 | while ungrouped_cells.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ungrouped_cells.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:187:15 [INFO] [stdout] | [INFO] [stdout] 187 | while check_queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!check_queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/main.rs:192:18 [INFO] [stdout] | [INFO] [stdout] 192 | .map(|e| game_state.neighbors(e.0, e.1)) [INFO] [stdout] | __________________^ [INFO] [stdout] 193 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|e| game_state.neighbors(e.0, e.1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:201:21 [INFO] [stdout] | [INFO] [stdout] 201 | / match neighbor_cell.visibility { [INFO] [stdout] 202 | | CellVisibility::Unknown => { [INFO] [stdout] 203 | | groups[group_idx].insert(*neighbor); [INFO] [stdout] 204 | | check_queue.push(*neighbor); [INFO] [stdout] ... | [INFO] [stdout] 207 | | _ => {} [INFO] [stdout] 208 | | } [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] 201 ~ if neighbor_cell.visibility == CellVisibility::Unknown { [INFO] [stdout] 202 + groups[group_idx].insert(*neighbor); [INFO] [stdout] 203 + check_queue.push(*neighbor); [INFO] [stdout] 204 + ungrouped_cells.remove(neighbor); [INFO] [stdout] 205 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:214:12 [INFO] [stdout] | [INFO] [stdout] 214 | if ungrouped_cells.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ungrouped_cells.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: unneeded late initialization [INFO] [stdout] --> src/main.rs:235:5 [INFO] [stdout] | [INFO] [stdout] 235 | let iter: Box>>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `iter` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 235 ~ [INFO] [stdout] 236 ~ let iter: Box>> = if groups.len() == 1 { [INFO] [stdout] 237 ~ Box::new(empty_iter.iter().cloned()) [INFO] [stdout] 238 | } else { [INFO] [stdout] 239 ~ Box::new(CombinationIterator::new(remaining_mines, groups.len() - 1)) [INFO] [stdout] 240 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:325:17 [INFO] [stdout] | [INFO] [stdout] 325 | || HashMap::new(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:426:16 [INFO] [stdout] | [INFO] [stdout] 426 | if !(w.is_open() && !w.is_key_down(Key::Escape)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!w.is_open() || w.is_key_down(Key::Escape)` [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: unnecessary operation [INFO] [stdout] --> src/main.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | / &mut window [INFO] [stdout] 404 | | .as_mut() [INFO] [stdout] 405 | | .map(|w| w.limit_update_rate(Some(std::time::Duration::from_micros(frame_micros as u64)))); [INFO] [stdout] | |___________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] help: statement can be reduced to [INFO] [stdout] | [INFO] [stdout] 403 ~ window [INFO] [stdout] 404 + .as_mut() [INFO] [stdout] 405 + .map(|w| w.limit_update_rate(Some(std::time::Duration::from_micros(frame_micros as u64)))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:496:12 [INFO] [stdout] | [INFO] [stdout] 496 | if events.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `events.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: useless use of `vec!` [INFO] [stdout] --> src/lib.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | let groups = vec![0; 3]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | / &mut window [INFO] [stdout] 404 | | .as_mut() [INFO] [stdout] 405 | | .map(|w| w.limit_update_rate(Some(std::time::Duration::from_micros(frame_micros as u64)))); [INFO] [stdout] | |__________________________________________________________________________________________________^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 403 | let _ = &mut window [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/lib.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | drop(last); [INFO] [stdout] | ^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut usize` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 31 - drop(last); [INFO] [stdout] 31 + let _ = last; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bomb` [INFO] [stdout] --> src/game.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | for bomb in 0..num_bombs { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_bomb` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/game.rs:180:21 [INFO] [stdout] | [INFO] [stdout] 180 | let mut click_neighbors = false; [INFO] [stdout] | ----^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cell2` [INFO] [stdout] --> src/game.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | for (i, (cell1, cell2)) in self.field.iter().zip(hypothetical.field.iter()).enumerate() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_cell2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solver.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | let mut suggested_cell = Event::None; [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `suggested_cell` [INFO] [stdout] --> src/solver.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | let mut suggested_cell = Event::None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_suggested_cell` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:315:30 [INFO] [stdout] | [INFO] [stdout] 315 | for (i, cell) in unknown_cells.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/main.rs:336:45 [INFO] [stdout] | [INFO] [stdout] 336 | histogram.par_iter_mut().for_each(|(k, v)| *v += 1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `event` is never read [INFO] [stdout] --> src/main.rs:150:21 [INFO] [stdout] | [INFO] [stdout] 150 | let mut event = Event::None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/solver.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | / let mut solvers: Vec> = Vec::new(); [INFO] [stdout] 232 | | solvers.push(Box::new(ExhaustedCellDetection { [INFO] [stdout] 233 | | initialized: false, [INFO] [stdout] 234 | | cells_of_interest: vec![], [INFO] [stdout] ... | [INFO] [stdout] 238 | | cells_of_interest: vec![], [INFO] [stdout] 239 | | })); [INFO] [stdout] | |____________^ help: consider using the `vec![]` macro: `let solvers: 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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/solver.rs:248:14 [INFO] [stdout] | [INFO] [stdout] 248 | .map(|solver| solver.attempt(game_state)) // attempt to solve with each strategy [INFO] [stdout] | ______________^ [INFO] [stdout] 249 | | .flatten() // flatten to a iterator of events [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|solver| solver.attempt(game_state))` [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] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/solver.rs:246:34 [INFO] [stdout] | [INFO] [stdout] 246 | let events: Vec = (&mut self.strategies) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.strategies` [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/solver.rs:265:27 [INFO] [stdout] | [INFO] [stdout] 265 | solver.update(&game_state, event); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `game_state` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | / match cell { [INFO] [stdout] 160 | | Cell { [INFO] [stdout] 161 | | visibility: CellVisibility::Unknown, [INFO] [stdout] 162 | | .. [INFO] [stdout] ... | [INFO] [stdout] 166 | | _ => {} [INFO] [stdout] 167 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 159 ~ if let Cell { [INFO] [stdout] 160 + visibility: CellVisibility::Unknown, [INFO] [stdout] 161 + .. [INFO] [stdout] 162 + } = cell { [INFO] [stdout] 163 + unknown_cells.push((x, y)); [INFO] [stdout] 164 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:182:11 [INFO] [stdout] | [INFO] [stdout] 182 | while ungrouped_cells.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ungrouped_cells.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:187:15 [INFO] [stdout] | [INFO] [stdout] 187 | while check_queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!check_queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/main.rs:192:18 [INFO] [stdout] | [INFO] [stdout] 192 | .map(|e| game_state.neighbors(e.0, e.1)) [INFO] [stdout] | __________________^ [INFO] [stdout] 193 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|e| game_state.neighbors(e.0, e.1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:201:21 [INFO] [stdout] | [INFO] [stdout] 201 | / match neighbor_cell.visibility { [INFO] [stdout] 202 | | CellVisibility::Unknown => { [INFO] [stdout] 203 | | groups[group_idx].insert(*neighbor); [INFO] [stdout] 204 | | check_queue.push(*neighbor); [INFO] [stdout] ... | [INFO] [stdout] 207 | | _ => {} [INFO] [stdout] 208 | | } [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] 201 ~ if neighbor_cell.visibility == CellVisibility::Unknown { [INFO] [stdout] 202 + groups[group_idx].insert(*neighbor); [INFO] [stdout] 203 + check_queue.push(*neighbor); [INFO] [stdout] 204 + ungrouped_cells.remove(neighbor); [INFO] [stdout] 205 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:214:12 [INFO] [stdout] | [INFO] [stdout] 214 | if ungrouped_cells.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ungrouped_cells.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: unneeded late initialization [INFO] [stdout] --> src/main.rs:235:5 [INFO] [stdout] | [INFO] [stdout] 235 | let iter: Box>>; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `iter` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 235 ~ [INFO] [stdout] 236 ~ let iter: Box>> = if groups.len() == 1 { [INFO] [stdout] 237 ~ Box::new(empty_iter.iter().cloned()) [INFO] [stdout] 238 | } else { [INFO] [stdout] 239 ~ Box::new(CombinationIterator::new(remaining_mines, groups.len() - 1)) [INFO] [stdout] 240 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:325:17 [INFO] [stdout] | [INFO] [stdout] 325 | || HashMap::new(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `HashMap::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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:426:16 [INFO] [stdout] | [INFO] [stdout] 426 | if !(w.is_open() && !w.is_key_down(Key::Escape)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!w.is_open() || w.is_key_down(Key::Escape)` [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: unnecessary operation [INFO] [stdout] --> src/main.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | / &mut window [INFO] [stdout] 404 | | .as_mut() [INFO] [stdout] 405 | | .map(|w| w.limit_update_rate(Some(std::time::Duration::from_micros(frame_micros as u64)))); [INFO] [stdout] | |___________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] help: statement can be reduced to [INFO] [stdout] | [INFO] [stdout] 403 ~ window [INFO] [stdout] 404 + .as_mut() [INFO] [stdout] 405 + .map(|w| w.limit_update_rate(Some(std::time::Duration::from_micros(frame_micros as u64)))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:496:12 [INFO] [stdout] | [INFO] [stdout] 496 | if events.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `events.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/main.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | / &mut window [INFO] [stdout] 404 | | .as_mut() [INFO] [stdout] 405 | | .map(|w| w.limit_update_rate(Some(std::time::Duration::from_micros(frame_micros as u64)))); [INFO] [stdout] | |__________________________________________________________________________________________________^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 403 | let _ = &mut window [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing [INFO] [stdout] --> src/lib.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | drop(last); [INFO] [stdout] | ^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | argument has type `&mut usize` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dropping_references)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the expression or result [INFO] [stdout] | [INFO] [stdout] 31 - drop(last); [INFO] [stdout] 31 + let _ = last; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 51.20s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: nom v5.1.2, nom v6.2.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "3292a8f4a3e908c42f79e7dbcce7064482d9038db98c16d03cf28155f0a4bd79", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3292a8f4a3e908c42f79e7dbcce7064482d9038db98c16d03cf28155f0a4bd79", kill_on_drop: false }` [INFO] [stdout] 3292a8f4a3e908c42f79e7dbcce7064482d9038db98c16d03cf28155f0a4bd79