[INFO] cloning repository https://github.com/jh85/uno [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jh85/uno" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjh85%2Funo", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjh85%2Funo'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 782ed385de89912cf4f834adc5af353a0bef1a21 [INFO] linting jh85/uno against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjh85%2Funo" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jh85/uno [INFO] finished tweaking git repo https://github.com/jh85/uno [INFO] tweaked toml for git repo https://github.com/jh85/uno written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jh85/uno 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/jh85/uno 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] Downloading crates ... [INFO] [stderr] Downloaded clap v3.1.10 [INFO] [stderr] Downloaded libc v0.2.123 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 96ff7da2eb6c0ed0d558df89666a027d40bac9187db0ca11db8fb56776e715ca [INFO] running `Command { std: "docker" "start" "-a" "96ff7da2eb6c0ed0d558df89666a027d40bac9187db0ca11db8fb56776e715ca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "96ff7da2eb6c0ed0d558df89666a027d40bac9187db0ca11db8fb56776e715ca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "96ff7da2eb6c0ed0d558df89666a027d40bac9187db0ca11db8fb56776e715ca", kill_on_drop: false }` [INFO] [stdout] 96ff7da2eb6c0ed0d558df89666a027d40bac9187db0ca11db8fb56776e715ca [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b90351c17d0f104293c61d4f1f2a08b122404efb2aab405ef929be38e0681b4f [INFO] running `Command { std: "docker" "start" "-a" "b90351c17d0f104293c61d4f1f2a08b122404efb2aab405ef929be38e0681b4f", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.123 [INFO] [stderr] Compiling syn v1.0.91 [INFO] [stderr] Checking hashbrown v0.11.2 [INFO] [stderr] Checking os_str_bytes v6.0.0 [INFO] [stderr] Checking textwrap v0.15.0 [INFO] [stderr] Compiling indexmap v1.8.1 [INFO] [stderr] Compiling quote v1.0.18 [INFO] [stderr] Checking clap_lex v0.1.1 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Checking getrandom v0.2.6 [INFO] [stderr] Checking atty v0.2.14 [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] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling clap_derive v3.1.7 [INFO] [stderr] Checking clap v3.1.10 [INFO] [stderr] Checking uno3 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/player.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | seat: seat, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seat` [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/player.rs:22:6 [INFO] [stdout] | [INFO] [stdout] 22 | n_players: n_players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_players` [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/player.rs:44:33 [INFO] [stdout] | [INFO] [stdout] 44 | return Action::DiscardIt {card: card}; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `card` [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/player.rs:73:28 [INFO] [stdout] | [INFO] [stdout] 73 | return Action::Discard {card:card}; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `card` [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/player.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | return Action::Discard {card: card}; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `card` [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/main.rs:179:6 [INFO] [stdout] | [INFO] [stdout] 179 | seed: seed, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seed` [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/main.rs:180:6 [INFO] [stdout] | [INFO] [stdout] 180 | n_games: n_games, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `n_games` [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/main.rs:181:6 [INFO] [stdout] | [INFO] [stdout] 181 | n_players: n_players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_players` [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/main.rs:182:6 [INFO] [stdout] | [INFO] [stdout] 182 | n_initial_cards: n_initial_cards, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_initial_cards` [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/main.rs:183:6 [INFO] [stdout] | [INFO] [stdout] 183 | logging: logging, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `logging` [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/main.rs:212:6 [INFO] [stdout] | [INFO] [stdout] 212 | scores: scores, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `scores` [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/main.rs:213:6 [INFO] [stdout] | [INFO] [stdout] 213 | dealer: dealer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dealer` [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/main.rs:214:6 [INFO] [stdout] | [INFO] [stdout] 214 | total_turns: total_turns, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_turns` [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/main.rs:215:6 [INFO] [stdout] | [INFO] [stdout] 215 | n_reshuffles: n_reshuffles, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_reshuffles` [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/main.rs:217:6 [INFO] [stdout] | [INFO] [stdout] 217 | state: state, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `state` [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/main.rs:240:23 [INFO] [stdout] | [INFO] [stdout] 240 | let config = Config {n_initial_cards: n_initial_cards}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_initial_cards` [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/main.rs:245:6 [INFO] [stdout] | [INFO] [stdout] 245 | seed: seed, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seed` [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/main.rs:246:6 [INFO] [stdout] | [INFO] [stdout] 246 | rng: rng, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `rng` [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/main.rs:247:6 [INFO] [stdout] | [INFO] [stdout] 247 | dealer: dealer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dealer` [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/main.rs:256:6 [INFO] [stdout] | [INFO] [stdout] 256 | draw_pile: draw_pile, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `draw_pile` [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/main.rs:283:6 [INFO] [stdout] | [INFO] [stdout] 283 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [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/main.rs:284:6 [INFO] [stdout] | [INFO] [stdout] 284 | n_players: n_players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_players` [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/main.rs:285:6 [INFO] [stdout] | [INFO] [stdout] 285 | stage: stage, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `stage` [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/main.rs:286:6 [INFO] [stdout] | [INFO] [stdout] 286 | players: players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `players` [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/main.rs:376:52 [INFO] [stdout] | [INFO] [stdout] 376 | self.stage.game_state = Some(GameState::Win {winner: winner}); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `winner` [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/main.rs:416:41 [INFO] [stdout] | [INFO] [stdout] 416 | let mut actions = vec![Action::KeepIt {card:card}]; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `card` [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/main.rs:667:6 [INFO] [stdout] | [INFO] [stdout] 667 | seat: seat, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seat` [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/main.rs:671:6 [INFO] [stdout] | [INFO] [stdout] 671 | n_cards: n_cards, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `n_cards` [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/main.rs:765:6 [INFO] [stdout] | [INFO] [stdout] 765 | seat: seat, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seat` [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/main.rs:766:6 [INFO] [stdout] | [INFO] [stdout] 766 | hand: hand, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `hand` [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/player.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | seat: seat, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seat` [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/player.rs:22:6 [INFO] [stdout] | [INFO] [stdout] 22 | n_players: n_players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_players` [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/player.rs:44:33 [INFO] [stdout] | [INFO] [stdout] 44 | return Action::DiscardIt {card: card}; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `card` [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/player.rs:73:28 [INFO] [stdout] | [INFO] [stdout] 73 | return Action::Discard {card:card}; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `card` [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/player.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | return Action::Discard {card: card}; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `card` [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/main.rs:179:6 [INFO] [stdout] | [INFO] [stdout] 179 | seed: seed, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seed` [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/main.rs:180:6 [INFO] [stdout] | [INFO] [stdout] 180 | n_games: n_games, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `n_games` [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/main.rs:181:6 [INFO] [stdout] | [INFO] [stdout] 181 | n_players: n_players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_players` [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/main.rs:182:6 [INFO] [stdout] | [INFO] [stdout] 182 | n_initial_cards: n_initial_cards, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_initial_cards` [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/main.rs:183:6 [INFO] [stdout] | [INFO] [stdout] 183 | logging: logging, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `logging` [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/main.rs:212:6 [INFO] [stdout] | [INFO] [stdout] 212 | scores: scores, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `scores` [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/main.rs:213:6 [INFO] [stdout] | [INFO] [stdout] 213 | dealer: dealer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dealer` [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/main.rs:214:6 [INFO] [stdout] | [INFO] [stdout] 214 | total_turns: total_turns, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_turns` [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/main.rs:215:6 [INFO] [stdout] | [INFO] [stdout] 215 | n_reshuffles: n_reshuffles, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_reshuffles` [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/main.rs:217:6 [INFO] [stdout] | [INFO] [stdout] 217 | state: state, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `state` [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/main.rs:240:23 [INFO] [stdout] | [INFO] [stdout] 240 | let config = Config {n_initial_cards: n_initial_cards}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_initial_cards` [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/main.rs:245:6 [INFO] [stdout] | [INFO] [stdout] 245 | seed: seed, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seed` [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/main.rs:246:6 [INFO] [stdout] | [INFO] [stdout] 246 | rng: rng, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `rng` [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/main.rs:247:6 [INFO] [stdout] | [INFO] [stdout] 247 | dealer: dealer, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dealer` [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/main.rs:256:6 [INFO] [stdout] | [INFO] [stdout] 256 | draw_pile: draw_pile, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `draw_pile` [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/main.rs:283:6 [INFO] [stdout] | [INFO] [stdout] 283 | config: config, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `config` [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/main.rs:284:6 [INFO] [stdout] | [INFO] [stdout] 284 | n_players: n_players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `n_players` [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/main.rs:285:6 [INFO] [stdout] | [INFO] [stdout] 285 | stage: stage, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `stage` [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/main.rs:286:6 [INFO] [stdout] | [INFO] [stdout] 286 | players: players, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `players` [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/main.rs:376:52 [INFO] [stdout] | [INFO] [stdout] 376 | self.stage.game_state = Some(GameState::Win {winner: winner}); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `winner` [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/main.rs:416:41 [INFO] [stdout] | [INFO] [stdout] 416 | let mut actions = vec![Action::KeepIt {card:card}]; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `card` [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/main.rs:667:6 [INFO] [stdout] | [INFO] [stdout] 667 | seat: seat, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seat` [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/main.rs:671:6 [INFO] [stdout] | [INFO] [stdout] 671 | n_cards: n_cards, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `n_cards` [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/main.rs:765:6 [INFO] [stdout] | [INFO] [stdout] 765 | seat: seat, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `seat` [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/main.rs:766:6 [INFO] [stdout] | [INFO] [stdout] 766 | hand: hand, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `hand` [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: fields `dealer`, `total_turns`, `n_reshuffles`, and `state` are never read [INFO] [stdout] --> src/main.rs:202:5 [INFO] [stdout] | [INFO] [stdout] 200 | struct GameResult { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 201 | scores: Vec, [INFO] [stdout] 202 | dealer: Seat, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 203 | total_turns: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 204 | n_reshuffles: usize, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 205 | winner: Option, [INFO] [stdout] 206 | state: GameState, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GameResult` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `result` is never read [INFO] [stdout] --> src/main.rs:611:15 [INFO] [stdout] | [INFO] [stdout] 611 | GameOver {result: GameResult}, [INFO] [stdout] | -------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `player` is never read [INFO] [stdout] --> src/main.rs:612:18 [INFO] [stdout] | [INFO] [stdout] 612 | GuiltyDraw4 {player: Seat}, [INFO] [stdout] | ----------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `player` is never read [INFO] [stdout] --> src/main.rs:613:12 [INFO] [stdout] | [INFO] [stdout] 613 | Draw4 {player: Seat}, [INFO] [stdout] | ----- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `player` is never read [INFO] [stdout] --> src/main.rs:614:21 [INFO] [stdout] | [INFO] [stdout] 614 | NotGuiltyDraw6 {player: Seat}, [INFO] [stdout] | -------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seat` is never read [INFO] [stdout] --> src/main.rs:758:5 [INFO] [stdout] | [INFO] [stdout] 757 | struct PlayerInfo { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 758 | seat: Seat, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PlayerInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:91:2 [INFO] [stdout] | [INFO] [stdout] 91 | return actions[0].clone(); [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] 91 - return actions[0].clone(); [INFO] [stdout] 91 + actions[0].clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/player.rs:34:7 [INFO] [stdout] | [INFO] [stdout] 34 | / if actions.len() == 1 { [INFO] [stdout] 35 | | return act.clone(); [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 33 ~ Action::KeepIt {card:_} [INFO] [stdout] 34 ~ if actions.len() == 1 => { [INFO] [stdout] 35 | return act.clone(); [INFO] [stdout] 36 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/player.rs:47:7 [INFO] [stdout] | [INFO] [stdout] 47 | / if actions.len() == 1 { [INFO] [stdout] 48 | | return act.clone(); [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 46 ~ Action::Draw1 [INFO] [stdout] 47 ~ if actions.len() == 1 => { [INFO] [stdout] 48 | return act.clone(); [INFO] [stdout] 49 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/player.rs:72:7 [INFO] [stdout] | [INFO] [stdout] 72 | / if !card.is_wild() && !card.is_draw4() { [INFO] [stdout] 73 | | return Action::Discard {card:card}; [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 71 ~ Action::Discard {card} [INFO] [stdout] 72 ~ if !card.is_wild() && !card.is_draw4() => { [INFO] [stdout] 73 | return Action::Discard {card:card}; [INFO] [stdout] 74 ~ }, [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/player.rs:70:6 [INFO] [stdout] | [INFO] [stdout] 70 | / match *act { [INFO] [stdout] 71 | | Action::Discard {card} => { [INFO] [stdout] 72 | | if !card.is_wild() && !card.is_draw4() { [INFO] [stdout] 73 | | return Action::Discard {card:card}; [INFO] [stdout] ... | [INFO] [stdout] 76 | | _ => {}, [INFO] [stdout] 77 | | } [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] 70 ~ if let Action::Discard {card} = *act { [INFO] [stdout] 71 ~ if !card.is_wild() && !card.is_draw4() { [INFO] [stdout] 72 ~ return Action::Discard {card:card}; [INFO] [stdout] 73 ~ } [INFO] [stdout] 74 ~ } [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/player.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | / match *act { [INFO] [stdout] 81 | | Action::Discard {mut card} => { [INFO] [stdout] 82 | | if card.is_wild() || card.is_draw4() { [INFO] [stdout] 83 | | let color = majority_color(&ctx.hand); [INFO] [stdout] ... | [INFO] [stdout] 88 | | _ => {}, [INFO] [stdout] 89 | | } [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] 80 ~ if let Action::Discard {mut card} = *act { [INFO] [stdout] 81 ~ if card.is_wild() || card.is_draw4() { [INFO] [stdout] 82 ~ let color = majority_color(&ctx.hand); [INFO] [stdout] 83 ~ card.color = color; [INFO] [stdout] 84 ~ } [INFO] [stdout] 85 ~ return Action::Discard {card: card}; [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:111:2 [INFO] [stdout] | [INFO] [stdout] 111 | return *counter[0].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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - return *counter[0].0; [INFO] [stdout] 111 + *counter[0].0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:114:2 [INFO] [stdout] | [INFO] [stdout] 114 | return Color::Red; [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] 114 - return Color::Red; [INFO] [stdout] 114 + Color::Red [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/player.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | fn majority_color(hand: &Vec) -> Color { [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] 95 - fn majority_color(hand: &Vec) -> Color { [INFO] [stdout] 95 + fn majority_color(hand: &[Card]) -> Color { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/main.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 38 | fn to_score(&self) -> Score { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:60:6 [INFO] [stdout] | [INFO] [stdout] 60 | return true; [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] 60 - return true; [INFO] [stdout] 60 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | return true; [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] 63 - return true; [INFO] [stdout] 63 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:66:6 [INFO] [stdout] | [INFO] [stdout] 66 | 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] 66 - return false; [INFO] [stdout] 66 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:59:78 [INFO] [stdout] | [INFO] [stdout] 59 | if (self.is_wild() || self.is_draw4()) && Card::is_same_kind(*self, *other) { [INFO] [stdout] | _________________________________________________________________________________^ [INFO] [stdout] 60 | | return true; [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:62:82 [INFO] [stdout] | [INFO] [stdout] 62 | else if Card::is_same_color(*self, *other) && Card::is_same_kind(*self, *other) { [INFO] [stdout] | _____________________________________________________________________________________^ [INFO] [stdout] 63 | | return true; [INFO] [stdout] 64 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:62:7 [INFO] [stdout] | [INFO] [stdout] 62 | else if Card::is_same_color(*self, *other) && Card::is_same_kind(*self, *other) { [INFO] [stdout] | __________^ [INFO] [stdout] 63 | | return true; [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | else { [INFO] [stdout] 66 | | return false; [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ return Card::is_same_color(*self, *other) && Card::is_same_kind(*self, *other) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:71:2 [INFO] [stdout] | [INFO] [stdout] 71 | return card1.color == card2.color; [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] 71 - return card1.color == card2.color; [INFO] [stdout] 71 + card1.color == card2.color [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:97:2 [INFO] [stdout] | [INFO] [stdout] 97 | 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] 97 - return false; [INFO] [stdout] 97 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | / if num1 == num2 { [INFO] [stdout] 80 | | return true; [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 78 ~ Kind::Number{num:num2} [INFO] [stdout] 79 ~ if num1 == num2 => { [INFO] [stdout] 80 | return true; [INFO] [stdout] 81 ~ }, [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/main.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | / match card2.kind { [INFO] [stdout] 78 | | Kind::Number{num:num2} => { [INFO] [stdout] 79 | | if num1 == num2 { [INFO] [stdout] 80 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 83 | | _ => {}, [INFO] [stdout] 84 | | } [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] 77 ~ if let Kind::Number{num:num2} = card2.kind { [INFO] [stdout] 78 ~ if num1 == num2 { [INFO] [stdout] 79 ~ return true; [INFO] [stdout] 80 ~ } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:235:5 [INFO] [stdout] | [INFO] [stdout] 235 | return rng.gen::() % modulo; [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] 235 - return rng.gen::() % modulo; [INFO] [stdout] 235 + rng.gen::() % modulo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:288:2 [INFO] [stdout] | [INFO] [stdout] 282 | / let g = Game { [INFO] [stdout] 283 | | config: config, [INFO] [stdout] 284 | | n_players: n_players, [INFO] [stdout] 285 | | stage: stage, [INFO] [stdout] 286 | | players: players, [INFO] [stdout] 287 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 288 | g [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 282 ~ [INFO] [stdout] 283 ~ Game { [INFO] [stdout] 284 ~ config: config, [INFO] [stdout] 285 ~ n_players: n_players, [INFO] [stdout] 286 ~ stage: stage, [INFO] [stdout] 287 ~ players: players, [INFO] [stdout] 288 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | if !self.stage.draw1_in_process.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stage.draw1_in_process.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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | if let Some(_) = &self.stage.game_state { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if self.stage.game_state.is_some()` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:305:13 [INFO] [stdout] | [INFO] [stdout] 305 | if let Some(_) = &self.stage.game_state { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if self.stage.game_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:312:13 [INFO] [stdout] | [INFO] [stdout] 312 | if let Some(_) = &self.stage.game_state { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if self.stage.game_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:360:3 [INFO] [stdout] | [INFO] [stdout] 360 | / if card.is_draw4() { [INFO] [stdout] 361 | | self.stage.need_challenge_check = true; [INFO] [stdout] 362 | | } [INFO] [stdout] 363 | | else { [INFO] [stdout] 364 | | self.stage.need_challenge_check = false; [INFO] [stdout] 365 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.stage.need_challenge_check = card.is_draw4();` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:436:3 [INFO] [stdout] | [INFO] [stdout] 436 | / if card2.is_draw4() { [INFO] [stdout] 437 | | self.stage.need_challenge_check = true; [INFO] [stdout] 438 | | } [INFO] [stdout] 439 | | else { [INFO] [stdout] 440 | | self.stage.need_challenge_check = false; [INFO] [stdout] 441 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.stage.need_challenge_check = card2.is_draw4();` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `dealer`, `total_turns`, `n_reshuffles`, and `state` are never read [INFO] [stdout] --> src/main.rs:202:5 [INFO] [stdout] | [INFO] [stdout] 200 | struct GameResult { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 201 | scores: Vec, [INFO] [stdout] 202 | dealer: Seat, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 203 | total_turns: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 204 | n_reshuffles: usize, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 205 | winner: Option, [INFO] [stdout] 206 | state: GameState, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `GameResult` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:573:2 [INFO] [stdout] | [INFO] [stdout] 573 | return score; [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] 573 - return score; [INFO] [stdout] 573 + score [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `result` is never read [INFO] [stdout] --> src/main.rs:611:15 [INFO] [stdout] | [INFO] [stdout] 611 | GameOver {result: GameResult}, [INFO] [stdout] | -------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:571:26 [INFO] [stdout] | [INFO] [stdout] 571 | fn calc_score(cards: &Vec) -> Score { [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] 571 - fn calc_score(cards: &Vec) -> Score { [INFO] [stdout] 571 + fn calc_score(cards: &[Card]) -> Score { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `player` is never read [INFO] [stdout] --> src/main.rs:612:18 [INFO] [stdout] | [INFO] [stdout] 612 | GuiltyDraw4 {player: Seat}, [INFO] [stdout] | ----------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `player` is never read [INFO] [stdout] --> src/main.rs:613:12 [INFO] [stdout] | [INFO] [stdout] 613 | Draw4 {player: Seat}, [INFO] [stdout] | ----- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `player` is never read [INFO] [stdout] --> src/main.rs:614:21 [INFO] [stdout] | [INFO] [stdout] 614 | NotGuiltyDraw6 {player: Seat}, [INFO] [stdout] | -------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Event` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seat` is never read [INFO] [stdout] --> src/main.rs:758:5 [INFO] [stdout] | [INFO] [stdout] 757 | struct PlayerInfo { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 758 | seat: Seat, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PlayerInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:91:2 [INFO] [stdout] | [INFO] [stdout] 91 | return actions[0].clone(); [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] 91 - return actions[0].clone(); [INFO] [stdout] 91 + actions[0].clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/player.rs:34:7 [INFO] [stdout] | [INFO] [stdout] 34 | / if actions.len() == 1 { [INFO] [stdout] 35 | | return act.clone(); [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 33 ~ Action::KeepIt {card:_} [INFO] [stdout] 34 ~ if actions.len() == 1 => { [INFO] [stdout] 35 | return act.clone(); [INFO] [stdout] 36 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:658:2 [INFO] [stdout] | [INFO] [stdout] 658 | return; [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] 657 - hands: self.playerinfo.clone().iter().map(|pi| pi.hand.clone()).collect::>>()}); [INFO] [stdout] 658 - return; [INFO] [stdout] 657 + hands: self.playerinfo.clone().iter().map(|pi| pi.hand.clone()).collect::>>()}); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/player.rs:47:7 [INFO] [stdout] | [INFO] [stdout] 47 | / if actions.len() == 1 { [INFO] [stdout] 48 | | return act.clone(); [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 46 ~ Action::Draw1 [INFO] [stdout] 47 ~ if actions.len() == 1 => { [INFO] [stdout] 48 | return act.clone(); [INFO] [stdout] 49 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/player.rs:72:7 [INFO] [stdout] | [INFO] [stdout] 72 | / if !card.is_wild() && !card.is_draw4() { [INFO] [stdout] 73 | | return Action::Discard {card:card}; [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 71 ~ Action::Discard {card} [INFO] [stdout] 72 ~ if !card.is_wild() && !card.is_draw4() => { [INFO] [stdout] 73 | return Action::Discard {card:card}; [INFO] [stdout] 74 ~ }, [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/player.rs:70:6 [INFO] [stdout] | [INFO] [stdout] 70 | / match *act { [INFO] [stdout] 71 | | Action::Discard {card} => { [INFO] [stdout] 72 | | if !card.is_wild() && !card.is_draw4() { [INFO] [stdout] 73 | | return Action::Discard {card:card}; [INFO] [stdout] ... | [INFO] [stdout] 76 | | _ => {}, [INFO] [stdout] 77 | | } [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] 70 ~ if let Action::Discard {card} = *act { [INFO] [stdout] 71 ~ if !card.is_wild() && !card.is_draw4() { [INFO] [stdout] 72 ~ return Action::Discard {card:card}; [INFO] [stdout] 73 ~ } [INFO] [stdout] 74 ~ } [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/player.rs:80:6 [INFO] [stdout] | [INFO] [stdout] 80 | / match *act { [INFO] [stdout] 81 | | Action::Discard {mut card} => { [INFO] [stdout] 82 | | if card.is_wild() || card.is_draw4() { [INFO] [stdout] 83 | | let color = majority_color(&ctx.hand); [INFO] [stdout] ... | [INFO] [stdout] 88 | | _ => {}, [INFO] [stdout] 89 | | } [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] 80 ~ if let Action::Discard {mut card} = *act { [INFO] [stdout] 81 ~ if card.is_wild() || card.is_draw4() { [INFO] [stdout] 82 ~ let color = majority_color(&ctx.hand); [INFO] [stdout] 83 ~ card.color = color; [INFO] [stdout] 84 ~ } [INFO] [stdout] 85 ~ return Action::Discard {card: card}; [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:111:2 [INFO] [stdout] | [INFO] [stdout] 111 | return *counter[0].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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - return *counter[0].0; [INFO] [stdout] 111 + *counter[0].0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:114:2 [INFO] [stdout] | [INFO] [stdout] 114 | return Color::Red; [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] 114 - return Color::Red; [INFO] [stdout] 114 + Color::Red [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/player.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | fn majority_color(hand: &Vec) -> Color { [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] 95 - fn majority_color(hand: &Vec) -> Color { [INFO] [stdout] 95 + fn majority_color(hand: &[Card]) -> Color { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Card` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:654:24 [INFO] [stdout] | [INFO] [stdout] 654 | discard_pile_top: self.discard_pile.last().unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.discard_pile.last().unwrap()` [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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:672:24 [INFO] [stdout] | [INFO] [stdout] 672 | draw1_in_process: self.draw1_in_process.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.draw1_in_process` [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/main.rs:681:6 [INFO] [stdout] | [INFO] [stdout] 681 | return true; [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] 681 - return true; [INFO] [stdout] 681 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:685:3 [INFO] [stdout] | [INFO] [stdout] 685 | return true; [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] 685 - return true; [INFO] [stdout] 685 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:688:3 [INFO] [stdout] | [INFO] [stdout] 688 | 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] 688 - return false; [INFO] [stdout] 688 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:684:6 [INFO] [stdout] | [INFO] [stdout] 684 | / if Card::is_same_color(card, last_card) || Card::is_same_kind(card, last_card) { [INFO] [stdout] 685 | | return true; [INFO] [stdout] 686 | | } [INFO] [stdout] 687 | | else { [INFO] [stdout] 688 | | return false; [INFO] [stdout] 689 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Card::is_same_color(card, last_card) || Card::is_same_kind(card, last_card)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:710:2 [INFO] [stdout] | [INFO] [stdout] 710 | return actions; [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] 710 - return actions; [INFO] [stdout] 710 + actions [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/main.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 38 | fn to_score(&self) -> Score { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:739:2 [INFO] [stdout] | [INFO] [stdout] 739 | return Some(cards); [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] 739 - return Some(cards); [INFO] [stdout] 739 + Some(cards) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:60:6 [INFO] [stdout] | [INFO] [stdout] 60 | return true; [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] 60 - return true; [INFO] [stdout] 60 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | return true; [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] 63 - return true; [INFO] [stdout] 63 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:66:6 [INFO] [stdout] | [INFO] [stdout] 66 | 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] 66 - return false; [INFO] [stdout] 66 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:59:78 [INFO] [stdout] | [INFO] [stdout] 59 | if (self.is_wild() || self.is_draw4()) && Card::is_same_kind(*self, *other) { [INFO] [stdout] | _________________________________________________________________________________^ [INFO] [stdout] 60 | | return true; [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:62:82 [INFO] [stdout] | [INFO] [stdout] 62 | else if Card::is_same_color(*self, *other) && Card::is_same_kind(*self, *other) { [INFO] [stdout] | _____________________________________________________________________________________^ [INFO] [stdout] 63 | | return true; [INFO] [stdout] 64 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:62:7 [INFO] [stdout] | [INFO] [stdout] 62 | else if Card::is_same_color(*self, *other) && Card::is_same_kind(*self, *other) { [INFO] [stdout] | __________^ [INFO] [stdout] 63 | | return true; [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | else { [INFO] [stdout] 66 | | return false; [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `{ return Card::is_same_color(*self, *other) && Card::is_same_kind(*self, *other) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:71:2 [INFO] [stdout] | [INFO] [stdout] 71 | return card1.color == card2.color; [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] 71 - return card1.color == card2.color; [INFO] [stdout] 71 + card1.color == card2.color [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:97:2 [INFO] [stdout] | [INFO] [stdout] 97 | 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] 97 - return false; [INFO] [stdout] 97 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/main.rs:795:2 [INFO] [stdout] | [INFO] [stdout] 795 | / match *self { [INFO] [stdout] 796 | | Action::Challenge {against:_,by:_} => true, [INFO] [stdout] 797 | | _ => false, [INFO] [stdout] 798 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 795 - match *self { [INFO] [stdout] 796 - Action::Challenge {against:_,by:_} => true, [INFO] [stdout] 797 - _ => false, [INFO] [stdout] 798 - } [INFO] [stdout] 795 + matches!(*self, Action::Challenge {against:_,by:_}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | / if num1 == num2 { [INFO] [stdout] 80 | | return true; [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 78 ~ Kind::Number{num:num2} [INFO] [stdout] 79 ~ if num1 == num2 => { [INFO] [stdout] 80 | return true; [INFO] [stdout] 81 ~ }, [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/main.rs:77:3 [INFO] [stdout] | [INFO] [stdout] 77 | / match card2.kind { [INFO] [stdout] 78 | | Kind::Number{num:num2} => { [INFO] [stdout] 79 | | if num1 == num2 { [INFO] [stdout] 80 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 83 | | _ => {}, [INFO] [stdout] 84 | | } [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] 77 ~ if let Kind::Number{num:num2} = card2.kind { [INFO] [stdout] 78 ~ if num1 == num2 { [INFO] [stdout] 79 ~ return true; [INFO] [stdout] 80 ~ } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:235:5 [INFO] [stdout] | [INFO] [stdout] 235 | return rng.gen::() % modulo; [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] 235 - return rng.gen::() % modulo; [INFO] [stdout] 235 + rng.gen::() % modulo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:288:2 [INFO] [stdout] | [INFO] [stdout] 282 | / let g = Game { [INFO] [stdout] 283 | | config: config, [INFO] [stdout] 284 | | n_players: n_players, [INFO] [stdout] 285 | | stage: stage, [INFO] [stdout] 286 | | players: players, [INFO] [stdout] 287 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 288 | g [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 282 ~ [INFO] [stdout] 283 ~ Game { [INFO] [stdout] 284 ~ config: config, [INFO] [stdout] 285 ~ n_players: n_players, [INFO] [stdout] 286 ~ stage: stage, [INFO] [stdout] 287 ~ players: players, [INFO] [stdout] 288 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:840:19 [INFO] [stdout] | [INFO] [stdout] 840 | let logging = if args.verbose {true} else {false}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `args.verbose` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:302:9 [INFO] [stdout] | [INFO] [stdout] 302 | if !self.stage.draw1_in_process.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stage.draw1_in_process.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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | if let Some(_) = &self.stage.game_state { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if self.stage.game_state.is_some()` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:305:13 [INFO] [stdout] | [INFO] [stdout] 305 | if let Some(_) = &self.stage.game_state { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if self.stage.game_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/main.rs:312:13 [INFO] [stdout] | [INFO] [stdout] 312 | if let Some(_) = &self.stage.game_state { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if self.stage.game_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:360:3 [INFO] [stdout] | [INFO] [stdout] 360 | / if card.is_draw4() { [INFO] [stdout] 361 | | self.stage.need_challenge_check = true; [INFO] [stdout] 362 | | } [INFO] [stdout] 363 | | else { [INFO] [stdout] 364 | | self.stage.need_challenge_check = false; [INFO] [stdout] 365 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.stage.need_challenge_check = card.is_draw4();` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:436:3 [INFO] [stdout] | [INFO] [stdout] 436 | / if card2.is_draw4() { [INFO] [stdout] 437 | | self.stage.need_challenge_check = true; [INFO] [stdout] 438 | | } [INFO] [stdout] 439 | | else { [INFO] [stdout] 440 | | self.stage.need_challenge_check = false; [INFO] [stdout] 441 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `self.stage.need_challenge_check = card2.is_draw4();` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:573:2 [INFO] [stdout] | [INFO] [stdout] 573 | return score; [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] 573 - return score; [INFO] [stdout] 573 + score [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/main.rs:571:26 [INFO] [stdout] | [INFO] [stdout] 571 | fn calc_score(cards: &Vec) -> Score { [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] 571 - fn calc_score(cards: &Vec) -> Score { [INFO] [stdout] 571 + fn calc_score(cards: &[Card]) -> Score { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:658:2 [INFO] [stdout] | [INFO] [stdout] 658 | return; [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] 657 - hands: self.playerinfo.clone().iter().map(|pi| pi.hand.clone()).collect::>>()}); [INFO] [stdout] 658 - return; [INFO] [stdout] 657 + hands: self.playerinfo.clone().iter().map(|pi| pi.hand.clone()).collect::>>()}); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Card` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:654:24 [INFO] [stdout] | [INFO] [stdout] 654 | discard_pile_top: self.discard_pile.last().unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.discard_pile.last().unwrap()` [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 `Option` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:672:24 [INFO] [stdout] | [INFO] [stdout] 672 | draw1_in_process: self.draw1_in_process.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.draw1_in_process` [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/main.rs:681:6 [INFO] [stdout] | [INFO] [stdout] 681 | return true; [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] 681 - return true; [INFO] [stdout] 681 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:685:3 [INFO] [stdout] | [INFO] [stdout] 685 | return true; [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] 685 - return true; [INFO] [stdout] 685 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:688:3 [INFO] [stdout] | [INFO] [stdout] 688 | 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] 688 - return false; [INFO] [stdout] 688 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:684:6 [INFO] [stdout] | [INFO] [stdout] 684 | / if Card::is_same_color(card, last_card) || Card::is_same_kind(card, last_card) { [INFO] [stdout] 685 | | return true; [INFO] [stdout] 686 | | } [INFO] [stdout] 687 | | else { [INFO] [stdout] 688 | | return false; [INFO] [stdout] 689 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return Card::is_same_color(card, last_card) || Card::is_same_kind(card, last_card)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:710:2 [INFO] [stdout] | [INFO] [stdout] 710 | return actions; [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] 710 - return actions; [INFO] [stdout] 710 + actions [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:739:2 [INFO] [stdout] | [INFO] [stdout] 739 | return Some(cards); [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] 739 - return Some(cards); [INFO] [stdout] 739 + Some(cards) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/main.rs:795:2 [INFO] [stdout] | [INFO] [stdout] 795 | / match *self { [INFO] [stdout] 796 | | Action::Challenge {against:_,by:_} => true, [INFO] [stdout] 797 | | _ => false, [INFO] [stdout] 798 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 795 - match *self { [INFO] [stdout] 796 - Action::Challenge {against:_,by:_} => true, [INFO] [stdout] 797 - _ => false, [INFO] [stdout] 798 - } [INFO] [stdout] 795 + matches!(*self, Action::Challenge {against:_,by:_}) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/main.rs:840:19 [INFO] [stdout] | [INFO] [stdout] 840 | let logging = if args.verbose {true} else {false}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `args.verbose` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.95s [INFO] running `Command { std: "docker" "inspect" "b90351c17d0f104293c61d4f1f2a08b122404efb2aab405ef929be38e0681b4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b90351c17d0f104293c61d4f1f2a08b122404efb2aab405ef929be38e0681b4f", kill_on_drop: false }` [INFO] [stdout] b90351c17d0f104293c61d4f1f2a08b122404efb2aab405ef929be38e0681b4f