[INFO] cloning repository https://github.com/ToreAad/gobot-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ToreAad/gobot-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FToreAad%2Fgobot-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FToreAad%2Fgobot-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0c10bea8c0d811725587d3407ae0f0067c1c463c [INFO] linting ToreAad/gobot-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FToreAad%2Fgobot-rs" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ToreAad/gobot-rs [INFO] finished tweaking git repo https://github.com/ToreAad/gobot-rs [INFO] tweaked toml for git repo https://github.com/ToreAad/gobot-rs written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ToreAad/gobot-rs on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ToreAad/gobot-rs already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded sgf-parse v4.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 3ea5b4075e06561d8f6a9c195103096d8bb7ab240dcbc9874d457b79eaee39ce [INFO] running `Command { std: "docker" "start" "-a" "3ea5b4075e06561d8f6a9c195103096d8bb7ab240dcbc9874d457b79eaee39ce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3ea5b4075e06561d8f6a9c195103096d8bb7ab240dcbc9874d457b79eaee39ce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3ea5b4075e06561d8f6a9c195103096d8bb7ab240dcbc9874d457b79eaee39ce", kill_on_drop: false }` [INFO] [stdout] 3ea5b4075e06561d8f6a9c195103096d8bb7ab240dcbc9874d457b79eaee39ce [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b9008ac4b7c2c6db06dfdfd9cb3408847d316e7fbcef966f77ef32a7bd0821cb [INFO] running `Command { std: "docker" "start" "-a" "b9008ac4b7c2c6db06dfdfd9cb3408847d316e7fbcef966f77ef32a7bd0821cb", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.132 [INFO] [stderr] Checking sgf-parse v4.0.0 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking getrandom v0.2.7 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking go-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/go/goboard.rs:212:28 [INFO] [stdout] | [INFO] [stdout] 212 | pub fn is_point_an_eye(self: &Self, point: Point, player: Player) -> bool{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 212 - pub fn is_point_an_eye(self: &Self, point: Point, player: Player) -> bool{ [INFO] [stdout] 212 + pub fn is_point_an_eye(&self, point: Point, player: Player) -> bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/go/gostring.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | GoString{player, stones: stones, liberties: liberties} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `stones` [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/go/gostring.rs:23:42 [INFO] [stdout] | [INFO] [stdout] 23 | GoString{player, stones: stones, liberties: liberties} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `liberties` [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: unused import: `sgf_parse::GameType` [INFO] [stdout] --> src/go/sgf.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | use sgf_parse::GameType; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/go/goboard.rs:212:28 [INFO] [stdout] | [INFO] [stdout] 212 | pub fn is_point_an_eye(self: &Self, point: Point, player: Player) -> bool{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 212 - pub fn is_point_an_eye(self: &Self, point: Point, player: Player) -> bool{ [INFO] [stdout] 212 + pub fn is_point_an_eye(&self, point: Point, player: Player) -> bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/go/gostring.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | GoString{player, stones: stones, liberties: liberties} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `stones` [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/go/gostring.rs:23:42 [INFO] [stdout] | [INFO] [stdout] 23 | GoString{player, stones: stones, liberties: liberties} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `liberties` [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/go/zobrist.rs:3271:13 [INFO] [stdout] | [INFO] [stdout] 3271 | empty_board: empty_board, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `empty_board` [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/go/go.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | Go{states: states, current_player:current_player} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `states` [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/go/go.rs:17:28 [INFO] [stdout] | [INFO] [stdout] 17 | Go{states: states, current_player:current_player} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_player` [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/go/zobrist.rs:3271:13 [INFO] [stdout] | [INFO] [stdout] 3271 | empty_board: empty_board, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `empty_board` [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/go/go.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | Go{states: states, current_player:current_player} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `states` [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/go/go.rs:17:28 [INFO] [stdout] | [INFO] [stdout] 17 | Go{states: states, current_player:current_player} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_player` [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: method `add_stone` is never used [INFO] [stdout] --> src/go/gostring.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl GoString{ [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn add_stone(&mut self, point: Point){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `winning_margin` is never used [INFO] [stdout] --> src/go/scoring.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 36 | impl GameResult { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn winning_margin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `num_dame` and `dame_points` are never read [INFO] [stdout] --> src/go/scoring.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 52 | pub struct Territory { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 57 | pub num_dame: u8, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 58 | pub dame_points: Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_move` is never used [INFO] [stdout] --> src/go/sgf.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn get_move(node: &SgfNode) -> Option<(Action, Player)>{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_branches` is never used [INFO] [stdout] --> src/go/sgf.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn get_branches(node: &SgfNode) -> Vec>{ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_moves` is never used [INFO] [stdout] --> src/go/sgf.rs:78:8 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn get_moves(sgf: &str) -> Vec>{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserAgent` is never constructed [INFO] [stdout] --> src/agents/useragent.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct UserAgent{} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Resign` is never constructed [INFO] [stdout] --> src/game/action.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum Action{ [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 9 | Resign [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Action` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next_player` is never used [INFO] [stdout] --> src/game/game.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Game : std::fmt::Display { [INFO] [stdout] | ---- method in this trait [INFO] [stdout] ... [INFO] [stdout] 9 | fn next_player(&self) -> Player; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `score` is never used [INFO] [stdout] --> src/game/score.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Score: std::fmt::Display{ [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 4 | fn score(&self, player: Player) -> f32; [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/go/gamestate.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn is_over(states: &Vec) -> bool{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - pub fn is_over(states: &Vec) -> bool{ [INFO] [stdout] 35 + pub fn is_over(states: &[GameState]) -> bool{ [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/go/gamestate.rs:58:41 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn does_move_violate_ko(states: &Vec, move_: Action) -> bool{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 58 - pub fn does_move_violate_ko(states: &Vec, move_: Action) -> bool{ [INFO] [stdout] 58 + pub fn does_move_violate_ko(states: &[GameState], move_: Action) -> bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/gamestate.rs:107:52 [INFO] [stdout] | [INFO] [stdout] 107 | if GameState::is_move_self_capture(&board, player, point){ [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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 `Action` which implements the `Copy` trait [INFO] [stdout] --> src/go/gamestate.rs:120:46 [INFO] [stdout] | [INFO] [stdout] 120 | if !GameState::is_valid_move(states, move_.clone()){ [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `move_` [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: accessing last element with `states.get(states.len() - 1)` [INFO] [stdout] --> src/go/gamestate.rs:124:26 [INFO] [stdout] | [INFO] [stdout] 124 | let prev_state = states.get(states.len()-1).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `states.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Action` which implements the `Copy` trait [INFO] [stdout] --> src/go/gamestate.rs:129:29 [INFO] [stdout] | [INFO] [stdout] 129 | last_move: Some(move_.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `move_` [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 `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/goboard.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 34 - write!(f, "\n")?; [INFO] [stdout] 34 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/goboard.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 40 - write!(f, "\n")?; [INFO] [stdout] 40 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/goboard.rs:97:49 [INFO] [stdout] | [INFO] [stdout] 97 | new_string = new_string.merged_with(&same_color_string); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `same_color_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/goboard.rs:139:62 [INFO] [stdout] | [INFO] [stdout] 139 | ... new_neighbour_string.add_liberty(&point); [INFO] [stdout] | ^^^^^^ help: change this to: `point` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/goboard.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | let key = (point.clone(), Some(string.player)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*point` [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/go/goboard.rs:154:30 [INFO] [stdout] | [INFO] [stdout] 154 | self.grid.remove(&point); [INFO] [stdout] | ^^^^^^ help: change this to: `point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/go/goboard.rs:215:12 [INFO] [stdout] | [INFO] [stdout] 215 | if !board.get(&point).is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `board.get(&point).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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/goboard.rs:237:33 [INFO] [stdout] | [INFO] [stdout] 237 | if board.is_on_grid(&corner){ [INFO] [stdout] | ^^^^^^^ help: change this to: `corner` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/gostring.rs:36:31 [INFO] [stdout] | [INFO] [stdout] 36 | self.liberties.insert(point.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*point` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/scoring.rs:168:31 [INFO] [stdout] | [INFO] [stdout] 168 | let mut all_points = vec![start_pos.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*start_pos` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/scoring.rs:170:20 [INFO] [stdout] | [INFO] [stdout] 170 | visited.insert(start_pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*start_pos` [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: length comparison to zero [INFO] [stdout] --> src/go/sgf.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if collection.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `collection.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: using `clone` on type `(Action, Player)` which implements the `Copy` trait [INFO] [stdout] --> src/go/sgf.rs:71:31 [INFO] [stdout] | [INFO] [stdout] 71 | branch.push_front(m.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `m` [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: unused variable: `p` [INFO] [stdout] --> src/main.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | for (i, (m, p)) in moves[0].iter().enumerate(){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `winning_margin` is never used [INFO] [stdout] --> src/go/scoring.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 36 | impl GameResult { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn winning_margin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `dame_points` is never read [INFO] [stdout] --> src/go/scoring.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 52 | pub struct Territory { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 58 | pub dame_points: Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserAgent` is never constructed [INFO] [stdout] --> src/agents/useragent.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct UserAgent{} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next_player` is never used [INFO] [stdout] --> src/game/game.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Game : std::fmt::Display { [INFO] [stdout] | ---- method in this trait [INFO] [stdout] ... [INFO] [stdout] 9 | fn next_player(&self) -> Player; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `score` is never used [INFO] [stdout] --> src/game/score.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub trait Score: std::fmt::Display{ [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 4 | fn score(&self, player: Player) -> f32; [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/go/gamestate.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn is_over(states: &Vec) -> bool{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - pub fn is_over(states: &Vec) -> bool{ [INFO] [stdout] 35 + pub fn is_over(states: &[GameState]) -> bool{ [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/go/gamestate.rs:58:41 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn does_move_violate_ko(states: &Vec, move_: Action) -> bool{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 58 - pub fn does_move_violate_ko(states: &Vec, move_: Action) -> bool{ [INFO] [stdout] 58 + pub fn does_move_violate_ko(states: &[GameState], move_: Action) -> bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/gamestate.rs:107:52 [INFO] [stdout] | [INFO] [stdout] 107 | if GameState::is_move_self_capture(&board, player, point){ [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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 `Action` which implements the `Copy` trait [INFO] [stdout] --> src/go/gamestate.rs:120:46 [INFO] [stdout] | [INFO] [stdout] 120 | if !GameState::is_valid_move(states, move_.clone()){ [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `move_` [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: accessing last element with `states.get(states.len() - 1)` [INFO] [stdout] --> src/go/gamestate.rs:124:26 [INFO] [stdout] | [INFO] [stdout] 124 | let prev_state = states.get(states.len()-1).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `states.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Action` which implements the `Copy` trait [INFO] [stdout] --> src/go/gamestate.rs:129:29 [INFO] [stdout] | [INFO] [stdout] 129 | last_move: Some(move_.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `move_` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | assert_eq!(violates_ko, 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] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 185 - assert_eq!(violates_ko, false); [INFO] [stdout] 185 + assert!(!violates_ko); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | assert_eq!(violates_ko, 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] 188 - assert_eq!(violates_ko, false); [INFO] [stdout] 188 + assert!(!violates_ko); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | assert_eq!(violates_ko, 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] 191 - assert_eq!(violates_ko, false); [INFO] [stdout] 191 + assert!(!violates_ko); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | assert_eq!(violates_ko, 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] 194 - assert_eq!(violates_ko, true); [INFO] [stdout] 194 + assert!(violates_ko); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | assert_eq!(violates_ko, 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] 196 - assert_eq!(violates_ko, true); [INFO] [stdout] 196 + assert!(violates_ko); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | assert_eq!(GameState::is_over(&states), 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] 203 - assert_eq!(GameState::is_over(&states), true); [INFO] [stdout] 203 + assert!(GameState::is_over(&states)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | assert_eq!(GameState::is_over(&states), 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] 207 - assert_eq!(GameState::is_over(&states), false); [INFO] [stdout] 207 + assert!(!GameState::is_over(&states)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | assert_eq!(GameState::is_over(&states), 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] 209 - assert_eq!(GameState::is_over(&states), true); [INFO] [stdout] 209 + assert!(GameState::is_over(&states)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | assert_eq!(GameState::is_over(&states), 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] 213 - assert_eq!(GameState::is_over(&states), false); [INFO] [stdout] 213 + assert!(!GameState::is_over(&states)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:216:9 [INFO] [stdout] | [INFO] [stdout] 216 | assert_eq!(GameState::is_over(&states), 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] 216 - assert_eq!(GameState::is_over(&states), false); [INFO] [stdout] 216 + assert!(!GameState::is_over(&states)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:218:9 [INFO] [stdout] | [INFO] [stdout] 218 | assert_eq!(GameState::is_over(&states), 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] 218 - assert_eq!(GameState::is_over(&states), true); [INFO] [stdout] 218 + assert!(GameState::is_over(&states)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/gamestate.rs:227:9 [INFO] [stdout] | [INFO] [stdout] 227 | assert_eq!(states.last().unwrap().board.is_self_capture(Player::White, &Point { row: 1, col: 1 }), 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] 227 - assert_eq!(states.last().unwrap().board.is_self_capture(Player::White, &Point { row: 1, col: 1 }), true); [INFO] [stdout] 227 + assert!(states.last().unwrap().board.is_self_capture(Player::White, &Point { row: 1, col: 1 })); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/goboard.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 34 - write!(f, "\n")?; [INFO] [stdout] 34 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/goboard.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | write!(f, "\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 40 - write!(f, "\n")?; [INFO] [stdout] 40 + writeln!(f)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/goboard.rs:97:49 [INFO] [stdout] | [INFO] [stdout] 97 | new_string = new_string.merged_with(&same_color_string); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `same_color_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/goboard.rs:139:62 [INFO] [stdout] | [INFO] [stdout] 139 | ... new_neighbour_string.add_liberty(&point); [INFO] [stdout] | ^^^^^^ help: change this to: `point` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/goboard.rs:151:24 [INFO] [stdout] | [INFO] [stdout] 151 | let key = (point.clone(), Some(string.player)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*point` [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/go/goboard.rs:154:30 [INFO] [stdout] | [INFO] [stdout] 154 | self.grid.remove(&point); [INFO] [stdout] | ^^^^^^ help: change this to: `point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/go/goboard.rs:215:12 [INFO] [stdout] | [INFO] [stdout] 215 | if !board.get(&point).is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `board.get(&point).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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/go/goboard.rs:237:33 [INFO] [stdout] | [INFO] [stdout] 237 | if board.is_on_grid(&corner){ [INFO] [stdout] | ^^^^^^^ help: change this to: `corner` [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: module has the same name as its containing module [INFO] [stdout] --> src/go/mod.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | pub mod go; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/agents/randomagent.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if candidates.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `candidates.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: module has the same name as its containing module [INFO] [stdout] --> src/game/mod.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub mod game; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | print!("{}\n", game); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 34 - print!("{}\n", game); [INFO] [stdout] 34 + println!("{}", game); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | print!("{}\n", result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 36 - print!("{}\n", result); [INFO] [stdout] 36 + println!("{}", result); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/go/goboard.rs:230:23 [INFO] [stdout] | [INFO] [stdout] 230 | let corners = vec![ [INFO] [stdout] | _______________________^ [INFO] [stdout] 231 | | Point{row: point.row - 1, col: point.col - 1}, [INFO] [stdout] 232 | | Point{row: point.row - 1, col: point.col + 1}, [INFO] [stdout] 233 | | Point{row: point.row + 1, col: point.col - 1}, [INFO] [stdout] 234 | | Point{row: point.row + 1, col: point.col + 1}, [INFO] [stdout] 235 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 230 ~ let corners = [Point{row: point.row - 1, col: point.col - 1}, [INFO] [stdout] 231 + Point{row: point.row - 1, col: point.col + 1}, [INFO] [stdout] 232 + Point{row: point.row + 1, col: point.col - 1}, [INFO] [stdout] 233 ~ Point{row: point.row + 1, col: point.col + 1}]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/go/goboard.rs:390:21 [INFO] [stdout] | [INFO] [stdout] 390 | None => assert!(false), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/go/goboard.rs:398:21 [INFO] [stdout] | [INFO] [stdout] 398 | None => assert!(false), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/go/goboard.rs:412:21 [INFO] [stdout] | [INFO] [stdout] 412 | None => assert!(false), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/go/goboard.rs:420:21 [INFO] [stdout] | [INFO] [stdout] 420 | None => assert!(false), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/go/goboard.rs:437:21 [INFO] [stdout] | [INFO] [stdout] 437 | None => assert!(false), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/go/goboard.rs:455:21 [INFO] [stdout] | [INFO] [stdout] 455 | None => assert!(false), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:473:9 [INFO] [stdout] | [INFO] [stdout] 473 | / assert_eq!( [INFO] [stdout] 474 | | board.is_self_capture(Player::Black, &Point { row: 1, col: 2 }), [INFO] [stdout] 475 | | true [INFO] [stdout] 476 | | ); [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] 473 ~ assert!( [INFO] [stdout] 474 ~ board.is_self_capture(Player::Black, &Point { row: 1, col: 2 }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:490:9 [INFO] [stdout] | [INFO] [stdout] 490 | / assert_eq!( [INFO] [stdout] 491 | | board.is_self_capture(Player::Black, &Point { row: 1, col: 2 }), [INFO] [stdout] 492 | | false [INFO] [stdout] 493 | | ); [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] 490 ~ assert!( [INFO] [stdout] 491 ~ !board.is_self_capture(Player::Black, &Point { row: 1, col: 2 }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:502:9 [INFO] [stdout] | [INFO] [stdout] 502 | / assert_eq!( [INFO] [stdout] 503 | | board.is_self_capture(Player::White, &Point { row: 1, col: 1 }), [INFO] [stdout] 504 | | true [INFO] [stdout] 505 | | ); [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] 502 ~ assert!( [INFO] [stdout] 503 ~ board.is_self_capture(Player::White, &Point { row: 1, col: 1 }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:525:9 [INFO] [stdout] | [INFO] [stdout] 525 | assert_eq!(board.is_point_an_eye(Point{row: 3, col: 1}, Player::White), 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] 525 - assert_eq!(board.is_point_an_eye(Point{row: 3, col: 1}, Player::White), true); [INFO] [stdout] 525 + assert!(board.is_point_an_eye(Point{row: 3, col: 1}, Player::White)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:526:9 [INFO] [stdout] | [INFO] [stdout] 526 | assert_eq!(board.is_point_an_eye(Point{row: 5, col: 1}, Player::White), 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] 526 - assert_eq!(board.is_point_an_eye(Point{row: 5, col: 1}, Player::White), true); [INFO] [stdout] 526 + assert!(board.is_point_an_eye(Point{row: 5, col: 1}, Player::White)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:527:9 [INFO] [stdout] | [INFO] [stdout] 527 | assert_eq!(board.is_point_an_eye(Point{row: 3, col: 1}, Player::Black), 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] 527 - assert_eq!(board.is_point_an_eye(Point{row: 3, col: 1}, Player::Black), false); [INFO] [stdout] 527 + assert!(!board.is_point_an_eye(Point{row: 3, col: 1}, Player::Black)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:528:9 [INFO] [stdout] | [INFO] [stdout] 528 | assert_eq!(board.is_point_an_eye(Point{row: 5, col: 1}, Player::Black), 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] 528 - assert_eq!(board.is_point_an_eye(Point{row: 5, col: 1}, Player::Black), false); [INFO] [stdout] 528 + assert!(!board.is_point_an_eye(Point{row: 5, col: 1}, Player::Black)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:529:9 [INFO] [stdout] | [INFO] [stdout] 529 | assert_eq!(board.is_point_an_eye(Point{row: 5, col: 5}, Player::Black), 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] 529 - assert_eq!(board.is_point_an_eye(Point{row: 5, col: 5}, Player::Black), false); [INFO] [stdout] 529 + assert!(!board.is_point_an_eye(Point{row: 5, col: 5}, Player::Black)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/go/goboard.rs:530:9 [INFO] [stdout] | [INFO] [stdout] 530 | assert_eq!(board.is_point_an_eye(Point{row: 5, col: 5}, Player::White), 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] 530 - assert_eq!(board.is_point_an_eye(Point{row: 5, col: 5}, Player::White), false); [INFO] [stdout] 530 + assert!(!board.is_point_an_eye(Point{row: 5, col: 5}, Player::White)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/gostring.rs:36:31 [INFO] [stdout] | [INFO] [stdout] 36 | self.liberties.insert(point.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*point` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/scoring.rs:168:31 [INFO] [stdout] | [INFO] [stdout] 168 | let mut all_points = vec![start_pos.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*start_pos` [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 `Point` which implements the `Copy` trait [INFO] [stdout] --> src/go/scoring.rs:170:20 [INFO] [stdout] | [INFO] [stdout] 170 | visited.insert(start_pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*start_pos` [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 `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 253 - print!("{}\n", board); [INFO] [stdout] 253 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:255:9 [INFO] [stdout] | [INFO] [stdout] 255 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 255 - print!("{}\n", board); [INFO] [stdout] 255 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:257:9 [INFO] [stdout] | [INFO] [stdout] 257 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 257 - print!("{}\n", board); [INFO] [stdout] 257 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:259:9 [INFO] [stdout] | [INFO] [stdout] 259 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 259 - print!("{}\n", board); [INFO] [stdout] 259 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 261 - print!("{}\n", board); [INFO] [stdout] 261 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:263:9 [INFO] [stdout] | [INFO] [stdout] 263 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 263 - print!("{}\n", board); [INFO] [stdout] 263 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:265:9 [INFO] [stdout] | [INFO] [stdout] 265 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 265 - print!("{}\n", board); [INFO] [stdout] 265 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:267:9 [INFO] [stdout] | [INFO] [stdout] 267 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 267 - print!("{}\n", board); [INFO] [stdout] 267 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 269 - print!("{}\n", board); [INFO] [stdout] 269 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 271 - print!("{}\n", board); [INFO] [stdout] 271 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:273:9 [INFO] [stdout] | [INFO] [stdout] 273 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 273 - print!("{}\n", board); [INFO] [stdout] 273 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:275:9 [INFO] [stdout] | [INFO] [stdout] 275 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 275 - print!("{}\n", board); [INFO] [stdout] 275 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:277:9 [INFO] [stdout] | [INFO] [stdout] 277 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 277 - print!("{}\n", board); [INFO] [stdout] 277 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:279:9 [INFO] [stdout] | [INFO] [stdout] 279 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 279 - print!("{}\n", board); [INFO] [stdout] 279 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 281 - print!("{}\n", board); [INFO] [stdout] 281 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:283:9 [INFO] [stdout] | [INFO] [stdout] 283 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 283 - print!("{}\n", board); [INFO] [stdout] 283 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 285 - print!("{}\n", board); [INFO] [stdout] 285 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/go/scoring.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | print!("{}\n", board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 287 - print!("{}\n", board); [INFO] [stdout] 287 + println!("{}", board); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/go/sgf.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if collection.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `collection.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: using `clone` on type `(Action, Player)` which implements the `Copy` trait [INFO] [stdout] --> src/go/sgf.rs:71:31 [INFO] [stdout] | [INFO] [stdout] 71 | branch.push_front(m.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `m` [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: module has the same name as its containing module [INFO] [stdout] --> src/go/mod.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | pub mod go; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/agents/randomagent.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | if candidates.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `candidates.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: module has the same name as its containing module [INFO] [stdout] --> src/game/mod.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub mod game; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | print!("{}\n", game); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 34 - print!("{}\n", game); [INFO] [stdout] 34 + println!("{}", game); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | print!("{}\n", result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 36 - print!("{}\n", result); [INFO] [stdout] 36 + println!("{}", result); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Action` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:68:46 [INFO] [stdout] | [INFO] [stdout] 68 | GameState::apply_move(&mut game, m.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*m` [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 `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | print!("{}\n", current_game); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 71 - print!("{}\n", current_game); [INFO] [stdout] 71 + println!("{}", current_game); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/main.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | print!("Move number: {}\n", i+1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 72 - print!("Move number: {}\n", i+1); [INFO] [stdout] 72 + println!("Move number: {}", i+1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/go/goboard.rs:230:23 [INFO] [stdout] | [INFO] [stdout] 230 | let corners = vec![ [INFO] [stdout] | _______________________^ [INFO] [stdout] 231 | | Point{row: point.row - 1, col: point.col - 1}, [INFO] [stdout] 232 | | Point{row: point.row - 1, col: point.col + 1}, [INFO] [stdout] 233 | | Point{row: point.row + 1, col: point.col - 1}, [INFO] [stdout] 234 | | Point{row: point.row + 1, col: point.col + 1}, [INFO] [stdout] 235 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 230 ~ let corners = [Point{row: point.row - 1, col: point.col - 1}, [INFO] [stdout] 231 + Point{row: point.row - 1, col: point.col + 1}, [INFO] [stdout] 232 + Point{row: point.row + 1, col: point.col - 1}, [INFO] [stdout] 233 ~ Point{row: point.row + 1, col: point.col + 1}]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.39s [INFO] running `Command { std: "docker" "inspect" "b9008ac4b7c2c6db06dfdfd9cb3408847d316e7fbcef966f77ef32a7bd0821cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b9008ac4b7c2c6db06dfdfd9cb3408847d316e7fbcef966f77ef32a7bd0821cb", kill_on_drop: false }` [INFO] [stdout] b9008ac4b7c2c6db06dfdfd9cb3408847d316e7fbcef966f77ef32a7bd0821cb