[INFO] fetching crate radip 0.1.0... [INFO] linting radip-0.1.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate radip 0.1.0 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate radip 0.1.0 [INFO] finished tweaking crates.io crate radip 0.1.0 [INFO] tweaked toml for crates.io crate radip 0.1.0 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate radip 0.1.0 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 19 packages to latest compatible versions [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] Downloading crates ... [INFO] [stderr] Downloaded frozenset v0.2.2 [INFO] [stderr] Downloaded erased-serde v0.4.10 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 0d7710d7ff6e9fdde55f1966d1c40df1d9576d544976d4882b5f98ff9607693d [INFO] running `Command { std: "docker" "start" "-a" "0d7710d7ff6e9fdde55f1966d1c40df1d9576d544976d4882b5f98ff9607693d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0d7710d7ff6e9fdde55f1966d1c40df1d9576d544976d4882b5f98ff9607693d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0d7710d7ff6e9fdde55f1966d1c40df1d9576d544976d4882b5f98ff9607693d", kill_on_drop: false }` [INFO] [stdout] 0d7710d7ff6e9fdde55f1966d1c40df1d9576d544976d4882b5f98ff9607693d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] f2b5e90f5d61feacbc8c1a846df06872a0a42e79b7ef246f67e52d99e944788b [INFO] running `Command { std: "docker" "start" "-a" "f2b5e90f5d61feacbc8c1a846df06872a0a42e79b7ef246f67e52d99e944788b", kill_on_drop: false }` [INFO] [stderr] Compiling erased-serde v0.4.10 [INFO] [stderr] Compiling typetag v0.2.21 [INFO] [stderr] Compiling typetag-impl v0.2.21 [INFO] [stderr] Checking inventory v0.3.22 [INFO] [stderr] Checking frozenset v0.2.2 [INFO] [stderr] Checking radip v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/lib.rs:9:37 [INFO] [stdout] | [INFO] [stdout] 9 | collections::{HashMap, HashSet, VecDeque}, [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: `cmp::min` [INFO] [stdout] --> src/utils.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{cmp::min, collections::{HashMap, HashSet}}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/lib.rs:9:37 [INFO] [stdout] | [INFO] [stdout] 9 | collections::{HashMap, HashSet, VecDeque}, [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: `HashSet` and `hash::Hash` [INFO] [stdout] --> src/test.rs:2:28 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{HashMap, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 3 | error::Error, [INFO] [stdout] 4 | hash::Hash, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `hash::Hash` and `thread::current` [INFO] [stdout] --> src/paradox.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{hash::Hash, thread::current}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `compute_attack_strength` [INFO] [stdout] --> src/paradox.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | use base::{compute_attack_strength, compute_defend_strength, compute_prevent_strength, is_path, Convoy, Move}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cmp::min` [INFO] [stdout] --> src/utils.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{cmp::min, collections::{HashMap, HashSet}}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet`, `error::Error`, and `hash::Hash` [INFO] [stdout] --> src/test.rs:2:28 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{HashMap, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 3 | error::Error, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 4 | hash::Hash, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module [INFO] [stdout] --> src/lib.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | mod test; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `MapState`, `Map`, `adjudicate`, and `base` [INFO] [stdout] --> src/test.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::{adjudicate, base, Map, MapState, Orders, Unit}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^ ^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module [INFO] [stdout] --> src/lib.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | mod test; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `hash::Hash` and `thread::current` [INFO] [stdout] --> src/paradox.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{hash::Hash, thread::current}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `compute_attack_strength` [INFO] [stdout] --> src/paradox.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | use base::{compute_attack_strength, compute_defend_strength, compute_prevent_strength, is_path, Convoy, Move}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | map: &crate::Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | state: &crate::MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | map: &crate::Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | state: &crate::MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | map: &crate::Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | state: &crate::MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | map: &crate::Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | map: &Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:299:5 [INFO] [stdout] | [INFO] [stdout] 299 | state: &MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | state: &crate::MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | map: &crate::Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | state: &crate::MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | map: &crate::Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | state: &crate::MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/base.rs:542:21 [INFO] [stdout] | [INFO] [stdout] 542 | let (dest_prov, dest_coast) = &orders[src] [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | map: &Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/base.rs:299:5 [INFO] [stdout] | [INFO] [stdout] 299 | state: &MapState, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/base.rs:585:21 [INFO] [stdout] | [INFO] [stdout] 585 | let (dest_prov, dest_coast) = &orders[src] [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/base.rs:624:21 [INFO] [stdout] | [INFO] [stdout] 624 | let (dest_prov, dest_coast) = &orders[src] [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:700:5 [INFO] [stdout] | [INFO] [stdout] 700 | map: &Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/base.rs:542:21 [INFO] [stdout] | [INFO] [stdout] 542 | let (dest_prov, dest_coast) = &orders[src] [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/base.rs:585:21 [INFO] [stdout] | [INFO] [stdout] 585 | let (dest_prov, dest_coast) = &orders[src] [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/base.rs:624:21 [INFO] [stdout] | [INFO] [stdout] 624 | let (dest_prov, dest_coast) = &orders[src] [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/base.rs:700:5 [INFO] [stdout] | [INFO] [stdout] 700 | map: &Map, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `natl` [INFO] [stdout] --> src/utils.rs:91:24 [INFO] [stdout] | [INFO] [stdout] 91 | Unit::Army(natl) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_natl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `natl` [INFO] [stdout] --> src/utils.rs:99:25 [INFO] [stdout] | [INFO] [stdout] 99 | Unit::Fleet(natl, src_coast) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_natl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utils.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut unvisited = map.provinces.keys().map(|c| c.as_str()).collect::>(); [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: `natl` [INFO] [stdout] --> src/utils.rs:91:24 [INFO] [stdout] | [INFO] [stdout] 91 | Unit::Army(natl) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_natl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `natl` [INFO] [stdout] --> src/utils.rs:99:25 [INFO] [stdout] | [INFO] [stdout] 99 | Unit::Fleet(natl, src_coast) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_natl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_coast` [INFO] [stdout] --> src/test.rs:98:40 [INFO] [stdout] | [INFO] [stdout] 98 | let (src_prov, src_coast) = parse_province(parts[3]); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/test.rs:99:41 [INFO] [stdout] | [INFO] [stdout] 99 | let (dest_prov, dest_coast) = parse_province(parts[5]); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/test.rs:108:41 [INFO] [stdout] | [INFO] [stdout] 108 | let (dest_prov, dest_coast) = parse_province(parts[3]); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_coast` [INFO] [stdout] --> src/test.rs:126:36 [INFO] [stdout] | [INFO] [stdout] 126 | let (src_prov, src_coast) = parse_province(parts[3]); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dest_coast` [INFO] [stdout] --> src/test.rs:127:37 [INFO] [stdout] | [INFO] [stdout] 127 | let (dest_prov, dest_coast) = parse_province(parts[5]); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dest_coast` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `order_status` [INFO] [stdout] --> src/paradox.rs:93:64 [INFO] [stdout] | [INFO] [stdout] 93 | ...e, orders: &Orders, order_status: &mut HashMap, start: &str) -> FrozenSet { [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_order_status` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/utils.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let mut unvisited = map.provinces.keys().map(|c| c.as_str()).collect::>(); [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: `order_status` [INFO] [stdout] --> src/paradox.rs:93:64 [INFO] [stdout] | [INFO] [stdout] 93 | ...e, orders: &Orders, order_status: &mut HashMap, start: &str) -> FrozenSet { [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_order_status` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Test` is never constructed [INFO] [stdout] --> src/test.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Test { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `empty` is never used [INFO] [stdout] --> src/test.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl Test { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 18 | pub fn empty(name: String) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_province` is never used [INFO] [stdout] --> src/test.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn parse_province(src: &str) -> (String, String) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/base.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | return self.dest.0 == prov; [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] 102 - return self.dest.0 == prov; [INFO] [stdout] 102 + self.dest.0 == prov [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/base.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | / return this [INFO] [stdout] 107 | | .downcast_ref::() [INFO] [stdout] 108 | | .map(|m| m.is_to(prov)) [INFO] [stdout] 109 | | .unwrap_or(false); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 106 ~ this [INFO] [stdout] 107 + .downcast_ref::() [INFO] [stdout] 108 + .map(|m| m.is_to(prov)) [INFO] [stdout] 109 ~ .unwrap_or(false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/base.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | return self.dest.0 == prov; [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] 102 - return self.dest.0 == prov; [INFO] [stdout] 102 + self.dest.0 == prov [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/base.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | / return this [INFO] [stdout] 107 | | .downcast_ref::() [INFO] [stdout] 108 | | .map(|m| m.is_to(prov)) [INFO] [stdout] 109 | | .unwrap_or(false); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 106 ~ this [INFO] [stdout] 107 + .downcast_ref::() [INFO] [stdout] 108 + .map(|m| m.is_to(prov)) [INFO] [stdout] 109 ~ .unwrap_or(false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:336:23 [INFO] [stdout] | [INFO] [stdout] 336 | match order_status.get(prov_it).map(|x| *x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(prov_it).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:336:23 [INFO] [stdout] | [INFO] [stdout] 336 | match order_status.get(prov_it).map(|x| *x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(prov_it).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` 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/base.rs:549:55 [INFO] [stdout] | [INFO] [stdout] 549 | if SupportMove::is_support_to(order2.deref(), &src, &dest_prov) { [INFO] [stdout] | ^^^^ help: change this to: `src` [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/base.rs:549:61 [INFO] [stdout] | [INFO] [stdout] 549 | if SupportMove::is_support_to(order2.deref(), &src, &dest_prov) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `dest_prov` [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 are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:593:16 [INFO] [stdout] | [INFO] [stdout] 593 | if order_status.get(dest_prov).map(|x: &bool| *x) != Some(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(dest_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:598:16 [INFO] [stdout] | [INFO] [stdout] 598 | if order_status.get(dest_prov).map(|x| *x) != Some(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(dest_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:601:16 [INFO] [stdout] | [INFO] [stdout] 601 | if order_status.get(dest_prov).map(|x| *x) == Some(true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(dest_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/base.rs:764:21 [INFO] [stdout] | [INFO] [stdout] 764 | || (dest_coast == "" && map.provinces[dest_prov].coasts.is_empty())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `dest_coast.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` 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/base.rs:549:55 [INFO] [stdout] | [INFO] [stdout] 549 | if SupportMove::is_support_to(order2.deref(), &src, &dest_prov) { [INFO] [stdout] | ^^^^ help: change this to: `src` [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/base.rs:549:61 [INFO] [stdout] | [INFO] [stdout] 549 | if SupportMove::is_support_to(order2.deref(), &src, &dest_prov) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `dest_prov` [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: length comparison to zero [INFO] [stdout] --> src/base.rs:790:15 [INFO] [stdout] | [INFO] [stdout] 790 | )) && visited.len() != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!visited.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: unneeded `return` statement [INFO] [stdout] --> src/base.rs:866:9 [INFO] [stdout] | [INFO] [stdout] 866 | return None; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 866 - return None; [INFO] [stdout] 866 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/base.rs:868:9 [INFO] [stdout] | [INFO] [stdout] 868 | return Some(false); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 868 - return Some(false); [INFO] [stdout] 868 + Some(false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:593:16 [INFO] [stdout] | [INFO] [stdout] 593 | if order_status.get(dest_prov).map(|x: &bool| *x) != Some(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(dest_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:598:16 [INFO] [stdout] | [INFO] [stdout] 598 | if order_status.get(dest_prov).map(|x| *x) != Some(false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(dest_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/base.rs:601:16 [INFO] [stdout] | [INFO] [stdout] 601 | if order_status.get(dest_prov).map(|x| *x) == Some(true) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(dest_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [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/base.rs:823:5 [INFO] [stdout] | [INFO] [stdout] 823 | / match state [INFO] [stdout] 824 | | .units [INFO] [stdout] 825 | | .get(src) [INFO] [stdout] 826 | | .expect("unit does not exist in is_path") [INFO] [stdout] ... | [INFO] [stdout] 829 | | _ => {} [INFO] [stdout] 830 | | } [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] 823 ~ if let Unit::Fleet(_, _) = state [INFO] [stdout] 824 + .units [INFO] [stdout] 825 + .get(src) [INFO] [stdout] 826 + .expect("unit does not exist in is_path") { return Some(false) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/base.rs:764:21 [INFO] [stdout] | [INFO] [stdout] 764 | || (dest_coast == "" && map.provinces[dest_prov].coasts.is_empty())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `dest_coast.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/base.rs:790:15 [INFO] [stdout] | [INFO] [stdout] 790 | )) && visited.len() != 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!visited.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: unneeded `return` statement [INFO] [stdout] --> src/base.rs:866:9 [INFO] [stdout] | [INFO] [stdout] 866 | return None; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 866 - return None; [INFO] [stdout] 866 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/base.rs:868:9 [INFO] [stdout] | [INFO] [stdout] 868 | return Some(false); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 868 - return Some(false); [INFO] [stdout] 868 + Some(false) [INFO] [stdout] | [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/base.rs:823:5 [INFO] [stdout] | [INFO] [stdout] 823 | / match state [INFO] [stdout] 824 | | .units [INFO] [stdout] 825 | | .get(src) [INFO] [stdout] 826 | | .expect("unit does not exist in is_path") [INFO] [stdout] ... | [INFO] [stdout] 829 | | _ => {} [INFO] [stdout] 830 | | } [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] 823 ~ if let Unit::Fleet(_, _) = state [INFO] [stdout] 824 + .units [INFO] [stdout] 825 + .get(src) [INFO] [stdout] 826 + .expect("unit does not exist in is_path") { return Some(false) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils.rs:93:24 [INFO] [stdout] | [INFO] [stdout] 93 | ...if src == src_prov && !contested.contains(dest) && !new_state.units.contains_key(dest) [INFO] [stdout] | _______^ [INFO] [stdout] 94 | | ... && !(orders.contains_key(dest) && orders[dest].is::() && order_status.get(dest) == Some(&true) && orders[dest].downcast_ref::().unwrap().dest.0 == *src_prov) { [INFO] [stdout] | |________________________________________________________________________________________________________________________________________________________________________________^ help: try: `!(src != src_prov || contested.contains(dest) || new_state.units.contains_key(dest) || orders.contains_key(dest) && orders[dest].is::() && order_status.get(dest) == Some(&true) && orders[dest].downcast_ref::().unwrap().dest.0 == *src_prov)` [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: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | return state.units.values().filter(|u| u.nationality() == power).count(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return state.units.values().filter(|u| u.nationality() == power).count(); [INFO] [stdout] 116 + state.units.values().filter(|u| u.nationality() == power).count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:121:5 [INFO] [stdout] | [INFO] [stdout] 121 | return state.ownership.values().filter(|u| *u == power).count(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return state.ownership.values().filter(|u| *u == power).count(); [INFO] [stdout] 121 + state.ownership.values().filter(|u| *u == power).count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils.rs:93:24 [INFO] [stdout] | [INFO] [stdout] 93 | ...if src == src_prov && !contested.contains(dest) && !new_state.units.contains_key(dest) [INFO] [stdout] | _______^ [INFO] [stdout] 94 | | ... && !(orders.contains_key(dest) && orders[dest].is::() && order_status.get(dest) == Some(&true) && orders[dest].downcast_ref::().unwrap().dest.0 == *src_prov) { [INFO] [stdout] | |________________________________________________________________________________________________________________________________________________________________________________^ help: try: `!(src != src_prov || contested.contains(dest) || new_state.units.contains_key(dest) || orders.contains_key(dest) && orders[dest].is::() && order_status.get(dest) == Some(&true) && orders[dest].downcast_ref::().unwrap().dest.0 == *src_prov)` [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 loop could be written as a `while let` loop [INFO] [stdout] --> src/utils.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / loop { [INFO] [stdout] 132 | | let min = match unvisited.iter().map(|c| dist[c]).min() { [INFO] [stdout] 133 | | Some(min) => min, [INFO] [stdout] 134 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 142 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(min) = unvisited.iter().map(|c| dist[c]).min() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/utils.rs:136:20 [INFO] [stdout] | [INFO] [stdout] 136 | let node = unvisited.iter().find(|c| dist[*c] == min).map(|c| *c).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `unvisited.iter().find(|c| dist[*c] == min).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:144:55 [INFO] [stdout] | [INFO] [stdout] 144 | let max: u32 = state.units.iter().filter(|(_, u)| &u.nationality() == power).map(|(prov, _)| dist[prov.as_str()]).min()?; [INFO] [stdout] | ----------------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `u.nationality()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/utils.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | / state.units.iter() [INFO] [stdout] 146 | | .filter(|(prov, u)| &u.nationality() == power && dist[prov.as_str()] == max) [INFO] [stdout] 147 | | .map(|(prov, _)| prov).min().map(|c| c.clone()) [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 145 ~ state.units.iter() [INFO] [stdout] 146 + .filter(|(prov, u)| &u.nationality() == power && dist[prov.as_str()] == max) [INFO] [stdout] 147 + .map(|(prov, _)| prov).min().cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:146:29 [INFO] [stdout] | [INFO] [stdout] 146 | .filter(|(prov, u)| &u.nationality() == power && dist[prov.as_str()] == max) [INFO] [stdout] | ----------------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `u.nationality()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | return state.units.values().filter(|u| u.nationality() == power).count(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return state.units.values().filter(|u| u.nationality() == power).count(); [INFO] [stdout] 116 + state.units.values().filter(|u| u.nationality() == power).count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/test.rs:52:39 [INFO] [stdout] | [INFO] [stdout] 52 | active_test = Test::empty(line[3..].trim().to_string()); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/test.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | if line.starts_with("###") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 47 ~ if let Some() = line.strip_prefix("###") { [INFO] [stdout] 48 | println!("{}", line); [INFO] [stdout] ... [INFO] [stdout] 51 | } [INFO] [stdout] 52 ~ active_test = Test::empty(.trim().to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:121:5 [INFO] [stdout] | [INFO] [stdout] 121 | return state.ownership.values().filter(|u| *u == power).count(); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return state.ownership.values().filter(|u| *u == power).count(); [INFO] [stdout] 121 + state.ownership.values().filter(|u| *u == power).count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/test.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if active_test.name != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!active_test.name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/test.rs:56:29 [INFO] [stdout] | [INFO] [stdout] 56 | active_nation = line[..line.len() - 1].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/test.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | if line.ends_with(":") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 55 ~ if let Some() = line.strip_suffix(":") { [INFO] [stdout] 56 ~ active_nation = .trim().to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/test.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | let end = line[1..].find("`"); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/test.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | if line.starts_with("`") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 59 ~ if let Some() = line.strip_prefix("`") { [INFO] [stdout] 60 ~ let end = .find("`"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/utils.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / loop { [INFO] [stdout] 132 | | let min = match unvisited.iter().map(|c| dist[c]).min() { [INFO] [stdout] 133 | | Some(min) => min, [INFO] [stdout] 134 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 142 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(min) = unvisited.iter().map(|c| dist[c]).min() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/test.rs:61:16 [INFO] [stdout] | [INFO] [stdout] 61 | if end == None { [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_none()` instead: `end.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/utils.rs:136:20 [INFO] [stdout] | [INFO] [stdout] 136 | let node = unvisited.iter().find(|c| dist[*c] == min).map(|c| *c).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `unvisited.iter().find(|c| dist[*c] == min).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:144:55 [INFO] [stdout] | [INFO] [stdout] 144 | let max: u32 = state.units.iter().filter(|(_, u)| &u.nationality() == power).map(|(prov, _)| dist[prov.as_str()]).min()?; [INFO] [stdout] | ----------------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `u.nationality()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/utils.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | / state.units.iter() [INFO] [stdout] 146 | | .filter(|(prov, u)| &u.nationality() == power && dist[prov.as_str()] == max) [INFO] [stdout] 147 | | .map(|(prov, _)| prov).min().map(|c| c.clone()) [INFO] [stdout] | |_______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 145 ~ state.units.iter() [INFO] [stdout] 146 + .filter(|(prov, u)| &u.nationality() == power && dist[prov.as_str()] == max) [INFO] [stdout] 147 + .map(|(prov, _)| prov).min().cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/utils.rs:146:29 [INFO] [stdout] | [INFO] [stdout] 146 | .filter(|(prov, u)| &u.nationality() == power && dist[prov.as_str()] == max) [INFO] [stdout] | ----------------^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `u.nationality()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/paradox.rs:19:88 [INFO] [stdout] | [INFO] [stdout] 19 | ...ders[current_prov].is::() && order_status.get(current_prov).map(|x| *x) != Some(false) && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(current_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/test.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if results.get(&prov).map(|x| *x) == Some(expected) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `results.get(&prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/test.rs:170:23 [INFO] [stdout] | [INFO] [stdout] 170 | } else if results.get(&prov) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `results.get(&prov).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/test.rs:197:5 [INFO] [stdout] | [INFO] [stdout] 197 | println!(""); [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/paradox.rs:72:16 [INFO] [stdout] | [INFO] [stdout] 72 | if order_status.get(prov_it) != None || !order_it.is::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `order_status.get(prov_it).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/paradox.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / loop { [INFO] [stdout] 99 | | let node = match stack.pop() { [INFO] [stdout] 100 | | Some(node) => node, [INFO] [stdout] 101 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 118 | | visited.insert(node); [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node) = stack.pop() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/paradox.rs:19:88 [INFO] [stdout] | [INFO] [stdout] 19 | ...ders[current_prov].is::() && order_status.get(current_prov).map(|x| *x) != Some(false) && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order_status.get(current_prov).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/paradox.rs:134:39 [INFO] [stdout] | [INFO] [stdout] 134 | if order_it.is::() && order_status.get(prov_it) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `order_status.get(prov_it).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/paradox.rs:72:16 [INFO] [stdout] | [INFO] [stdout] 72 | if order_status.get(prov_it) != None || !order_it.is::() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `order_status.get(prov_it).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/paradox.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | / loop { [INFO] [stdout] 99 | | let node = match stack.pop() { [INFO] [stdout] 100 | | Some(node) => node, [INFO] [stdout] 101 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 118 | | visited.insert(node); [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node) = stack.pop() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/paradox.rs:134:39 [INFO] [stdout] | [INFO] [stdout] 134 | if order_it.is::() && order_status.get(prov_it) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `order_status.get(prov_it).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:155:35 [INFO] [stdout] | [INFO] [stdout] 155 | let deps = order.deps(&map, &state, &orders, prov); [INFO] [stdout] | ^^^^ help: change this to: `map` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:155:41 [INFO] [stdout] | [INFO] [stdout] 155 | let deps = order.deps(&map, &state, &orders, prov); [INFO] [stdout] | ^^^^^^ help: change this to: `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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:155:49 [INFO] [stdout] | [INFO] [stdout] 155 | let deps = order.deps(&map, &state, &orders, prov); [INFO] [stdout] | ^^^^^^^ help: change this to: `orders` [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/lib.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | / match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] 165 | | Some(status) => { [INFO] [stdout] 166 | | order_status.insert(prov.to_string(), status); [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [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] 164 ~ if let Some(status) = order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] 165 + order_status.insert(prov.to_string(), status); [INFO] [stdout] 166 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:36 [INFO] [stdout] | [INFO] [stdout] 164 | match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] | ^^^^ help: change this to: `map` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:42 [INFO] [stdout] | [INFO] [stdout] 164 | match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] | ^^^^^^ help: change this to: `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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:50 [INFO] [stdout] | [INFO] [stdout] 164 | match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] | ^^^^^^^ help: change this to: `orders` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:155:35 [INFO] [stdout] | [INFO] [stdout] 155 | let deps = order.deps(&map, &state, &orders, prov); [INFO] [stdout] | ^^^^ help: change this to: `map` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:155:41 [INFO] [stdout] | [INFO] [stdout] 155 | let deps = order.deps(&map, &state, &orders, prov); [INFO] [stdout] | ^^^^^^ help: change this to: `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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:155:49 [INFO] [stdout] | [INFO] [stdout] 155 | let deps = order.deps(&map, &state, &orders, prov); [INFO] [stdout] | ^^^^^^^ help: change this to: `orders` [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/lib.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | / match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] 165 | | Some(status) => { [INFO] [stdout] 166 | | order_status.insert(prov.to_string(), status); [INFO] [stdout] ... | [INFO] [stdout] 169 | | } [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] 164 ~ if let Some(status) = order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] 165 + order_status.insert(prov.to_string(), status); [INFO] [stdout] 166 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:36 [INFO] [stdout] | [INFO] [stdout] 164 | match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] | ^^^^ help: change this to: `map` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:42 [INFO] [stdout] | [INFO] [stdout] 164 | match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] | ^^^^^^ help: change this to: `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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:164:50 [INFO] [stdout] | [INFO] [stdout] 164 | match order.adjudicate(&map, &state, &orders, prov, &restricted_order_status) { [INFO] [stdout] | ^^^^^^^ help: change this to: `orders` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.16s [INFO] running `Command { std: "docker" "inspect" "f2b5e90f5d61feacbc8c1a846df06872a0a42e79b7ef246f67e52d99e944788b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f2b5e90f5d61feacbc8c1a846df06872a0a42e79b7ef246f67e52d99e944788b", kill_on_drop: false }` [INFO] [stdout] f2b5e90f5d61feacbc8c1a846df06872a0a42e79b7ef246f67e52d99e944788b