[INFO] cloning repository https://github.com/AleMax/csgo-pickem-montecarlo [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/AleMax/csgo-pickem-montecarlo" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAleMax%2Fcsgo-pickem-montecarlo", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAleMax%2Fcsgo-pickem-montecarlo'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2e9124081668f28b269bd1f01fac60a2ce79eb62 [INFO] linting AleMax/csgo-pickem-montecarlo against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAleMax%2Fcsgo-pickem-montecarlo" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/AleMax/csgo-pickem-montecarlo [INFO] finished tweaking git repo https://github.com/AleMax/csgo-pickem-montecarlo [INFO] tweaked toml for git repo https://github.com/AleMax/csgo-pickem-montecarlo written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/AleMax/csgo-pickem-montecarlo 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/AleMax/csgo-pickem-montecarlo 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] Downloading crates ... [INFO] [stderr] Downloaded getrandom v0.2.6 [INFO] [stderr] Downloaded libc v0.2.125 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 60b9eb3d4c45f5b5b4601604f7cad03e911223434ad0f017cc7f507c191cccdb [INFO] running `Command { std: "docker" "start" "-a" "60b9eb3d4c45f5b5b4601604f7cad03e911223434ad0f017cc7f507c191cccdb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "60b9eb3d4c45f5b5b4601604f7cad03e911223434ad0f017cc7f507c191cccdb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "60b9eb3d4c45f5b5b4601604f7cad03e911223434ad0f017cc7f507c191cccdb", kill_on_drop: false }` [INFO] [stdout] 60b9eb3d4c45f5b5b4601604f7cad03e911223434ad0f017cc7f507c191cccdb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a266d9f2c8ecb7ade570e243b286800a2ae0fa589516b6770fb7ad4bac32304c [INFO] running `Command { std: "docker" "start" "-a" "a266d9f2c8ecb7ade570e243b286800a2ae0fa589516b6770fb7ad4bac32304c", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.125 [INFO] [stderr] Checking getrandom v0.2.6 [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 csgo_pickem v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:470:17 [INFO] [stdout] | [INFO] [stdout] 470 | let mut team = &mut teams[team_index]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | / return [ [INFO] [stdout] 155 | | Team::new_with_matches("NAVI", 1, navi_picks, navi_matches), [INFO] [stdout] 156 | | Team::new_with_matches("9INE", 2, nine_picks, nine_matches), [INFO] [stdout] 157 | | Team::new_with_matches("Team Furia", 3, furia_picks, furia_matches), [INFO] [stdout] ... | [INFO] [stdout] 170 | | Team::new_with_matches("Gamer Legion", 16, gl_picks, gl_matches), [INFO] [stdout] 171 | | ] [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] 154 ~ [ [INFO] [stdout] 155 + Team::new_with_matches("NAVI", 1, navi_picks, navi_matches), [INFO] [stdout] 156 + Team::new_with_matches("9INE", 2, nine_picks, nine_matches), [INFO] [stdout] 157 + Team::new_with_matches("Team Furia", 3, furia_picks, furia_matches), [INFO] [stdout] 158 + Team::new_with_matches("Fnatic", 4, fnatic_picks, fnatic_matches), [INFO] [stdout] 159 + Team::new_with_matches("Heroic", 5, heroic_picks, heroic_matches), [INFO] [stdout] 160 + Team::new_with_matches("Into The Breach", 6, itb_picks, itb_matches), [INFO] [stdout] 161 + Team::new_with_matches("Vitality", 7, vitality_picks, vitality_matches), [INFO] [stdout] 162 + Team::new_with_matches("Bad News Eagles", 8, bne_picks, bne_matches), [INFO] [stdout] 163 + Team::new_with_matches("ENCE", 9, ence_picks, ence_matches), [INFO] [stdout] 164 + Team::new_with_matches("G2", 10, g2_picks, g2_matches), [INFO] [stdout] 165 + Team::new_with_matches("Apeks", 11, apeks_picks, apeks_matches), [INFO] [stdout] 166 + Team::new_with_matches("Faze", 12, faze_picks, faze_matches), [INFO] [stdout] 167 + Team::new_with_matches("NIP", 13, nip_picks, nip_matches), [INFO] [stdout] 168 + Team::new_with_matches("Monte", 14, monte_picks, monte_matches), [INFO] [stdout] 169 + Team::new_with_matches("Team Liquid", 15, liquid_picks, liquid_matches), [INFO] [stdout] 170 + Team::new_with_matches("Gamer Legion", 16, gl_picks, gl_matches), [INFO] [stdout] 171 + ] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:343:13 [INFO] [stdout] | [INFO] [stdout] 343 | return Ordering::Greater; [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] 343 - return Ordering::Greater; [INFO] [stdout] 343 + Ordering::Greater [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:345:13 [INFO] [stdout] | [INFO] [stdout] 345 | return Ordering::Less; [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] 345 - return Ordering::Less; [INFO] [stdout] 345 + Ordering::Less [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:355:172 [INFO] [stdout] | [INFO] [stdout] 355 | if matches!(self.results[0], MatchResult::Won) && (matches!(self.pickems[player], PickEmBet::ThreeZero) || matches!(self.pickems[player], PickEmBet::Advance)) { [INFO] [stdout] | ____________________________________________________________________________________________________________________________________________________________________________^ [INFO] [stdout] 356 | | return true; [INFO] [stdout] 357 | | } else if matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:357:124 [INFO] [stdout] | [INFO] [stdout] 357 | } else if matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) { [INFO] [stdout] | ____________________________________________________________________________________________________________________________^ [INFO] [stdout] 358 | | return true; [INFO] [stdout] 359 | | } else { [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:357:20 [INFO] [stdout] | [INFO] [stdout] 357 | } else if matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 358 | | return true; [INFO] [stdout] 359 | | } else { [INFO] [stdout] 360 | | return false; [INFO] [stdout] 361 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `{ return matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) }` [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: redundant closure [INFO] [stdout] --> src/main.rs:384:46 [INFO] [stdout] | [INFO] [stdout] 384 | thread_vector.push(thread::spawn(move || thread_simulation())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `thread_simulation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:396:15 [INFO] [stdout] | [INFO] [stdout] 396 | while thread_vector.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!thread_vector.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: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:412:9 [INFO] [stdout] | [INFO] [stdout] 412 | result_alex = result_alex / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_alex /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:413:9 [INFO] [stdout] | [INFO] [stdout] 413 | result_an = result_an / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_an /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:414:9 [INFO] [stdout] | [INFO] [stdout] 414 | result_fe = result_fe / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_fe /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:415:9 [INFO] [stdout] | [INFO] [stdout] 415 | result_alex_an = result_alex_an / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_alex_an /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:416:9 [INFO] [stdout] | [INFO] [stdout] 416 | result_alex_fe = result_alex_fe / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_alex_fe /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | result_an_fe = result_an_fe / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_an_fe /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:418:9 [INFO] [stdout] | [INFO] [stdout] 418 | result_all = result_all / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_all /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:423:9 [INFO] [stdout] | [INFO] [stdout] 423 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:427:9 [INFO] [stdout] | [INFO] [stdout] 427 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:516:20 [INFO] [stdout] | [INFO] [stdout] 516 | if !(teams[team_index].results.len() > i) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(teams[team_index].results.len() <= i)` [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: the loop variable `team_index` is only used to index `teams` [INFO] [stdout] --> src/main.rs:469:27 [INFO] [stdout] | [INFO] [stdout] 469 | for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 469 - for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] 469 + for in teams.iter_mut().take(TEAM_AMOUNT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `n` is used to index `pick_em_results` [INFO] [stdout] --> src/main.rs:540:14 [INFO] [stdout] | [INFO] [stdout] 540 | for n in 0..3 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 540 - for n in 0..3 { [INFO] [stdout] 540 + for (n, ) in pick_em_results.iter_mut().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `team_index` is only used to index `teams` [INFO] [stdout] --> src/main.rs:543:27 [INFO] [stdout] | [INFO] [stdout] 543 | for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 543 - for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] 543 + for in teams.iter_mut().take(TEAM_AMOUNT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `team_index` is used to index `teams` [INFO] [stdout] --> src/main.rs:566:23 [INFO] [stdout] | [INFO] [stdout] 566 | for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 566 - for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] 566 + for (team_index, ) in teams.iter().enumerate().take(TEAM_AMOUNT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `baskets` [INFO] [stdout] --> src/main.rs:576:14 [INFO] [stdout] | [INFO] [stdout] 576 | for i in 0..ROUNDS { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 576 - for i in 0..ROUNDS { [INFO] [stdout] 576 + for in baskets.iter().take(ROUNDS) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `baskets` [INFO] [stdout] --> src/main.rs:578:18 [INFO] [stdout] | [INFO] [stdout] 578 | for x in 0..baskets[i].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 578 - for x in 0..baskets[i].len() { [INFO] [stdout] 578 + for in baskets.iter().take(baskets[i].len()) { [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:601:25 [INFO] [stdout] | [INFO] [stdout] 601 | fn find_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) -> 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] 601 - fn find_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) -> bool { [INFO] [stdout] 601 + fn find_matches(basket: &[usize], teams: &mut [Team; TEAM_AMOUNT]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:603:8 [INFO] [stdout] | [INFO] [stdout] 603 | if basket.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!basket.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: the loop variable `x` is only used to index `basket` [INFO] [stdout] --> src/main.rs:614:26 [INFO] [stdout] | [INFO] [stdout] 614 | for x in 0..basket.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 614 - for x in 0..basket.len() { [INFO] [stdout] 614 + for in &basket { [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:648:32 [INFO] [stdout] | [INFO] [stdout] 648 | fn set_default_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) { [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] 648 - fn set_default_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) { [INFO] [stdout] 648 + fn set_default_matches(basket: &[usize], teams: &mut [Team; TEAM_AMOUNT]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `basket` [INFO] [stdout] --> src/main.rs:651:14 [INFO] [stdout] | [INFO] [stdout] 651 | for x in 0..basket.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 651 - for x in 0..basket.len() { [INFO] [stdout] 651 + for in &basket { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:655:11 [INFO] [stdout] | [INFO] [stdout] 655 | while basket.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!basket.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: the loop variable `other_team` is used to index `basket_copy` [INFO] [stdout] --> src/main.rs:660:27 [INFO] [stdout] | [INFO] [stdout] 660 | for other_team in 2..basket_copy.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 660 - for other_team in 2..basket_copy.len() { [INFO] [stdout] 660 + for (other_team, ) in basket_copy.iter().enumerate().skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:470:17 [INFO] [stdout] | [INFO] [stdout] 470 | let mut team = &mut teams[team_index]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | / return [ [INFO] [stdout] 155 | | Team::new_with_matches("NAVI", 1, navi_picks, navi_matches), [INFO] [stdout] 156 | | Team::new_with_matches("9INE", 2, nine_picks, nine_matches), [INFO] [stdout] 157 | | Team::new_with_matches("Team Furia", 3, furia_picks, furia_matches), [INFO] [stdout] ... | [INFO] [stdout] 170 | | Team::new_with_matches("Gamer Legion", 16, gl_picks, gl_matches), [INFO] [stdout] 171 | | ] [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] 154 ~ [ [INFO] [stdout] 155 + Team::new_with_matches("NAVI", 1, navi_picks, navi_matches), [INFO] [stdout] 156 + Team::new_with_matches("9INE", 2, nine_picks, nine_matches), [INFO] [stdout] 157 + Team::new_with_matches("Team Furia", 3, furia_picks, furia_matches), [INFO] [stdout] 158 + Team::new_with_matches("Fnatic", 4, fnatic_picks, fnatic_matches), [INFO] [stdout] 159 + Team::new_with_matches("Heroic", 5, heroic_picks, heroic_matches), [INFO] [stdout] 160 + Team::new_with_matches("Into The Breach", 6, itb_picks, itb_matches), [INFO] [stdout] 161 + Team::new_with_matches("Vitality", 7, vitality_picks, vitality_matches), [INFO] [stdout] 162 + Team::new_with_matches("Bad News Eagles", 8, bne_picks, bne_matches), [INFO] [stdout] 163 + Team::new_with_matches("ENCE", 9, ence_picks, ence_matches), [INFO] [stdout] 164 + Team::new_with_matches("G2", 10, g2_picks, g2_matches), [INFO] [stdout] 165 + Team::new_with_matches("Apeks", 11, apeks_picks, apeks_matches), [INFO] [stdout] 166 + Team::new_with_matches("Faze", 12, faze_picks, faze_matches), [INFO] [stdout] 167 + Team::new_with_matches("NIP", 13, nip_picks, nip_matches), [INFO] [stdout] 168 + Team::new_with_matches("Monte", 14, monte_picks, monte_matches), [INFO] [stdout] 169 + Team::new_with_matches("Team Liquid", 15, liquid_picks, liquid_matches), [INFO] [stdout] 170 + Team::new_with_matches("Gamer Legion", 16, gl_picks, gl_matches), [INFO] [stdout] 171 + ] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:343:13 [INFO] [stdout] | [INFO] [stdout] 343 | return Ordering::Greater; [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] 343 - return Ordering::Greater; [INFO] [stdout] 343 + Ordering::Greater [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.45s [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:345:13 [INFO] [stdout] | [INFO] [stdout] 345 | return Ordering::Less; [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] 345 - return Ordering::Less; [INFO] [stdout] 345 + Ordering::Less [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:355:172 [INFO] [stdout] | [INFO] [stdout] 355 | if matches!(self.results[0], MatchResult::Won) && (matches!(self.pickems[player], PickEmBet::ThreeZero) || matches!(self.pickems[player], PickEmBet::Advance)) { [INFO] [stdout] | ____________________________________________________________________________________________________________________________________________________________________________^ [INFO] [stdout] 356 | | return true; [INFO] [stdout] 357 | | } else if matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:357:124 [INFO] [stdout] | [INFO] [stdout] 357 | } else if matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) { [INFO] [stdout] | ____________________________________________________________________________________________________________________________^ [INFO] [stdout] 358 | | return true; [INFO] [stdout] 359 | | } else { [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:357:20 [INFO] [stdout] | [INFO] [stdout] 357 | } else if matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 358 | | return true; [INFO] [stdout] 359 | | } else { [INFO] [stdout] 360 | | return false; [INFO] [stdout] 361 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `{ return matches!(self.results[0], MatchResult::Lost) && matches!(self.pickems[player], PickEmBet::ZeroThree) }` [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: redundant closure [INFO] [stdout] --> src/main.rs:384:46 [INFO] [stdout] | [INFO] [stdout] 384 | thread_vector.push(thread::spawn(move || thread_simulation())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `thread_simulation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:396:15 [INFO] [stdout] | [INFO] [stdout] 396 | while thread_vector.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!thread_vector.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: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:412:9 [INFO] [stdout] | [INFO] [stdout] 412 | result_alex = result_alex / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_alex /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:413:9 [INFO] [stdout] | [INFO] [stdout] 413 | result_an = result_an / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_an /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:414:9 [INFO] [stdout] | [INFO] [stdout] 414 | result_fe = result_fe / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_fe /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:415:9 [INFO] [stdout] | [INFO] [stdout] 415 | result_alex_an = result_alex_an / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_alex_an /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:416:9 [INFO] [stdout] | [INFO] [stdout] 416 | result_alex_fe = result_alex_fe / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_alex_fe /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:417:9 [INFO] [stdout] | [INFO] [stdout] 417 | result_an_fe = result_an_fe / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_an_fe /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:418:9 [INFO] [stdout] | [INFO] [stdout] 418 | result_all = result_all / 24.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `result_all /= 24.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:423:9 [INFO] [stdout] | [INFO] [stdout] 423 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:427:9 [INFO] [stdout] | [INFO] [stdout] 427 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:516:20 [INFO] [stdout] | [INFO] [stdout] 516 | if !(teams[team_index].results.len() > i) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(teams[team_index].results.len() <= i)` [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: the loop variable `team_index` is only used to index `teams` [INFO] [stdout] --> src/main.rs:469:27 [INFO] [stdout] | [INFO] [stdout] 469 | for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 469 - for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] 469 + for in teams.iter_mut().take(TEAM_AMOUNT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `n` is used to index `pick_em_results` [INFO] [stdout] --> src/main.rs:540:14 [INFO] [stdout] | [INFO] [stdout] 540 | for n in 0..3 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 540 - for n in 0..3 { [INFO] [stdout] 540 + for (n, ) in pick_em_results.iter_mut().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `team_index` is only used to index `teams` [INFO] [stdout] --> src/main.rs:543:27 [INFO] [stdout] | [INFO] [stdout] 543 | for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 543 - for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] 543 + for in teams.iter_mut().take(TEAM_AMOUNT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `team_index` is used to index `teams` [INFO] [stdout] --> src/main.rs:566:23 [INFO] [stdout] | [INFO] [stdout] 566 | for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 566 - for team_index in 0..TEAM_AMOUNT { [INFO] [stdout] 566 + for (team_index, ) in teams.iter().enumerate().take(TEAM_AMOUNT) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `baskets` [INFO] [stdout] --> src/main.rs:576:14 [INFO] [stdout] | [INFO] [stdout] 576 | for i in 0..ROUNDS { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 576 - for i in 0..ROUNDS { [INFO] [stdout] 576 + for in baskets.iter().take(ROUNDS) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `baskets` [INFO] [stdout] --> src/main.rs:578:18 [INFO] [stdout] | [INFO] [stdout] 578 | for x in 0..baskets[i].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 578 - for x in 0..baskets[i].len() { [INFO] [stdout] 578 + for in baskets.iter().take(baskets[i].len()) { [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:601:25 [INFO] [stdout] | [INFO] [stdout] 601 | fn find_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) -> 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] 601 - fn find_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) -> bool { [INFO] [stdout] 601 + fn find_matches(basket: &[usize], teams: &mut [Team; TEAM_AMOUNT]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:603:8 [INFO] [stdout] | [INFO] [stdout] 603 | if basket.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!basket.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: the loop variable `x` is only used to index `basket` [INFO] [stdout] --> src/main.rs:614:26 [INFO] [stdout] | [INFO] [stdout] 614 | for x in 0..basket.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 614 - for x in 0..basket.len() { [INFO] [stdout] 614 + for in &basket { [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:648:32 [INFO] [stdout] | [INFO] [stdout] 648 | fn set_default_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) { [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] 648 - fn set_default_matches(basket: &Vec, teams: &mut [Team; TEAM_AMOUNT]) { [INFO] [stdout] 648 + fn set_default_matches(basket: &[usize], teams: &mut [Team; TEAM_AMOUNT]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `basket` [INFO] [stdout] --> src/main.rs:651:14 [INFO] [stdout] | [INFO] [stdout] 651 | for x in 0..basket.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 651 - for x in 0..basket.len() { [INFO] [stdout] 651 + for in &basket { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:655:11 [INFO] [stdout] | [INFO] [stdout] 655 | while basket.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!basket.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: the loop variable `other_team` is used to index `basket_copy` [INFO] [stdout] --> src/main.rs:660:27 [INFO] [stdout] | [INFO] [stdout] 660 | for other_team in 2..basket_copy.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 660 - for other_team in 2..basket_copy.len() { [INFO] [stdout] 660 + for (other_team, ) in basket_copy.iter().enumerate().skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "a266d9f2c8ecb7ade570e243b286800a2ae0fa589516b6770fb7ad4bac32304c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a266d9f2c8ecb7ade570e243b286800a2ae0fa589516b6770fb7ad4bac32304c", kill_on_drop: false }` [INFO] [stdout] a266d9f2c8ecb7ade570e243b286800a2ae0fa589516b6770fb7ad4bac32304c