[INFO] cloning repository https://github.com/terry-u16/yukicoder_score_contest_5 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/terry-u16/yukicoder_score_contest_5" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fterry-u16%2Fyukicoder_score_contest_5", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fterry-u16%2Fyukicoder_score_contest_5'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c37cb7078f86bba1ae9b91bfc26b2adf943d1743 [INFO] linting terry-u16/yukicoder_score_contest_5 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fterry-u16%2Fyukicoder_score_contest_5" "/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/terry-u16/yukicoder_score_contest_5 [INFO] finished tweaking git repo https://github.com/terry-u16/yukicoder_score_contest_5 [INFO] tweaked toml for git repo https://github.com/terry-u16/yukicoder_score_contest_5 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/terry-u16/yukicoder_score_contest_5 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/terry-u16/yukicoder_score_contest_5 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-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] 30b01cedde134fdb50c8224888c1d1332f081a4cd6c318da502d34f7e8281f60 [INFO] running `Command { std: "docker" "start" "-a" "30b01cedde134fdb50c8224888c1d1332f081a4cd6c318da502d34f7e8281f60", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "30b01cedde134fdb50c8224888c1d1332f081a4cd6c318da502d34f7e8281f60", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "30b01cedde134fdb50c8224888c1d1332f081a4cd6c318da502d34f7e8281f60", kill_on_drop: false }` [INFO] [stdout] 30b01cedde134fdb50c8224888c1d1332f081a4cd6c318da502d34f7e8281f60 [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] de810a28af8821bb1b30b5113b3087fa7f0f966cf442c8d05b309f9b1e3e6a49 [INFO] running `Command { std: "docker" "start" "-a" "de810a28af8821bb1b30b5113b3087fa7f0f966cf442c8d05b309f9b1e3e6a49", kill_on_drop: false }` [INFO] [stderr] Checking yukicoder_score_contest_5 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/main.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/main.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:320:15 [INFO] [stdout] | [INFO] [stdout] 320 | fn get_action(input: &Input, state: &State, blueprint: &AnnealingState, turn: usize) -> Action { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:512:21 [INFO] [stdout] | [INFO] [stdout] 512 | fn apply(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:516:24 [INFO] [stdout] | [INFO] [stdout] 516 | fn rollback(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:520:25 [INFO] [stdout] | [INFO] [stdout] 520 | fn can_apply(&self, input: &Input, state: &AnnealingState) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | fn apply(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:549:24 [INFO] [stdout] | [INFO] [stdout] 549 | fn rollback(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:554:25 [INFO] [stdout] | [INFO] [stdout] 554 | fn can_apply(&self, input: &Input, state: &AnnealingState) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `n` is never read [INFO] [stdout] --> src/main.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 129 | struct Input { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 130 | n: usize, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Input` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `gen_i32` is never used [INFO] [stdout] --> src/main.rs:1009:23 [INFO] [stdout] | [INFO] [stdout] 980 | impl Xoshiro256 { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1009 | pub(crate) fn gen_i32(&mut self, lower: i32, upper: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `d` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:265:22 [INFO] [stdout] | [INFO] [stdout] 265 | for d in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 265 - for d in 0..4 { [INFO] [stdout] 265 + for (d, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `d` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:332:18 [INFO] [stdout] | [INFO] [stdout] 332 | for d in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 332 - for d in 0..4 { [INFO] [stdout] 332 + for (d, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/main.rs:403:45 [INFO] [stdout] | [INFO] [stdout] 403 | let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 403 - let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] 403 + let mut dists = Map2d::new(vec![i32::MAX / 2; N * N], N); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:413:28 [INFO] [stdout] | [INFO] [stdout] 413 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 413 - for dir in 0..4 { [INFO] [stdout] 413 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/main.rs:468:41 [INFO] [stdout] | [INFO] [stdout] 468 | let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 468 - let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] 468 + let mut dists = Map2d::new(vec![i32::MAX / 2; N * N], N); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:479:24 [INFO] [stdout] | [INFO] [stdout] 479 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 479 - for dir in 0..4 { [INFO] [stdout] 479 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:565:12 [INFO] [stdout] | [INFO] [stdout] 565 | if !(target.row == N - 1 && dir == 2) && !(target.col == N - 1 && dir == 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(target.row == N - 1 && dir == 2 || target.col == N - 1 && dir == 1)` [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: empty string literal in `eprintln!` [INFO] [stdout] --> src/main.rs:650:5 [INFO] [stdout] | [INFO] [stdout] 650 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/main.rs:739:53 [INFO] [stdout] | [INFO] [stdout] 739 | let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 739 - let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] 739 + let mut dists = Map2d::new(vec![i32::MAX / 2; N * N], N); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:749:36 [INFO] [stdout] | [INFO] [stdout] 749 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 749 - for dir in 0..4 { [INFO] [stdout] 749 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:786:32 [INFO] [stdout] | [INFO] [stdout] 786 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 786 - for dir in 0..4 { [INFO] [stdout] 786 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to usize [INFO] [stdout] --> src/main.rs:833:13 [INFO] [stdout] | [INFO] [stdout] 833 | (x0 as i64 - x1 as i64).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(x0 as i64 - x1 as i64).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:1033:9 [INFO] [stdout] | [INFO] [stdout] 1033 | return z ^ z >> 31; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1033 - return z ^ z >> 31; [INFO] [stdout] 1033 + z ^ z >> 31 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> src/main.rs:1019:40 [INFO] [stdout] | [INFO] [stdout] 1019 | let result: f64 = unsafe { std::mem::transmute(result) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 1019 - let result: f64 = unsafe { std::mem::transmute(result) }; [INFO] [stdout] 1019 + let result: f64 = unsafe { f64::from_bits(result) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:320:15 [INFO] [stdout] | [INFO] [stdout] 320 | fn get_action(input: &Input, state: &State, blueprint: &AnnealingState, turn: usize) -> Action { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:512:21 [INFO] [stdout] | [INFO] [stdout] 512 | fn apply(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:516:24 [INFO] [stdout] | [INFO] [stdout] 516 | fn rollback(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:520:25 [INFO] [stdout] | [INFO] [stdout] 520 | fn can_apply(&self, input: &Input, state: &AnnealingState) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:544:21 [INFO] [stdout] | [INFO] [stdout] 544 | fn apply(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:549:24 [INFO] [stdout] | [INFO] [stdout] 549 | fn rollback(&self, input: &Input, state: &mut AnnealingState) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:554:25 [INFO] [stdout] | [INFO] [stdout] 554 | fn can_apply(&self, input: &Input, state: &AnnealingState) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `n` is never read [INFO] [stdout] --> src/main.rs:130:5 [INFO] [stdout] | [INFO] [stdout] 129 | struct Input { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 130 | n: usize, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Input` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `gen_i32` is never used [INFO] [stdout] --> src/main.rs:1009:23 [INFO] [stdout] | [INFO] [stdout] 980 | impl Xoshiro256 { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1009 | pub(crate) fn gen_i32(&mut self, lower: i32, upper: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `d` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:265:22 [INFO] [stdout] | [INFO] [stdout] 265 | for d in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 265 - for d in 0..4 { [INFO] [stdout] 265 + for (d, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `d` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:332:18 [INFO] [stdout] | [INFO] [stdout] 332 | for d in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 332 - for d in 0..4 { [INFO] [stdout] 332 + for (d, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/main.rs:403:45 [INFO] [stdout] | [INFO] [stdout] 403 | let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 403 - let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] 403 + let mut dists = Map2d::new(vec![i32::MAX / 2; N * N], N); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:413:28 [INFO] [stdout] | [INFO] [stdout] 413 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 413 - for dir in 0..4 { [INFO] [stdout] 413 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/main.rs:468:41 [INFO] [stdout] | [INFO] [stdout] 468 | let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 468 - let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] 468 + let mut dists = Map2d::new(vec![i32::MAX / 2; N * N], N); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:479:24 [INFO] [stdout] | [INFO] [stdout] 479 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 479 - for dir in 0..4 { [INFO] [stdout] 479 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:565:12 [INFO] [stdout] | [INFO] [stdout] 565 | if !(target.row == N - 1 && dir == 2) && !(target.col == N - 1 && dir == 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(target.row == N - 1 && dir == 2 || target.col == N - 1 && dir == 1)` [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: empty string literal in `eprintln!` [INFO] [stdout] --> src/main.rs:650:5 [INFO] [stdout] | [INFO] [stdout] 650 | eprintln!(""); [INFO] [stdout] | ^^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/main.rs:739:53 [INFO] [stdout] | [INFO] [stdout] 739 | let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 739 - let mut dists = Map2d::new(vec![std::i32::MAX / 2; N * N], N); [INFO] [stdout] 739 + let mut dists = Map2d::new(vec![i32::MAX / 2; N * N], N); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:749:36 [INFO] [stdout] | [INFO] [stdout] 749 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 749 - for dir in 0..4 { [INFO] [stdout] 749 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `dir` is used to index `ADJACENTS` [INFO] [stdout] --> src/main.rs:786:32 [INFO] [stdout] | [INFO] [stdout] 786 | for dir in 0..4 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 786 - for dir in 0..4 { [INFO] [stdout] 786 + for (dir, ) in ADJACENTS.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i64::abs()` to usize [INFO] [stdout] --> src/main.rs:833:13 [INFO] [stdout] | [INFO] [stdout] 833 | (x0 as i64 - x1 as i64).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(x0 as i64 - x1 as i64).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:1033:9 [INFO] [stdout] | [INFO] [stdout] 1033 | return z ^ z >> 31; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1033 - return z ^ z >> 31; [INFO] [stdout] 1033 + z ^ z >> 31 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary transmute [INFO] [stdout] --> src/main.rs:1019:40 [INFO] [stdout] | [INFO] [stdout] 1019 | let result: f64 = unsafe { std::mem::transmute(result) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnecessary_transmutes)]` on by default [INFO] [stdout] help: replace this with [INFO] [stdout] | [INFO] [stdout] 1019 - let result: f64 = unsafe { std::mem::transmute(result) }; [INFO] [stdout] 1019 + let result: f64 = unsafe { f64::from_bits(result) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.51s [INFO] running `Command { std: "docker" "inspect" "de810a28af8821bb1b30b5113b3087fa7f0f966cf442c8d05b309f9b1e3e6a49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "de810a28af8821bb1b30b5113b3087fa7f0f966cf442c8d05b309f9b1e3e6a49", kill_on_drop: false }` [INFO] [stdout] de810a28af8821bb1b30b5113b3087fa7f0f966cf442c8d05b309f9b1e3e6a49