[INFO] cloning repository https://github.com/jbrot/santorini-ai [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jbrot/santorini-ai" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjbrot%2Fsantorini-ai", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjbrot%2Fsantorini-ai'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 278df2ebfdf758ec6d2812fcb6a1faa4b774a1ff [INFO] linting jbrot/santorini-ai against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjbrot%2Fsantorini-ai" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jbrot/santorini-ai [INFO] finished tweaking git repo https://github.com/jbrot/santorini-ai [INFO] tweaked toml for git repo https://github.com/jbrot/santorini-ai written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jbrot/santorini-ai 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/jbrot/santorini-ai already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded memoffset v0.6.1 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.1 [INFO] [stderr] Downloaded const_fn v0.4.3 [INFO] [stderr] Downloaded cached_proc_macro v0.4.0 [INFO] [stderr] Downloaded cached v0.21.0 [INFO] [stderr] Downloaded half v1.6.0 [INFO] [stderr] Downloaded tinytemplate v1.1.0 [INFO] [stderr] Downloaded criterion v0.3.3 [INFO] [stderr] Downloaded termion v1.5.5 [INFO] [stderr] Downloaded tui v0.13.0 [INFO] [stderr] Downloaded syn v1.0.51 [INFO] [stderr] Downloaded csv v1.1.5 [INFO] [stderr] Downloaded plotters v0.2.15 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 4741997642cb47510ab3860c1712b2be44249bdd3035fb1a6cbb2a229b400065 [INFO] running `Command { std: "docker" "start" "-a" "4741997642cb47510ab3860c1712b2be44249bdd3035fb1a6cbb2a229b400065", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4741997642cb47510ab3860c1712b2be44249bdd3035fb1a6cbb2a229b400065", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4741997642cb47510ab3860c1712b2be44249bdd3035fb1a6cbb2a229b400065", kill_on_drop: false }` [INFO] [stdout] 4741997642cb47510ab3860c1712b2be44249bdd3035fb1a6cbb2a229b400065 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 9a7067897762c698a1a7372bd16b46bf68dddc6a31d2a9cb850e301470d42c5e [INFO] running `Command { std: "docker" "start" "-a" "9a7067897762c698a1a7372bd16b46bf68dddc6a31d2a9cb850e301470d42c5e", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling syn v1.0.51 [INFO] [stderr] Compiling libc v0.2.80 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling proc-macro-hack v0.5.19 [INFO] [stderr] Compiling proc-macro-nested v0.1.6 [INFO] [stderr] Compiling getrandom v0.1.15 [INFO] [stderr] Checking futures-core v0.3.8 [INFO] [stderr] Compiling serde v1.0.117 [INFO] [stderr] Checking futures-sink v0.3.8 [INFO] [stderr] Checking once_cell v1.5.2 [INFO] [stderr] Compiling strsim v0.9.3 [INFO] [stderr] Compiling const_fn v0.4.3 [INFO] [stderr] Checking unicode-width v0.1.8 [INFO] [stderr] Checking futures-io v0.3.8 [INFO] [stderr] Compiling semver-parser v0.7.0 [INFO] [stderr] Checking futures-task v0.3.8 [INFO] [stderr] Checking slab v0.4.2 [INFO] [stderr] Checking bitflags v1.2.1 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling event-listener v2.5.1 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling crossbeam-utils v0.8.1 [INFO] [stderr] Checking futures-channel v0.3.8 [INFO] [stderr] Compiling memoffset v0.6.1 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling semver v0.9.0 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling async-mutex v1.4.0 [INFO] [stderr] Compiling rayon-core v1.9.0 [INFO] [stderr] Checking numtoa v0.1.0 [INFO] [stderr] Compiling serde_json v1.0.59 [INFO] [stderr] Compiling rustc_version v0.2.3 [INFO] [stderr] Checking unicode-segmentation v1.7.1 [INFO] [stderr] Checking itoa v0.4.6 [INFO] [stderr] Compiling rayon v1.5.0 [INFO] [stderr] Checking take_mut v0.2.2 [INFO] [stderr] Compiling serde_derive v1.0.117 [INFO] [stderr] Checking itertools v0.9.0 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking half v1.6.0 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Checking regex-syntax v0.6.21 [INFO] [stderr] Checking termion v1.5.5 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Compiling cast v0.2.3 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking crossbeam-epoch v0.9.1 [INFO] [stderr] Checking regex-automata v0.1.9 [INFO] [stderr] Checking crossbeam-channel v0.5.0 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking walkdir v2.3.1 [INFO] [stderr] Checking oorandom v11.1.3 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking rand_pcg v0.2.1 [INFO] [stderr] Checking tui v0.13.0 [INFO] [stderr] Checking plotters v0.2.15 [INFO] [stderr] Checking crossbeam-deque v0.8.0 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking criterion-plot v0.4.3 [INFO] [stderr] Checking regex v1.4.2 [INFO] [stderr] Checking bstr v0.2.14 [INFO] [stderr] Checking serde_cbor v0.11.1 [INFO] [stderr] Checking csv v1.1.5 [INFO] [stderr] Checking tinytemplate v1.1.0 [INFO] [stderr] Compiling darling_core v0.10.2 [INFO] [stderr] Compiling pin-project-internal v1.0.2 [INFO] [stderr] Compiling futures-macro v0.3.8 [INFO] [stderr] Compiling thiserror-impl v1.0.22 [INFO] [stderr] Compiling async-trait v0.1.42 [INFO] [stderr] Compiling derive_more v0.99.11 [INFO] [stderr] Checking thiserror v1.0.22 [INFO] [stderr] Compiling darling_macro v0.10.2 [INFO] [stderr] Checking pin-project v1.0.2 [INFO] [stderr] Checking futures-util v0.3.8 [INFO] [stderr] Compiling darling v0.10.2 [INFO] [stderr] Compiling cached_proc_macro v0.4.0 [INFO] [stderr] Checking criterion v0.3.3 [INFO] [stderr] Checking futures-executor v0.3.8 [INFO] [stderr] Checking futures v0.3.8 [INFO] [stderr] Checking cached v0.21.0 [INFO] [stderr] Checking santorini-ai v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:626:17 [INFO] [stdout] | [INFO] [stdout] 626 | word: word, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `word` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:627:17 [INFO] [stdout] | [INFO] [stdout] 627 | nibble: nibble, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `nibble` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:673:17 [INFO] [stdout] | [INFO] [stdout] 673 | word: word, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `word` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:674:17 [INFO] [stdout] | [INFO] [stdout] 674 | nibble: nibble, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `nibble` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/mcts/node.rs:30:27 [INFO] [stdout] | [INFO] [stdout] 30 | new_scores += -1.0 * node.score; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `-node.score` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mcts/node.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | if children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `children.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: deref on an immutable reference [INFO] [stdout] --> src/mcts/node.rs:50:61 [INFO] [stdout] | [INFO] [stdout] 50 | let immutable_children: &Vec> = &*children; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 50 - let immutable_children: &Vec> = &*children; [INFO] [stdout] 50 + let immutable_children: &Vec> = children; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 50 | let immutable_children: &Vec> = &**children; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mcts/tree_policy.rs:4:50 [INFO] [stdout] | [INFO] [stdout] 4 | fn select(&self, parent: &Node, children: &Vec>) -> usize; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `&[Node]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/mcts/tree_policy.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn default() -> UCB1 { [INFO] [stdout] 13 | | UCB1 { [INFO] [stdout] 14 | | parameter: f64::sqrt(2.0), [INFO] [stdout] 15 | | } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/mcts/santorini.rs:51:10 [INFO] [stdout] | [INFO] [stdout] 51 | .map(|pawn| pawn.actions()) [INFO] [stdout] | __________^ [INFO] [stdout] 52 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/mcts/santorini.rs:117:10 [INFO] [stdout] | [INFO] [stdout] 117 | .map(move |mv| match game.apply(mv) { [INFO] [stdout] | __________^ [INFO] [stdout] 118 | | ActionResult::Victory(game) => vec![((Some(mv), None), ActionResult::Victory(game))], [INFO] [stdout] 119 | | ActionResult::Continue(game) => game [INFO] [stdout] 120 | | .active_pawn() [INFO] [stdout] ... | [INFO] [stdout] 124 | | }) [INFO] [stdout] 125 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 117 ~ .flat_map(move |mv| match game.apply(mv) { [INFO] [stdout] 118 + ActionResult::Victory(game) => vec![((Some(mv), None), ActionResult::Victory(game))], [INFO] [stdout] 119 + ActionResult::Continue(game) => game [INFO] [stdout] 120 + .active_pawn() [INFO] [stdout] 121 + .actions() [INFO] [stdout] 122 + .map(|build| ((Some(mv), Some(build)), game.apply(build))) [INFO] [stdout] 123 + .collect(), [INFO] [stdout] 124 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/mcts/santorini.rs:115:10 [INFO] [stdout] | [INFO] [stdout] 115 | .map(|pawn| pawn.actions()) [INFO] [stdout] | __________^ [INFO] [stdout] 116 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/mcts/santorini.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | &mut actions.shuffle(rng); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `actions.shuffle(rng);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mcts/mod.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | assert!(children.len() > 0, "Root node has no children!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/mcts/mod.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | let mut best_score = children[0].score as f64 / children[0].iterations as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `children[0].score` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/player/heuristic_ai.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Box { [INFO] [stdout] 23 | | Box::new(HeuristicAI { [INFO] [stdout] 24 | | mv: None, [INFO] [stdout] 25 | | build: None, [INFO] [stdout] 26 | | }) [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/player/heuristic_ai.rs:52:6 [INFO] [stdout] | [INFO] [stdout] 52 | ) -> Vec<((MoveAction, Option), ActionResult)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | ActionResult::Victory(game) => vec![((mv, None), ActionResult::Victory(game))], [INFO] [stdout] 60 | | ActionResult::Continue(game) => game [INFO] [stdout] 61 | | .active_pawn() [INFO] [stdout] ... | [INFO] [stdout] 66 | | }) [INFO] [stdout] 67 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 58 ~ .flat_map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] 59 + ActionResult::Victory(game) => vec![((mv, None), ActionResult::Victory(game))], [INFO] [stdout] 60 + ActionResult::Continue(game) => game [INFO] [stdout] 61 + .active_pawn() [INFO] [stdout] 62 + .actions() [INFO] [stdout] 63 + .into_iter() [INFO] [stdout] 64 + .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] 65 + .collect(), [INFO] [stdout] 66 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | .map(|pawn| pawn.actions()) [INFO] [stdout] | __________^ [INFO] [stdout] 57 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | .map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MoveAction` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:58:44 [INFO] [stdout] | [INFO] [stdout] 58 | .map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `mv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `impl std::iter::Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:60:45 [INFO] [stdout] | [INFO] [stdout] 60 | ActionResult::Continue(game) => game [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 61 | | .active_pawn() [INFO] [stdout] 62 | | .actions() [INFO] [stdout] 63 | | .into_iter() [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 60 ~ ActionResult::Continue(game) => game [INFO] [stdout] 61 + .active_pawn() [INFO] [stdout] 62 + .actions() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MoveAction` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:64:32 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `mv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `BuildAction` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:64:49 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `build` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:64:66 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `game` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:92:10 [INFO] [stdout] | [INFO] [stdout] 92 | .map(|pawn| { [INFO] [stdout] | __________^ [INFO] [stdout] 93 | | pawn.neighbors() [INFO] [stdout] 94 | | .into_iter() [INFO] [stdout] 95 | | .map(|loc| height_score(game.board().level_at(loc))) [INFO] [stdout] 96 | | }) [INFO] [stdout] 97 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 92 ~ .flat_map(|pawn| { [INFO] [stdout] 93 + pawn.neighbors() [INFO] [stdout] 94 + .into_iter() [INFO] [stdout] 95 + .map(|loc| height_score(game.board().level_at(loc))) [INFO] [stdout] 96 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `impl std::iter::Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | / pawn.neighbors() [INFO] [stdout] 94 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `pawn.neighbors()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:213:53 [INFO] [stdout] | [INFO] [stdout] 213 | Some(action) => Ok(StepResult::PlaceTwo(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:238:49 [INFO] [stdout] | [INFO] [stdout] 238 | Some(action) => Ok(StepResult::Move(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/player/heuristic_ai.rs:255:16 [INFO] [stdout] | [INFO] [stdout] 255 | if let None = self.mv { [INFO] [stdout] | -------^^^^---------- help: try: `if self.mv.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/player/heuristic_ai.rs:261:22 [INFO] [stdout] | [INFO] [stdout] 261 | let action = mem::replace(&mut self.mv, None).expect("No move selected!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.mv.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:262:15 [INFO] [stdout] | [INFO] [stdout] 262 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/player/heuristic_ai.rs:277:22 [INFO] [stdout] | [INFO] [stdout] 277 | let action = mem::replace(&mut self.build, None).expect("No build selected!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.build.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:278:15 [INFO] [stdout] | [INFO] [stdout] 278 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/player/human.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Box { [INFO] [stdout] 19 | | Box::new(HumanPlayer { [INFO] [stdout] 20 | | cursor: Point::new(0.into(), 0.into()), [INFO] [stdout] 21 | | highlights: vec![], [INFO] [stdout] 22 | | intermediate_loc: None, [INFO] [stdout] 23 | | }) [INFO] [stdout] 24 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/player/human.rs:145:20 [INFO] [stdout] | [INFO] [stdout] 145 | if !self.intermediate_loc.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.intermediate_loc.is_some()` [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: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:152:56 [INFO] [stdout] | [INFO] [stdout] 152 | return Ok(StepResult::PlaceTwo(game.clone().apply(action))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/player/human.rs:186:20 [INFO] [stdout] | [INFO] [stdout] 186 | if !self.intermediate_loc.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.intermediate_loc.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:199:52 [INFO] [stdout] | [INFO] [stdout] 199 | return Ok(StepResult::Move(game.clone().apply(action))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/player/human.rs:227:20 [INFO] [stdout] | [INFO] [stdout] 227 | if !self.intermediate_loc.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.intermediate_loc.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:225:68 [INFO] [stdout] | [INFO] [stdout] 225 | Event::Key(Key::F(6)) => return Ok(StepResult::Victory(game.clone().resign())), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/player/human.rs:234:22 [INFO] [stdout] | [INFO] [stdout] 234 | .map(|loc| pawn_at(&game, loc)) [INFO] [stdout] | ______________________^ [INFO] [stdout] 235 | | .flatten() [INFO] [stdout] | |______________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|loc| pawn_at(&game, loc))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/human.rs:234:40 [INFO] [stdout] | [INFO] [stdout] 234 | .map(|loc| pawn_at(&game, loc)) [INFO] [stdout] | ^^^^^ help: change this to: `game` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:238:34 [INFO] [stdout] | [INFO] [stdout] 238 | return match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/human.rs:243:40 [INFO] [stdout] | [INFO] [stdout] 243 | let pawn = pawn_at(&game, self.cursor).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `game` [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: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:274:68 [INFO] [stdout] | [INFO] [stdout] 274 | Event::Key(Key::F(6)) => return Ok(StepResult::Victory(game.clone().resign())), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:277:30 [INFO] [stdout] | [INFO] [stdout] 277 | return match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/player/mcts_ai.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn default() -> Self { [INFO] [stdout] 55 | | MctsSantoriniParams::new( [INFO] [stdout] 56 | | SantoriniSimulation {}, [INFO] [stdout] 57 | | SantoriniExpansion {}, [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:123:53 [INFO] [stdout] | [INFO] [stdout] 123 | Some(action) => Ok(StepResult::PlaceTwo(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:148:49 [INFO] [stdout] | [INFO] [stdout] 148 | Some(action) => Ok(StepResult::Move(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:184:15 [INFO] [stdout] | [INFO] [stdout] 184 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:205:15 [INFO] [stdout] | [INFO] [stdout] 205 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/player/random_ai.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Box { [INFO] [stdout] 14 | | Box::new(RandomAI {}) [INFO] [stdout] 15 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:64:53 [INFO] [stdout] | [INFO] [stdout] 64 | Some(action) => Ok(StepResult::PlaceTwo(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:89:49 [INFO] [stdout] | [INFO] [stdout] 89 | Some(action) => Ok(StepResult::Move(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/random_ai.rs:106:14 [INFO] [stdout] | [INFO] [stdout] 106 | .map(|pawn| pawn.actions()) [INFO] [stdout] | ______________^ [INFO] [stdout] 107 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:111:15 [INFO] [stdout] | [INFO] [stdout] 111 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/random_ai.rs:129:14 [INFO] [stdout] | [INFO] [stdout] 129 | .map(|pawn| pawn.actions()) [INFO] [stdout] | ______________^ [INFO] [stdout] 130 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:134:15 [INFO] [stdout] | [INFO] [stdout] 134 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/santorini.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | return data & mask != 0; [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] 214 - return data & mask != 0; [INFO] [stdout] 214 + data & mask != 0 [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/santorini.rs:502:25 [INFO] [stdout] | [INFO] [stdout] 502 | / match Point::new_(Coord(x + dx), Coord(y + dy)) { [INFO] [stdout] 503 | | Some(point) => { [INFO] [stdout] 504 | | array[x as usize][y as usize].1[count] = point; [INFO] [stdout] 505 | | count += 1; [INFO] [stdout] 506 | | } [INFO] [stdout] 507 | | None => (), [INFO] [stdout] 508 | | } [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] 502 ~ if let Some(point) = Point::new_(Coord(x + dx), Coord(y + dy)) { [INFO] [stdout] 503 + array[x as usize][y as usize].1[count] = point; [INFO] [stdout] 504 + count += 1; [INFO] [stdout] 505 + } [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/santorini.rs:638:17 [INFO] [stdout] | [INFO] [stdout] 638 | / match Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 639 | | Some(point) => { [INFO] [stdout] 640 | | let off = point.word * 64 + point.nibble; [INFO] [stdout] 641 | | let diff: i8 = off - prev; [INFO] [stdout] ... | [INFO] [stdout] 647 | | None => (), [INFO] [stdout] 648 | | } [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] 638 ~ if let Some(point) = Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 639 + let off = point.word * 64 + point.nibble; [INFO] [stdout] 640 + let diff: i8 = off - prev; [INFO] [stdout] 641 + let diff: u64 = (diff as u64) << (count * 8); [INFO] [stdout] 642 + offset |= diff; [INFO] [stdout] 643 + prev = off; [INFO] [stdout] 644 + count += 1; [INFO] [stdout] 645 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:626:17 [INFO] [stdout] | [INFO] [stdout] 626 | word: word, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `word` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:627:17 [INFO] [stdout] | [INFO] [stdout] 627 | nibble: nibble, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `nibble` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [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/santorini.rs:693:21 [INFO] [stdout] | [INFO] [stdout] 693 | / match Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 694 | | Some(point) => { [INFO] [stdout] 695 | | entry[point.word as usize] |= mask << point.nibble; [INFO] [stdout] ... | [INFO] [stdout] 698 | | } [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] 693 ~ if let Some(point) = Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 694 + entry[point.word as usize] |= mask << point.nibble; [INFO] [stdout] 695 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:673:17 [INFO] [stdout] | [INFO] [stdout] 673 | word: word, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `word` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/santorini.rs:674:17 [INFO] [stdout] | [INFO] [stdout] 674 | nibble: nibble, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `nibble` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/santorini.rs:766:9 [INFO] [stdout] | [INFO] [stdout] 766 | return 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] 766 - return false; [INFO] [stdout] 766 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/santorini.rs:787:21 [INFO] [stdout] | [INFO] [stdout] 787 | self.offsets = self.offsets >> 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.offsets >>= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/santorini.rs:788:21 [INFO] [stdout] | [INFO] [stdout] 788 | self.board = self.board >> off; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.board >>= off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/santorini.rs:836:13 [INFO] [stdout] | [INFO] [stdout] 836 | let board_b; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `board_b` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 836 ~ [INFO] [stdout] 837 ~ let board_b = if off > 0 { [INFO] [stdout] 838 ~ composite.board.grid[1] << (64 - off) [INFO] [stdout] 839 | } else { [INFO] [stdout] 840 ~ 0 [INFO] [stdout] 841 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/ui/menu.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | self.cursor = self.cursor - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.cursor -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/ui/mod.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn main_menu<'a>() -> Box { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/mcts/santorini.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | &mut actions.shuffle(rng); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 153 | let _ = &mut actions.shuffle(rng); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mod.rs:24:15 [INFO] [stdout] | [INFO] [stdout] 24 | fn render(&self, game: &Game) -> BoardWidget; [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 24 | fn render(&self, game: &Game) -> BoardWidget<'_>; [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:197:15 [INFO] [stdout] | [INFO] [stdout] 197 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 197 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:222:15 [INFO] [stdout] | [INFO] [stdout] 222 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 222 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:250:15 [INFO] [stdout] | [INFO] [stdout] 250 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 250 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:272:15 [INFO] [stdout] | [INFO] [stdout] 272 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 272 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:94:51 [INFO] [stdout] | [INFO] [stdout] 94 | fn default_render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 94 | fn default_render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:115:54 [INFO] [stdout] | [INFO] [stdout] 115 | fn pawn_at(game: &Game, loc: Point) -> Option> { [INFO] [stdout] | ^^^^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 115 | fn pawn_at(game: &Game, loc: Point) -> Option> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:130:15 [INFO] [stdout] | [INFO] [stdout] 130 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 130 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:171:15 [INFO] [stdout] | [INFO] [stdout] 171 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 171 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:219:15 [INFO] [stdout] | [INFO] [stdout] 219 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 219 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:268:15 [INFO] [stdout] | [INFO] [stdout] 268 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 268 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/player/mcts_ai.rs:47:47 [INFO] [stdout] | [INFO] [stdout] 47 | MctsOrParams::Params(_) => panic!(message), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 47 - MctsOrParams::Params(_) => panic!(message), [INFO] [stdout] 47 + MctsOrParams::Params(_) => std::panic::panic_any(message), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:107:15 [INFO] [stdout] | [INFO] [stdout] 107 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 107 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:132:15 [INFO] [stdout] | [INFO] [stdout] 132 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 132 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:173:15 [INFO] [stdout] | [INFO] [stdout] 173 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 173 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:194:15 [INFO] [stdout] | [INFO] [stdout] 194 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 194 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:48:15 [INFO] [stdout] | [INFO] [stdout] 48 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 48 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 73 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:98:15 [INFO] [stdout] | [INFO] [stdout] 98 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 98 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:121:15 [INFO] [stdout] | [INFO] [stdout] 121 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 121 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:425:25 [INFO] [stdout] | [INFO] [stdout] 425 | pub fn player_pawns(&self, player: Player) -> [Pawn; 2] { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 425 | pub fn player_pawns(&self, player: Player) -> [Pawn<'_, S>; 2] { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:442:25 [INFO] [stdout] | [INFO] [stdout] 442 | pub fn active_pawns(&self) -> [Pawn; 2] { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 442 | pub fn active_pawns(&self) -> [Pawn<'_, S>; 2] { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | pub fn inactive_pawns(&self) -> [Pawn; 2] { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 446 | pub fn inactive_pawns(&self) -> [Pawn<'_, S>; 2] { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:972:24 [INFO] [stdout] | [INFO] [stdout] 972 | pub fn active_pawn(&self) -> Pawn { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 972 | pub fn active_pawn(&self) -> Pawn<'_, Build> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ui/app.rs:26:28 [INFO] [stdout] | [INFO] [stdout] 26 | fn current_player_name(&self) -> Span { [INFO] [stdout] | ^^^^^ ^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 26 | fn current_player_name(&self) -> Span<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ui/menu.rs:58:26 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn selected_item(&self) -> &Spans { [INFO] [stdout] | ^^^^^ ^^^^^^ [INFO] [stdout] | | || [INFO] [stdout] | | |the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 58 | pub fn selected_item(&self) -> &Spans<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/bin/elo.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | 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: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/bin/elo.rs:105:36 [INFO] [stdout] | [INFO] [stdout] 105 | println!("{}", Local::now().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/bin/elo.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | 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: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/bin/elo.rs:105:36 [INFO] [stdout] | [INFO] [stdout] 105 | println!("{}", Local::now().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/mcts/node.rs:30:27 [INFO] [stdout] | [INFO] [stdout] 30 | new_scores += -1.0 * node.score; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `-node.score` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mcts/node.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | if children.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `children.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: deref on an immutable reference [INFO] [stdout] --> src/mcts/node.rs:50:61 [INFO] [stdout] | [INFO] [stdout] 50 | let immutable_children: &Vec> = &*children; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 50 - let immutable_children: &Vec> = &*children; [INFO] [stdout] 50 + let immutable_children: &Vec> = children; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 50 | let immutable_children: &Vec> = &**children; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mcts/tree_policy.rs:4:50 [INFO] [stdout] | [INFO] [stdout] 4 | fn select(&self, parent: &Node, children: &Vec>) -> usize; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `&[Node]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/mcts/tree_policy.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn default() -> UCB1 { [INFO] [stdout] 13 | | UCB1 { [INFO] [stdout] 14 | | parameter: f64::sqrt(2.0), [INFO] [stdout] 15 | | } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/mcts/santorini.rs:51:10 [INFO] [stdout] | [INFO] [stdout] 51 | .map(|pawn| pawn.actions()) [INFO] [stdout] | __________^ [INFO] [stdout] 52 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/mcts/santorini.rs:117:10 [INFO] [stdout] | [INFO] [stdout] 117 | .map(move |mv| match game.apply(mv) { [INFO] [stdout] | __________^ [INFO] [stdout] 118 | | ActionResult::Victory(game) => vec![((Some(mv), None), ActionResult::Victory(game))], [INFO] [stdout] 119 | | ActionResult::Continue(game) => game [INFO] [stdout] 120 | | .active_pawn() [INFO] [stdout] ... | [INFO] [stdout] 124 | | }) [INFO] [stdout] 125 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 117 ~ .flat_map(move |mv| match game.apply(mv) { [INFO] [stdout] 118 + ActionResult::Victory(game) => vec![((Some(mv), None), ActionResult::Victory(game))], [INFO] [stdout] 119 + ActionResult::Continue(game) => game [INFO] [stdout] 120 + .active_pawn() [INFO] [stdout] 121 + .actions() [INFO] [stdout] 122 + .map(|build| ((Some(mv), Some(build)), game.apply(build))) [INFO] [stdout] 123 + .collect(), [INFO] [stdout] 124 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/mcts/santorini.rs:115:10 [INFO] [stdout] | [INFO] [stdout] 115 | .map(|pawn| pawn.actions()) [INFO] [stdout] | __________^ [INFO] [stdout] 116 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary operation [INFO] [stdout] --> src/mcts/santorini.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | &mut actions.shuffle(rng); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: statement can be reduced to: `actions.shuffle(rng);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation [INFO] [stdout] = note: `#[warn(clippy::unnecessary_operation)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mcts/mod.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | assert!(children.len() > 0, "Root node has no children!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/mcts/mod.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | let mut best_score = children[0].score as f64 / children[0].iterations as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `children[0].score` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/player/heuristic_ai.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Box { [INFO] [stdout] 23 | | Box::new(HeuristicAI { [INFO] [stdout] 24 | | mv: None, [INFO] [stdout] 25 | | build: None, [INFO] [stdout] 26 | | }) [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] = note: `#[warn(clippy::new_ret_no_self)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/player/heuristic_ai.rs:52:6 [INFO] [stdout] | [INFO] [stdout] 52 | ) -> Vec<((MoveAction, Option), ActionResult)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:58:10 [INFO] [stdout] | [INFO] [stdout] 58 | .map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] | __________^ [INFO] [stdout] 59 | | ActionResult::Victory(game) => vec![((mv, None), ActionResult::Victory(game))], [INFO] [stdout] 60 | | ActionResult::Continue(game) => game [INFO] [stdout] 61 | | .active_pawn() [INFO] [stdout] ... | [INFO] [stdout] 66 | | }) [INFO] [stdout] 67 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 58 ~ .flat_map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] 59 + ActionResult::Victory(game) => vec![((mv, None), ActionResult::Victory(game))], [INFO] [stdout] 60 + ActionResult::Continue(game) => game [INFO] [stdout] 61 + .active_pawn() [INFO] [stdout] 62 + .actions() [INFO] [stdout] 63 + .into_iter() [INFO] [stdout] 64 + .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] 65 + .collect(), [INFO] [stdout] 66 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | .map(|pawn| pawn.actions()) [INFO] [stdout] | __________^ [INFO] [stdout] 57 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | .map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MoveAction` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:58:44 [INFO] [stdout] | [INFO] [stdout] 58 | .map(|mv| match game.clone().apply(mv.clone()) { [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `mv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `impl std::iter::Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:60:45 [INFO] [stdout] | [INFO] [stdout] 60 | ActionResult::Continue(game) => game [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 61 | | .active_pawn() [INFO] [stdout] 62 | | .actions() [INFO] [stdout] 63 | | .into_iter() [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 60 ~ ActionResult::Continue(game) => game [INFO] [stdout] 61 + .active_pawn() [INFO] [stdout] 62 + .actions() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `MoveAction` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:64:32 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `mv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `BuildAction` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:64:49 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `build` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:64:66 [INFO] [stdout] | [INFO] [stdout] 64 | .map(|build| ((mv.clone(), Some(build.clone())), game.clone().apply(build))) [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `game` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:92:10 [INFO] [stdout] | [INFO] [stdout] 92 | .map(|pawn| { [INFO] [stdout] | __________^ [INFO] [stdout] 93 | | pawn.neighbors() [INFO] [stdout] 94 | | .into_iter() [INFO] [stdout] 95 | | .map(|loc| height_score(game.board().level_at(loc))) [INFO] [stdout] 96 | | }) [INFO] [stdout] 97 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 92 ~ .flat_map(|pawn| { [INFO] [stdout] 93 + pawn.neighbors() [INFO] [stdout] 94 + .into_iter() [INFO] [stdout] 95 + .map(|loc| height_score(game.board().level_at(loc))) [INFO] [stdout] 96 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `impl std::iter::Iterator` [INFO] [stdout] --> src/player/heuristic_ai.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | / pawn.neighbors() [INFO] [stdout] 94 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `pawn.neighbors()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:213:53 [INFO] [stdout] | [INFO] [stdout] 213 | Some(action) => Ok(StepResult::PlaceTwo(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:238:49 [INFO] [stdout] | [INFO] [stdout] 238 | Some(action) => Ok(StepResult::Move(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/player/heuristic_ai.rs:255:16 [INFO] [stdout] | [INFO] [stdout] 255 | if let None = self.mv { [INFO] [stdout] | -------^^^^---------- help: try: `if self.mv.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/player/heuristic_ai.rs:261:22 [INFO] [stdout] | [INFO] [stdout] 261 | let action = mem::replace(&mut self.mv, None).expect("No move selected!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.mv.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:262:15 [INFO] [stdout] | [INFO] [stdout] 262 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/player/heuristic_ai.rs:277:22 [INFO] [stdout] | [INFO] [stdout] 277 | let action = mem::replace(&mut self.build, None).expect("No build selected!"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.build.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/heuristic_ai.rs:278:15 [INFO] [stdout] | [INFO] [stdout] 278 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/player/human.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Box { [INFO] [stdout] 19 | | Box::new(HumanPlayer { [INFO] [stdout] 20 | | cursor: Point::new(0.into(), 0.into()), [INFO] [stdout] 21 | | highlights: vec![], [INFO] [stdout] 22 | | intermediate_loc: None, [INFO] [stdout] 23 | | }) [INFO] [stdout] 24 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/player/human.rs:145:20 [INFO] [stdout] | [INFO] [stdout] 145 | if !self.intermediate_loc.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.intermediate_loc.is_some()` [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: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:152:56 [INFO] [stdout] | [INFO] [stdout] 152 | return Ok(StepResult::PlaceTwo(game.clone().apply(action))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/player/human.rs:186:20 [INFO] [stdout] | [INFO] [stdout] 186 | if !self.intermediate_loc.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.intermediate_loc.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:199:52 [INFO] [stdout] | [INFO] [stdout] 199 | return Ok(StepResult::Move(game.clone().apply(action))); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/player/human.rs:227:20 [INFO] [stdout] | [INFO] [stdout] 227 | if !self.intermediate_loc.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.intermediate_loc.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:225:68 [INFO] [stdout] | [INFO] [stdout] 225 | Event::Key(Key::F(6)) => return Ok(StepResult::Victory(game.clone().resign())), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/player/human.rs:234:22 [INFO] [stdout] | [INFO] [stdout] 234 | .map(|loc| pawn_at(&game, loc)) [INFO] [stdout] | ______________________^ [INFO] [stdout] 235 | | .flatten() [INFO] [stdout] | |______________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|loc| pawn_at(&game, loc))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/human.rs:234:40 [INFO] [stdout] | [INFO] [stdout] 234 | .map(|loc| pawn_at(&game, loc)) [INFO] [stdout] | ^^^^^ help: change this to: `game` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:238:34 [INFO] [stdout] | [INFO] [stdout] 238 | return match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/human.rs:243:40 [INFO] [stdout] | [INFO] [stdout] 243 | let pawn = pawn_at(&game, self.cursor).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `game` [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: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:274:68 [INFO] [stdout] | [INFO] [stdout] 274 | Event::Key(Key::F(6)) => return Ok(StepResult::Victory(game.clone().resign())), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/human.rs:277:30 [INFO] [stdout] | [INFO] [stdout] 277 | return match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/player/mcts_ai.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn default() -> Self { [INFO] [stdout] 55 | | MctsSantoriniParams::new( [INFO] [stdout] 56 | | SantoriniSimulation {}, [INFO] [stdout] 57 | | SantoriniExpansion {}, [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:123:53 [INFO] [stdout] | [INFO] [stdout] 123 | Some(action) => Ok(StepResult::PlaceTwo(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:148:49 [INFO] [stdout] | [INFO] [stdout] 148 | Some(action) => Ok(StepResult::Move(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:184:15 [INFO] [stdout] | [INFO] [stdout] 184 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/mcts_ai.rs:205:15 [INFO] [stdout] | [INFO] [stdout] 205 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `new` usually return `Self` [INFO] [stdout] --> src/player/random_ai.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Box { [INFO] [stdout] 14 | | Box::new(RandomAI {}) [INFO] [stdout] 15 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:64:53 [INFO] [stdout] | [INFO] [stdout] 64 | Some(action) => Ok(StepResult::PlaceTwo(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:89:49 [INFO] [stdout] | [INFO] [stdout] 89 | Some(action) => Ok(StepResult::Move(game.clone().apply(action))), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/random_ai.rs:106:14 [INFO] [stdout] | [INFO] [stdout] 106 | .map(|pawn| pawn.actions()) [INFO] [stdout] | ______________^ [INFO] [stdout] 107 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:111:15 [INFO] [stdout] | [INFO] [stdout] 111 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/player/random_ai.rs:129:14 [INFO] [stdout] | [INFO] [stdout] 129 | .map(|pawn| pawn.actions()) [INFO] [stdout] | ______________^ [INFO] [stdout] 130 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|pawn| pawn.actions())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Game` which implements the `Copy` trait [INFO] [stdout] --> src/player/random_ai.rs:134:15 [INFO] [stdout] | [INFO] [stdout] 134 | match game.clone().apply(action) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*game)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/santorini.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | return data & mask != 0; [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] 214 - return data & mask != 0; [INFO] [stdout] 214 + data & mask != 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:313:9 [INFO] [stdout] | [INFO] [stdout] 313 | assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 313 - assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), true); [INFO] [stdout] 313 + assert!(b.less_than_equals(pt, CoordLevel::Ground)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | assert_eq!(b.less_than_equals(pt, CoordLevel::One), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 314 - assert_eq!(b.less_than_equals(pt, CoordLevel::One), true); [INFO] [stdout] 314 + assert!(b.less_than_equals(pt, CoordLevel::One)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:315:9 [INFO] [stdout] | [INFO] [stdout] 315 | assert_eq!(b.less_than_equals(pt, CoordLevel::Two), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 315 - assert_eq!(b.less_than_equals(pt, CoordLevel::Two), true); [INFO] [stdout] 315 + assert!(b.less_than_equals(pt, CoordLevel::Two)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:316:9 [INFO] [stdout] | [INFO] [stdout] 316 | assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 316 - assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] 316 + assert!(b.less_than_equals(pt, CoordLevel::Three)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:317:9 [INFO] [stdout] | [INFO] [stdout] 317 | assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 317 - assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] 317 + assert!(b.less_than_equals(pt, CoordLevel::Capped)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:320:9 [INFO] [stdout] | [INFO] [stdout] 320 | assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 320 - assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] 320 + assert!(!b.less_than_equals(pt, CoordLevel::Ground)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:321:9 [INFO] [stdout] | [INFO] [stdout] 321 | assert_eq!(b.less_than_equals(pt, CoordLevel::One), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 321 - assert_eq!(b.less_than_equals(pt, CoordLevel::One), true); [INFO] [stdout] 321 + assert!(b.less_than_equals(pt, CoordLevel::One)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:322:9 [INFO] [stdout] | [INFO] [stdout] 322 | assert_eq!(b.less_than_equals(pt, CoordLevel::Two), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 322 - assert_eq!(b.less_than_equals(pt, CoordLevel::Two), true); [INFO] [stdout] 322 + assert!(b.less_than_equals(pt, CoordLevel::Two)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:323:9 [INFO] [stdout] | [INFO] [stdout] 323 | assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 323 - assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] 323 + assert!(b.less_than_equals(pt, CoordLevel::Three)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 324 - assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] 324 + assert!(b.less_than_equals(pt, CoordLevel::Capped)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 327 - assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] 327 + assert!(!b.less_than_equals(pt, CoordLevel::Ground)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | assert_eq!(b.less_than_equals(pt, CoordLevel::One), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 328 - assert_eq!(b.less_than_equals(pt, CoordLevel::One), false); [INFO] [stdout] 328 + assert!(!b.less_than_equals(pt, CoordLevel::One)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | assert_eq!(b.less_than_equals(pt, CoordLevel::Two), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 329 - assert_eq!(b.less_than_equals(pt, CoordLevel::Two), true); [INFO] [stdout] 329 + assert!(b.less_than_equals(pt, CoordLevel::Two)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 330 - assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] 330 + assert!(b.less_than_equals(pt, CoordLevel::Three)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 331 - assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] 331 + assert!(b.less_than_equals(pt, CoordLevel::Capped)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 334 - assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] 334 + assert!(!b.less_than_equals(pt, CoordLevel::Ground)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | assert_eq!(b.less_than_equals(pt, CoordLevel::One), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 335 - assert_eq!(b.less_than_equals(pt, CoordLevel::One), false); [INFO] [stdout] 335 + assert!(!b.less_than_equals(pt, CoordLevel::One)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | assert_eq!(b.less_than_equals(pt, CoordLevel::Two), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 336 - assert_eq!(b.less_than_equals(pt, CoordLevel::Two), false); [INFO] [stdout] 336 + assert!(!b.less_than_equals(pt, CoordLevel::Two)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 337 - assert_eq!(b.less_than_equals(pt, CoordLevel::Three), true); [INFO] [stdout] 337 + assert!(b.less_than_equals(pt, CoordLevel::Three)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 338 - assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] 338 + assert!(b.less_than_equals(pt, CoordLevel::Capped)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 341 - assert_eq!(b.less_than_equals(pt, CoordLevel::Ground), false); [INFO] [stdout] 341 + assert!(!b.less_than_equals(pt, CoordLevel::Ground)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:342:9 [INFO] [stdout] | [INFO] [stdout] 342 | assert_eq!(b.less_than_equals(pt, CoordLevel::One), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 342 - assert_eq!(b.less_than_equals(pt, CoordLevel::One), false); [INFO] [stdout] 342 + assert!(!b.less_than_equals(pt, CoordLevel::One)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:343:9 [INFO] [stdout] | [INFO] [stdout] 343 | assert_eq!(b.less_than_equals(pt, CoordLevel::Two), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 343 - assert_eq!(b.less_than_equals(pt, CoordLevel::Two), false); [INFO] [stdout] 343 + assert!(!b.less_than_equals(pt, CoordLevel::Two)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:344:9 [INFO] [stdout] | [INFO] [stdout] 344 | assert_eq!(b.less_than_equals(pt, CoordLevel::Three), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 344 - assert_eq!(b.less_than_equals(pt, CoordLevel::Three), false); [INFO] [stdout] 344 + assert!(!b.less_than_equals(pt, CoordLevel::Three)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/santorini.rs:345:9 [INFO] [stdout] | [INFO] [stdout] 345 | assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 345 - assert_eq!(b.less_than_equals(pt, CoordLevel::Capped), true); [INFO] [stdout] 345 + assert!(b.less_than_equals(pt, CoordLevel::Capped)); [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/santorini.rs:502:25 [INFO] [stdout] | [INFO] [stdout] 502 | / match Point::new_(Coord(x + dx), Coord(y + dy)) { [INFO] [stdout] 503 | | Some(point) => { [INFO] [stdout] 504 | | array[x as usize][y as usize].1[count] = point; [INFO] [stdout] 505 | | count += 1; [INFO] [stdout] 506 | | } [INFO] [stdout] 507 | | None => (), [INFO] [stdout] 508 | | } [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] 502 ~ if let Some(point) = Point::new_(Coord(x + dx), Coord(y + dy)) { [INFO] [stdout] 503 + array[x as usize][y as usize].1[count] = point; [INFO] [stdout] 504 + count += 1; [INFO] [stdout] 505 + } [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/santorini.rs:638:17 [INFO] [stdout] | [INFO] [stdout] 638 | / match Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 639 | | Some(point) => { [INFO] [stdout] 640 | | let off = point.word * 64 + point.nibble; [INFO] [stdout] 641 | | let diff: i8 = off - prev; [INFO] [stdout] ... | [INFO] [stdout] 647 | | None => (), [INFO] [stdout] 648 | | } [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] 638 ~ if let Some(point) = Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 639 + let off = point.word * 64 + point.nibble; [INFO] [stdout] 640 + let diff: i8 = off - prev; [INFO] [stdout] 641 + let diff: u64 = (diff as u64) << (count * 8); [INFO] [stdout] 642 + offset |= diff; [INFO] [stdout] 643 + prev = off; [INFO] [stdout] 644 + count += 1; [INFO] [stdout] 645 + } [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/santorini.rs:693:21 [INFO] [stdout] | [INFO] [stdout] 693 | / match Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 694 | | Some(point) => { [INFO] [stdout] 695 | | entry[point.word as usize] |= mask << point.nibble; [INFO] [stdout] ... | [INFO] [stdout] 698 | | } [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] 693 ~ if let Some(point) = Point::new_(Coord(point.x().0 + dx), Coord(point.y().0 + dy)) { [INFO] [stdout] 694 + entry[point.word as usize] |= mask << point.nibble; [INFO] [stdout] 695 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/santorini.rs:766:9 [INFO] [stdout] | [INFO] [stdout] 766 | return 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] 766 - return false; [INFO] [stdout] 766 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/santorini.rs:787:21 [INFO] [stdout] | [INFO] [stdout] 787 | self.offsets = self.offsets >> 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.offsets >>= 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/santorini.rs:788:21 [INFO] [stdout] | [INFO] [stdout] 788 | self.board = self.board >> off; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.board >>= off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/santorini.rs:836:13 [INFO] [stdout] | [INFO] [stdout] 836 | let board_b; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `board_b` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 836 ~ [INFO] [stdout] 837 ~ let board_b = if off > 0 { [INFO] [stdout] 838 ~ composite.board.grid[1] << (64 - off) [INFO] [stdout] 839 | } else { [INFO] [stdout] 840 ~ 0 [INFO] [stdout] 841 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/ui/menu.rs:131:1 [INFO] [stdout] | [INFO] [stdout] 131 | mod menu_widget_tests { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 170 | pub struct Menu<'a, T> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 175 | impl<'a, T> Menu<'a, T> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 207 | fn move_span<'a, 'b>(span: Span<'a>) -> Span<'b> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 214 | fn move_spans<'a, 'b>(spans: Spans<'a>) -> Spans<'b> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 219 | impl<'a> Screen for Menu<'a, Result, UpdateError>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/ui/menu.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | self.cursor = self.cursor - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.cursor -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/ui/mod.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn main_menu<'a>() -> Box { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/mcts/santorini.rs:153:21 [INFO] [stdout] | [INFO] [stdout] 153 | &mut actions.shuffle(rng); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 153 | let _ = &mut actions.shuffle(rng); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mod.rs:24:15 [INFO] [stdout] | [INFO] [stdout] 24 | fn render(&self, game: &Game) -> BoardWidget; [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 24 | fn render(&self, game: &Game) -> BoardWidget<'_>; [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:197:15 [INFO] [stdout] | [INFO] [stdout] 197 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 197 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:222:15 [INFO] [stdout] | [INFO] [stdout] 222 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 222 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:250:15 [INFO] [stdout] | [INFO] [stdout] 250 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 250 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/heuristic_ai.rs:272:15 [INFO] [stdout] | [INFO] [stdout] 272 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 272 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:94:51 [INFO] [stdout] | [INFO] [stdout] 94 | fn default_render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 94 | fn default_render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:115:54 [INFO] [stdout] | [INFO] [stdout] 115 | fn pawn_at(game: &Game, loc: Point) -> Option> { [INFO] [stdout] | ^^^^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 115 | fn pawn_at(game: &Game, loc: Point) -> Option> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:130:15 [INFO] [stdout] | [INFO] [stdout] 130 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 130 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:171:15 [INFO] [stdout] | [INFO] [stdout] 171 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 171 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:219:15 [INFO] [stdout] | [INFO] [stdout] 219 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 219 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/human.rs:268:15 [INFO] [stdout] | [INFO] [stdout] 268 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 268 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: panic message is not a string literal [INFO] [stdout] --> src/player/mcts_ai.rs:47:47 [INFO] [stdout] | [INFO] [stdout] 47 | MctsOrParams::Params(_) => panic!(message), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: use std::panic::panic_any instead [INFO] [stdout] | [INFO] [stdout] 47 - MctsOrParams::Params(_) => panic!(message), [INFO] [stdout] 47 + MctsOrParams::Params(_) => std::panic::panic_any(message), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:107:15 [INFO] [stdout] | [INFO] [stdout] 107 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 107 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:132:15 [INFO] [stdout] | [INFO] [stdout] 132 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 132 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:173:15 [INFO] [stdout] | [INFO] [stdout] 173 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 173 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/mcts_ai.rs:194:15 [INFO] [stdout] | [INFO] [stdout] 194 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 194 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:48:15 [INFO] [stdout] | [INFO] [stdout] 48 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 48 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 73 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:98:15 [INFO] [stdout] | [INFO] [stdout] 98 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 98 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/player/random_ai.rs:121:15 [INFO] [stdout] | [INFO] [stdout] 121 | fn render(&self, game: &Game) -> BoardWidget { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 121 | fn render(&self, game: &Game) -> BoardWidget<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:425:25 [INFO] [stdout] | [INFO] [stdout] 425 | pub fn player_pawns(&self, player: Player) -> [Pawn; 2] { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 425 | pub fn player_pawns(&self, player: Player) -> [Pawn<'_, S>; 2] { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:442:25 [INFO] [stdout] | [INFO] [stdout] 442 | pub fn active_pawns(&self) -> [Pawn; 2] { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 442 | pub fn active_pawns(&self) -> [Pawn<'_, S>; 2] { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:446:27 [INFO] [stdout] | [INFO] [stdout] 446 | pub fn inactive_pawns(&self) -> [Pawn; 2] { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 446 | pub fn inactive_pawns(&self) -> [Pawn<'_, S>; 2] { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/santorini.rs:972:24 [INFO] [stdout] | [INFO] [stdout] 972 | pub fn active_pawn(&self) -> Pawn { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 972 | pub fn active_pawn(&self) -> Pawn<'_, Build> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ui/app.rs:26:28 [INFO] [stdout] | [INFO] [stdout] 26 | fn current_player_name(&self) -> Span { [INFO] [stdout] | ^^^^^ ^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 26 | fn current_player_name(&self) -> Span<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/ui/menu.rs:58:26 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn selected_item(&self) -> &Spans { [INFO] [stdout] | ^^^^^ ^^^^^^ [INFO] [stdout] | | || [INFO] [stdout] | | |the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 58 | pub fn selected_item(&self) -> &Spans<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 28.96s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: criterion v0.3.3 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2` [INFO] running `Command { std: "docker" "inspect" "9a7067897762c698a1a7372bd16b46bf68dddc6a31d2a9cb850e301470d42c5e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9a7067897762c698a1a7372bd16b46bf68dddc6a31d2a9cb850e301470d42c5e", kill_on_drop: false }` [INFO] [stdout] 9a7067897762c698a1a7372bd16b46bf68dddc6a31d2a9cb850e301470d42c5e