[INFO] cloning repository https://github.com/Yoeori/kattis [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Yoeori/kattis" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FYoeori%2Fkattis", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FYoeori%2Fkattis'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 22a9c9d75e9a278a829110790a82d0c92b0a8dce [INFO] linting Yoeori/kattis against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FYoeori%2Fkattis" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Yoeori/kattis [INFO] finished tweaking git repo https://github.com/Yoeori/kattis [INFO] tweaked toml for git repo https://github.com/Yoeori/kattis written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Yoeori/kattis 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/Yoeori/kattis 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] c3ee25ff6d18c70f6965e646b27e51a8d4ab2f3a7d312aa71e9302b974d552cb [INFO] running `Command { std: "docker" "start" "-a" "c3ee25ff6d18c70f6965e646b27e51a8d4ab2f3a7d312aa71e9302b974d552cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c3ee25ff6d18c70f6965e646b27e51a8d4ab2f3a7d312aa71e9302b974d552cb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c3ee25ff6d18c70f6965e646b27e51a8d4ab2f3a7d312aa71e9302b974d552cb", kill_on_drop: false }` [INFO] [stdout] c3ee25ff6d18c70f6965e646b27e51a8d4ab2f3a7d312aa71e9302b974d552cb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] a44baf768d727c5eddffc1aa0e2c167f009f6b623369b24cec02ccf22eed153c [INFO] running `Command { std: "docker" "start" "-a" "a44baf768d727c5eddffc1aa0e2c167f009f6b623369b24cec02ccf22eed153c", kill_on_drop: false }` [INFO] [stderr] Checking kattis v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/typo.rs:38:32 [INFO] [stdout] | [INFO] [stdout] 38 | .fold(0, |acc, (i, b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 38 - .fold(0, |acc, (i, b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] 38 + .fold(0, |acc, (i, b)| (acc + calc(i, b)) % M ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/clockpictures.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | .fold(0, |acc, (i, &b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 37 - .fold(0, |acc, (i, &b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] 37 + .fold(0, |acc, (i, &b)| (acc + calc(i, b)) % M ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:34:31 [INFO] [stdout] | [INFO] [stdout] 34 | let tmp = rubik[0] & (0b11 << i*2); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:35:34 [INFO] [stdout] | [INFO] [stdout] 35 | rubik[0] = (rubik[0] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:35:63 [INFO] [stdout] | [INFO] [stdout] 35 | rubik[0] = (rubik[0] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:36:34 [INFO] [stdout] | [INFO] [stdout] 36 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:36:63 [INFO] [stdout] | [INFO] [stdout] 36 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:37:34 [INFO] [stdout] | [INFO] [stdout] 37 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[3] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:37:63 [INFO] [stdout] | [INFO] [stdout] 37 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[3] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:38:34 [INFO] [stdout] | [INFO] [stdout] 38 | rubik[3] = (rubik[3] & !(0b11 << i*2)) + tmp; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:44:31 [INFO] [stdout] | [INFO] [stdout] 44 | let tmp = rubik[3] & (0b11 << i*2); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:45:34 [INFO] [stdout] | [INFO] [stdout] 45 | rubik[3] = (rubik[3] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:45:63 [INFO] [stdout] | [INFO] [stdout] 45 | rubik[3] = (rubik[3] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:46:34 [INFO] [stdout] | [INFO] [stdout] 46 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:46:63 [INFO] [stdout] | [INFO] [stdout] 46 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:47:34 [INFO] [stdout] | [INFO] [stdout] 47 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[0] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:47:63 [INFO] [stdout] | [INFO] [stdout] 47 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[0] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:48:34 [INFO] [stdout] | [INFO] [stdout] 48 | rubik[0] = (rubik[0] & !(0b11 << i*2)) + tmp; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/mapcolouring.rs:42:22 [INFO] [stdout] | [INFO] [stdout] 42 | for i in 1..(1 << c - 1) { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (c - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/cleaningpipes.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 11 | | [INFO] [stdout] | |_^ [INFO] [stdout] 12 | use std::ops::{Div, Mul, Sub, Add, Neg}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/mosquitoes.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | / /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 6 | | [INFO] [stdout] | |_^ [INFO] [stdout] 7 | use std::ops::{Div, Mul, Sub, Add, Neg}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:84:43 [INFO] [stdout] | [INFO] [stdout] 84 | if dist[weeks_left][0] > dist[(weeks_left - 1)][0] { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 84 - if dist[weeks_left][0] > dist[(weeks_left - 1)][0] { [INFO] [stdout] 84 + if dist[weeks_left][0] > dist[weeks_left - 1 ][0] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:90:40 [INFO] [stdout] | [INFO] [stdout] 90 | total_income: dist[(weeks_left - 1)][0] [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - total_income: dist[(weeks_left - 1)][0] [INFO] [stdout] 90 + total_income: dist[weeks_left - 1 ][0] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:92:51 [INFO] [stdout] | [INFO] [stdout] 92 | } else if dist[weeks_left][0] == dist[(weeks_left - 1)][0] { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 92 - } else if dist[weeks_left][0] == dist[(weeks_left - 1)][0] { [INFO] [stdout] 92 + } else if dist[weeks_left][0] == dist[weeks_left - 1 ][0] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:100:37 [INFO] [stdout] | [INFO] [stdout] 100 | ... if dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] < dist[weeks_left][tickets_left] + (tickets_sold_for_price *... [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 100 - if dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] < dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize { [INFO] [stdout] 100 + if dist[weeks_left - 1][tickets_left - tickets_sold_for_price ] < dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:101:38 [INFO] [stdout] | [INFO] [stdout] 101 | ... dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] = dist[weeks_left][tickets_left] + (tickets_sold_for_price * pr... [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 101 - dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] = dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize; [INFO] [stdout] 101 + dist[weeks_left - 1][tickets_left - tickets_sold_for_price ] = dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/snippets/geometry.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | use std::ops::{Div, Mul, Sub, Add, Neg}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 1 + //! This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/typo.rs:38:32 [INFO] [stdout] | [INFO] [stdout] 38 | .fold(0, |acc, (i, b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 38 - .fold(0, |acc, (i, b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] 38 + .fold(0, |acc, (i, b)| (acc + calc(i, b)) % M ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/clockpictures.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | .fold(0, |acc, (i, &b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 37 - .fold(0, |acc, (i, &b)| ((acc + calc(i, b)) % M)) [INFO] [stdout] 37 + .fold(0, |acc, (i, &b)| (acc + calc(i, b)) % M ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:34:31 [INFO] [stdout] | [INFO] [stdout] 34 | let tmp = rubik[0] & (0b11 << i*2); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:35:34 [INFO] [stdout] | [INFO] [stdout] 35 | rubik[0] = (rubik[0] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:35:63 [INFO] [stdout] | [INFO] [stdout] 35 | rubik[0] = (rubik[0] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:36:34 [INFO] [stdout] | [INFO] [stdout] 36 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:36:63 [INFO] [stdout] | [INFO] [stdout] 36 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:37:34 [INFO] [stdout] | [INFO] [stdout] 37 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[3] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:37:63 [INFO] [stdout] | [INFO] [stdout] 37 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[3] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:38:34 [INFO] [stdout] | [INFO] [stdout] 38 | rubik[3] = (rubik[3] & !(0b11 << i*2)) + tmp; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:44:31 [INFO] [stdout] | [INFO] [stdout] 44 | let tmp = rubik[3] & (0b11 << i*2); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:45:34 [INFO] [stdout] | [INFO] [stdout] 45 | rubik[3] = (rubik[3] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:45:63 [INFO] [stdout] | [INFO] [stdout] 45 | rubik[3] = (rubik[3] & !(0b11 << i*2)) + (rubik[2] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:46:34 [INFO] [stdout] | [INFO] [stdout] 46 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:46:63 [INFO] [stdout] | [INFO] [stdout] 46 | rubik[2] = (rubik[2] & !(0b11 << i*2)) + (rubik[1] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:47:34 [INFO] [stdout] | [INFO] [stdout] 47 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[0] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:47:63 [INFO] [stdout] | [INFO] [stdout] 47 | rubik[1] = (rubik[1] & !(0b11 << i*2)) + (rubik[0] & (0b11 << i*2)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/rubiksrevenge.rs:48:34 [INFO] [stdout] | [INFO] [stdout] 48 | rubik[0] = (rubik[0] & !(0b11 << i*2)) + tmp; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `0b11 << (i*2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/mapcolouring.rs:42:22 [INFO] [stdout] | [INFO] [stdout] 42 | for i in 1..(1 << c - 1) { [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (c - 1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/cleaningpipes.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 11 | | [INFO] [stdout] | |_^ [INFO] [stdout] 12 | use std::ops::{Div, Mul, Sub, Add, Neg}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/mosquitoes.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | / /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 6 | | [INFO] [stdout] | |_^ [INFO] [stdout] 7 | use std::ops::{Div, Mul, Sub, Add, Neg}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:84:43 [INFO] [stdout] | [INFO] [stdout] 84 | if dist[weeks_left][0] > dist[(weeks_left - 1)][0] { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 84 - if dist[weeks_left][0] > dist[(weeks_left - 1)][0] { [INFO] [stdout] 84 + if dist[weeks_left][0] > dist[weeks_left - 1 ][0] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:90:40 [INFO] [stdout] | [INFO] [stdout] 90 | total_income: dist[(weeks_left - 1)][0] [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - total_income: dist[(weeks_left - 1)][0] [INFO] [stdout] 90 + total_income: dist[weeks_left - 1 ][0] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:92:51 [INFO] [stdout] | [INFO] [stdout] 92 | } else if dist[weeks_left][0] == dist[(weeks_left - 1)][0] { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 92 - } else if dist[weeks_left][0] == dist[(weeks_left - 1)][0] { [INFO] [stdout] 92 + } else if dist[weeks_left][0] == dist[weeks_left - 1 ][0] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:100:37 [INFO] [stdout] | [INFO] [stdout] 100 | ... if dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] < dist[weeks_left][tickets_left] + (tickets_sold_for_price *... [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 100 - if dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] < dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize { [INFO] [stdout] 100 + if dist[weeks_left - 1][tickets_left - tickets_sold_for_price ] < dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/ticketpricing.rs:101:38 [INFO] [stdout] | [INFO] [stdout] 101 | ... dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] = dist[weeks_left][tickets_left] + (tickets_sold_for_price * pr... [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 101 - dist[weeks_left - 1][(tickets_left - tickets_sold_for_price)] = dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize; [INFO] [stdout] 101 + dist[weeks_left - 1][tickets_left - tickets_sold_for_price ] = dist[weeks_left][tickets_left] + (tickets_sold_for_price * price) as isize; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/snippets/geometry.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 2 | | [INFO] [stdout] | |_^ [INFO] [stdout] 3 | use std::ops::{Div, Mul, Sub, Add, Neg}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /// This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] 1 + //! This file is based on the Handbook of geometry for competitive programmers by Victor Lecomte [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter` for `Some` followed by `unwrap` [INFO] [stdout] --> src/primes2.rs:18:91 [INFO] [stdout] | [INFO] [stdout] 18 | ...se(&inp, *base)).filter(|x| x.is_some()).map(|x| x.unwrap()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_filter_map [INFO] [stdout] = note: `#[warn(clippy::option_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/primes2.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | let div = gcd(primes.clone(), poss.len() as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `primes` [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: manual checked division [INFO] [stdout] --> src/primes2.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | if div != 0 { [INFO] [stdout] | ^^^^^^^^ check performed here [INFO] [stdout] 28 | writeln!(&mut w, "{}/{}", primes / div, (poss.len() as u64) / div).unwrap(); [INFO] [stdout] | ------------ ------------------------- ... and here [INFO] [stdout] | | [INFO] [stdout] | division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/primes2.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return true; [INFO] [stdout] 58 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/primes2.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | if n != x && n % x == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/visualgo.rs:36:42 [INFO] [stdout] | [INFO] [stdout] 36 | fn dijkstra(from: usize, to: usize, map: &Vec>) -> usize { [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] 36 - fn dijkstra(from: usize, to: usize, map: &Vec>) -> usize { [INFO] [stdout] 36 + fn dijkstra(from: usize, to: usize, map: &[Vec<(usize, usize)>]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/visualgo.rs:56:25 [INFO] [stdout] | [INFO] [stdout] 56 | let mut dist = vec![std::usize::MAX; map.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 56 - let mut dist = vec![std::usize::MAX; map.len()]; [INFO] [stdout] 56 + let mut dist = vec![usize::MAX; map.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/visualgo.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | paths[path_to] = paths[path_to] + paths[vertex]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `paths[path_to] += paths[vertex]` [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: unneeded `return` statement [INFO] [stdout] --> src/dunglish.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | 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] 25 - return true; [INFO] [stdout] 25 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/dunglish.rs:34:39 [INFO] [stdout] | [INFO] [stdout] 34 | let sentence_map: HashSet<&str> = sentence.iter().map(|&x| x).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sentence.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/dunglish.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | correct = correct * wordset.correct; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `correct *= wordset.correct` [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/dunglish.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | total = total * (wordset.correct + wordset.incorrect) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total *= (wordset.correct + wordset.incorrect)` [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 `writeln!` [INFO] [stdout] --> src/ternarianweights.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | writeln!(&mut w, "").unwrap(); [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#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/acearbiter.rs:27:20 [INFO] [stdout] | [INFO] [stdout] 27 | let whom = ((s0 + s1 + 1) / 2) % 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(s0 + s1).div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/robotsonagrid.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | 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] 28 - return false; [INFO] [stdout] 28 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/timebomb.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | if !(line[(i * 4)..((i * 4) + 3)] == ASCII[(40*k + n * 4)..(40*k + n * 4 + 3)]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(line[(i * 4)..((i * 4) + 3)] != ASCII[(40*k + n * 4)..(40*k + n * 4 + 3)])` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/timebomb.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | fn test_number(input: &Vec, n: usize, i: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn test_number(input: &Vec, n: usize, i: usize) -> bool { [INFO] [stdout] 12 + fn test_number(input: &[String], n: usize, i: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/typo.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | base = base % modulus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base %= modulus` [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/typo.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | exp = exp >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `exp >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/typo.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | res.sort_by(|(_, i), (_, o)| i.cmp(o)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 - res.sort_by(|(_, i), (_, o)| i.cmp(o)); [INFO] [stdout] 57 + res.sort_by_key(|(_, i)| *i); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/burrowswheeler.rs:13:37 [INFO] [stdout] | [INFO] [stdout] 13 | let mut shifts: Vec<&str> = (0..(input.len() / 2)).into_iter().map(|x| &input[x..((input.len() / 2) + x)]).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..(input.len() / 2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/nine.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | base = base % modulus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base %= modulus` [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/nine.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | exp = exp >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `exp >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/hnumbers.rs:59:23 [INFO] [stdout] | [INFO] [stdout] 59 | fn binary_search(inp: &Vec, search: usize) -> usize { [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] 59 - fn binary_search(inp: &Vec, search: usize) -> usize { [INFO] [stdout] 59 + fn binary_search(inp: &[usize], search: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/closestpair2.rs:35:26 [INFO] [stdout] | [INFO] [stdout] 35 | let mut ps = (&l).split(' '); [INFO] [stdout] | ^^^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:36:33 [INFO] [stdout] | [INFO] [stdout] 36 | let x = parse_float(&ps.next().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `ps.next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | let y = parse_float(&ps.next().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `ps.next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/closestpair2.rs:83:22 [INFO] [stdout] | [INFO] [stdout] 83 | fn min_distance_full<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 83 - fn min_distance_full<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] 83 + fn min_distance_full(points: &[Point]) -> (IntSize, &Point, &Point) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/closestpair2.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | fn min_distance<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 95 - fn min_distance<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] 95 + fn min_distance(points: &[Point]) -> (IntSize, &Point, &Point) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:46 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:57 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[o]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:69 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:80 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[o]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/clockpictures.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | base = base % modulus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base %= modulus` [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/clockpictures.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | exp = exp >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `exp >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/clockpictures.rs:34:15 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash(word: &Vec) -> i64 { [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] 34 - fn hash(word: &Vec) -> i64 { [INFO] [stdout] 34 + fn hash(word: &[u32]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/findinglines.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | std::f64::MAX [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 23 - std::f64::MAX [INFO] [stdout] 23 + f64::MAX [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/findinglines.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / return Random { [INFO] [stdout] 37 | | random: File::open("/dev/urandom").unwrap() [INFO] [stdout] 38 | | } [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] 36 ~ Random { [INFO] [stdout] 37 + random: File::open("/dev/urandom").unwrap() [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/findinglines.rs:43:19 [INFO] [stdout] | [INFO] [stdout] 43 | fn from_range(&mut self, s: usize, e: usize) -> usize { [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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/findinglines.rs:69:22 [INFO] [stdout] | [INFO] [stdout] 69 | let mut ps = (&l).split(' '); [INFO] [stdout] | ^^^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/dartscoring.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | return self.x * self.x + self.y * self.y; [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] 75 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 75 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/dartscoring.rs:128:19 [INFO] [stdout] | [INFO] [stdout] 128 | fn graham(points: &mut Vec) -> Vec<&Point> { [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] 128 - fn graham(points: &mut Vec) -> Vec<&Point> { [INFO] [stdout] 128 + fn graham(points: &mut [Point]) -> Vec<&Point> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/water.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | fn bfs(graph: &mut Vec>, s: usize, mut t: usize) -> Option { [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] 45 - fn bfs(graph: &mut Vec>, s: usize, mut t: usize) -> Option { [INFO] [stdout] 45 + fn bfs(graph: &mut [Vec], s: usize, mut t: usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/water.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | prev[s] = Some((s, std::isize::MAX)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 50 - prev[s] = Some((s, std::isize::MAX)); [INFO] [stdout] 50 + prev[s] = Some((s, isize::MAX)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `res_graph` [INFO] [stdout] --> src/pianolessons.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | for i in 0..n { [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] 22 - for i in 0..n { [INFO] [stdout] 22 + for in res_graph.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pianolessons.rs:65:83 [INFO] [stdout] | [INFO] [stdout] 65 | while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 65 - while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] 65 + while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, i16::MAX) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `res_graph` [INFO] [stdout] --> src/paintball.rs:37:28 [INFO] [stdout] | [INFO] [stdout] 37 | 'outloop: for i in 0..n { [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] 37 - 'outloop: for i in 0..n { [INFO] [stdout] 37 + 'outloop: for in res_graph.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/paintball.rs:73:83 [INFO] [stdout] | [INFO] [stdout] 73 | while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 73 - while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] 73 + while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, i16::MAX) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:21:25 [INFO] [stdout] | [INFO] [stdout] 21 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [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: there is no need to manually implement bit rotation [INFO] [stdout] --> src/rubiksrevenge.rs:22:20 [INFO] [stdout] | [INFO] [stdout] 22 | rubik[i] = (rubik[i] << 2) + (rubik[i] >> 6); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `rubik[i].rotate_left(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:33:25 [INFO] [stdout] | [INFO] [stdout] 33 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:43:25 [INFO] [stdout] | [INFO] [stdout] 43 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/rubiksrevenge.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | print!("{}", match (i >> (2 * (3 - o)) as i32 & 0b11) as u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(2 * (3 - o))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/rubiksrevenge.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | 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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/rubiksrevenge.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | / if !dist.contains_key(&neighbour) { [INFO] [stdout] 140 | | queue_next.push_back(neighbour); [INFO] [stdout] 141 | | dist.insert(neighbour, d + 1); [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 139 ~ dist.entry(neighbour).or_insert_with(|| { [INFO] [stdout] 140 + queue_next.push_back(neighbour); [INFO] [stdout] 141 + d + 1 [INFO] [stdout] 142 + }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u16; 12]` which implements the `Copy` trait [INFO] [stdout] --> src/holeynqueensbatman.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | return vec![cur_board.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*cur_board` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/pokemongogo.rs:55:43 [INFO] [stdout] | [INFO] [stdout] 55 | let mut dp: Vec> = vec![vec![std::i32::MAX; pokemon_count]; 1 << pokemon_map.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 55 - let mut dp: Vec> = vec![vec![std::i32::MAX; pokemon_count]; 1 << pokemon_map.len()]; [INFO] [stdout] 55 + let mut dp: Vec> = vec![vec![i32::MAX; pokemon_count]; 1 << pokemon_map.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pokemongogo.rs:64:113 [INFO] [stdout] | [INFO] [stdout] 64 | ... dp[i][id] = pokemons.iter().enumerate().filter(|(x, _)| dp[i & !(1usize << pokemon)][*x] != std::i32::MAX).map(|(x, (_, p2))| ... [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 64 - dp[i][id] = pokemons.iter().enumerate().filter(|(x, _)| dp[i & !(1usize << pokemon)][*x] != std::i32::MAX).map(|(x, (_, p2))| dp[i & !(1usize << pokemon)][x] + p2.dist(point)).min().unwrap(); [INFO] [stdout] 64 + dp[i][id] = pokemons.iter().enumerate().filter(|(x, _)| dp[i & !(1usize << pokemon)][*x] != i32::MAX).map(|(x, (_, p2))| dp[i & !(1usize << pokemon)][x] + p2.dist(point)).min().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/citrusintern.rs:46:23 [INFO] [stdout] | [INFO] [stdout] 46 | let mut promote = std::u64::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 46 - let mut promote = std::u64::MAX; [INFO] [stdout] 46 + let mut promote = u64::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> src/citrusintern.rs:60:49 [INFO] [stdout] | [INFO] [stdout] 60 | promote = cmp::min(promote, cmp::max(0, res.pick.checked_sub(res.skip_below).unwrap_or(0))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `res.pick.saturating_sub(res.skip_below)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] = note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcolouring.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | return (true, used_two_colors); [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] 119 - return (true, used_two_colors); [INFO] [stdout] 119 + (true, used_two_colors) [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/mapcolouring.rs:83:27 [INFO] [stdout] | [INFO] [stdout] 83 | fn check_bipartite(graph: &Vec>, mask: u32) -> (bool, bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 83 - fn check_bipartite(graph: &Vec>, mask: u32) -> (bool, bool) { [INFO] [stdout] 83 + fn check_bipartite(graph: &[Vec], mask: u32) -> (bool, bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `friend` is used to index `friends` [INFO] [stdout] --> src/socialadvertising.rs:27:27 [INFO] [stdout] | [INFO] [stdout] 27 | for friend in 0..n { [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] 27 - for friend in 0..n { [INFO] [stdout] 27 + for (friend, ) in friends.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/socialadvertising.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 30 | mask = mask | friends[friend]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mask |= friends[friend]` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | min: std::usize::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 23 - min: std::usize::MAX, [INFO] [stdout] 23 + min: usize::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:44:45 [INFO] [stdout] | [INFO] [stdout] 44 | min: if k == 1 { 1 } else { std::usize::MAX }, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 44 - min: if k == 1 { 1 } else { std::usize::MAX }, [INFO] [stdout] 44 + min: if k == 1 { 1 } else { usize::MAX }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(u64, usize); 50]` which implements the `Copy` trait [INFO] [stdout] --> src/nekameleoni.rs:92:28 [INFO] [stdout] | [INFO] [stdout] 92 | element.posf = left.posf.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `left.posf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(u64, usize); 50]` which implements the `Copy` trait [INFO] [stdout] --> src/nekameleoni.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | element.pref = left.pref.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `left.pref` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:128:27 [INFO] [stdout] | [INFO] [stdout] 128 | let mut min = std::usize::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 128 - let mut min = std::usize::MAX; [INFO] [stdout] 128 + let mut min = usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:149:58 [INFO] [stdout] | [INFO] [stdout] 149 | self.tree[idx].min = if self.k == 1 { 1 } else { std::usize::MAX }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 149 - self.tree[idx].min = if self.k == 1 { 1 } else { std::usize::MAX }; [INFO] [stdout] 149 + self.tree[idx].min = if self.k == 1 { 1 } else { usize::MAX }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:189:23 [INFO] [stdout] | [INFO] [stdout] 189 | if ans != std::usize::MAX { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 189 - if ans != std::usize::MAX { [INFO] [stdout] 189 + if ans != usize::MAX { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `min_reachable` [INFO] [stdout] --> src/emptyingbaltic.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | for x in 0..h { [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] 73 - for x in 0..h { [INFO] [stdout] 73 + for in min_reachable.iter().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `min_reachable` [INFO] [stdout] --> src/emptyingbaltic.rs:74:18 [INFO] [stdout] | [INFO] [stdout] 74 | for y in 0..w { [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] 74 - for y in 0..w { [INFO] [stdout] 74 + for in min_reachable.iter().take(w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/cardboardcontainer.rs:15:19 [INFO] [stdout] | [INFO] [stdout] 15 | let mut min = std::usize::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 15 - let mut min = std::usize::MAX; [INFO] [stdout] 15 + let mut min = usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/cardboardcontainer.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | if num % i == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `num.is_multiple_of(i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `index_pointer` is used as a loop counter [INFO] [stdout] --> src/moviecollection.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | for req in requests.split(' ').map(|x| x.parse::().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (index_pointer, req) in (m..).zip(requests.split(' ').map(|x| x.parse::().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cleaningpipes.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | return self.x * self.x + self.y * self.y; [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] 77 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 77 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/cleaningpipes.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | f64::max(-1.0, f64::min(1.0, cos_theta)).acos() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cos_theta.clamp(-1.0, 1.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/cleaningpipes.rs:113:30 [INFO] [stdout] | [INFO] [stdout] 113 | if self.0 == other.0 { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 114 | | Some(self.0.clone()) [INFO] [stdout] 115 | | } else if self.0 == other.1 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/cleaningpipes.rs:115:37 [INFO] [stdout] | [INFO] [stdout] 115 | } else if self.0 == other.1 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 116 | | Some(self.0.clone()) [INFO] [stdout] 117 | | } else if self.1 == other.0 { [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` has identical blocks [INFO] [stdout] --> src/cleaningpipes.rs:117:37 [INFO] [stdout] | [INFO] [stdout] 117 | } else if self.1 == other.0 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 118 | | Some(self.1.clone()) [INFO] [stdout] 119 | | } else if self.1 == other.1 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/cleaningpipes.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | } else if self.1 == other.1 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 120 | | Some(self.1.clone()) [INFO] [stdout] 121 | | } 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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cleaningpipes.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | if let Some(_) = s1.proper_intersect(&s2) { [INFO] [stdout] | -------^^^^^^^--------------------------- help: try: `if s1.proper_intersect(&s2).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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cleaningpipes.rs:216:28 [INFO] [stdout] | [INFO] [stdout] 216 | fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 - fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 216 + fn dfs(node: usize, edges: &[Vec], visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/cleaningpipes.rs:216:55 [INFO] [stdout] | [INFO] [stdout] 216 | fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 - fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 216 + fn dfs(node: usize, edges: &Vec>, visited: &mut [bool], color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/cleaningpipes.rs:216:78 [INFO] [stdout] | [INFO] [stdout] 216 | fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 - fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 216 + fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut [Color]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mosquitoes.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | return self.x * self.x + self.y * self.y; [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] 72 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 72 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mosquitoes.rs:154:24 [INFO] [stdout] | [INFO] [stdout] 154 | if c.in_circle(&p) { [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rafting.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | return self.x * self.x + self.y * self.y; [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] 70 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 70 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rafting.rs:103:30 [INFO] [stdout] | [INFO] [stdout] 103 | c: (q - p).cross(&p) [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rafting.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | self.v.cross(&p) - self.c [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/rafting.rs:187:32 [INFO] [stdout] | [INFO] [stdout] 187 | let mut min_distance = std::f64::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 187 - let mut min_distance = std::f64::MAX; [INFO] [stdout] 187 + let mut min_distance = f64::MAX; [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/imperfectgps.rs:67:19 [INFO] [stdout] | [INFO] [stdout] 67 | fn path_len(path: &Vec<(f64, f64, usize)>) -> f64 { [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] 67 - fn path_len(path: &Vec<(f64, f64, usize)>) -> f64 { [INFO] [stdout] 67 + fn path_len(path: &[(f64, f64, usize)]) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/implementationirregularities.rs:20:55 [INFO] [stdout] | [INFO] [stdout] 20 | writeln!(&mut w, "{}", unbounded_binary_search(1, std::usize::MAX, |to_check: usize| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 20 - writeln!(&mut w, "{}", unbounded_binary_search(1, std::usize::MAX, |to_check: usize| { [INFO] [stdout] 20 + writeln!(&mut w, "{}", unbounded_binary_search(1, usize::MAX, |to_check: usize| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/implementationirregularities.rs:21:27 [INFO] [stdout] | [INFO] [stdout] 21 | let mut pointer = std::i128::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 21 - let mut pointer = std::i128::MAX; [INFO] [stdout] 21 + let mut pointer = i128::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/deceleratingjump.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | let mut score = vec![vec![-std::isize::MAX; n]; n]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 35 - let mut score = vec![vec![-std::isize::MAX; n]; n]; [INFO] [stdout] 35 + let mut score = vec![vec![-isize::MAX; n]; n]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fairplay.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | Some(self.cmp(&other)) [INFO] [stdout] | ^^^^^^ help: change this to: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/fairplay.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | if n % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `!n.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ticketpricing.rs:38:78 [INFO] [stdout] | [INFO] [stdout] 38 | fn longest_path(ori_weeks_left: usize, ori_tickets_left: usize, week_prices: &Vec>) -> (isize, usize) { [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] 38 - fn longest_path(ori_weeks_left: usize, ori_tickets_left: usize, week_prices: &Vec>) -> (isize, usize) { [INFO] [stdout] 38 + fn longest_path(ori_weeks_left: usize, ori_tickets_left: usize, week_prices: &[Vec<(usize, usize)>]) -> (isize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/ticketpricing.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | let mut dist = vec![vec![-std::isize::MAX; ori_tickets_left + 1]; ori_weeks_left + 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 68 - let mut dist = vec![vec![-std::isize::MAX; ori_tickets_left + 1]; ori_weeks_left + 2]; [INFO] [stdout] 68 + let mut dist = vec![vec![-isize::MAX; ori_tickets_left + 1]; ori_weeks_left + 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/ticketpricing.rs:71:32 [INFO] [stdout] | [INFO] [stdout] 71 | let mut origin = vec![vec![std::usize::MAX; ori_tickets_left + 1]; ori_weeks_left + 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 71 - let mut origin = vec![vec![std::usize::MAX; ori_tickets_left + 1]; ori_weeks_left + 1]; [INFO] [stdout] 71 + let mut origin = vec![vec![usize::MAX; ori_tickets_left + 1]; ori_weeks_left + 1]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/orders.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | cur = cur - c[index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cur -= c[index]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/orders.rs:47:24 [INFO] [stdout] | [INFO] [stdout] 47 | fn longest_path(items: &Vec, cap: usize) -> (Vec>, Vec) { [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] 47 - fn longest_path(items: &Vec, cap: usize) -> (Vec>, Vec) { [INFO] [stdout] 47 + fn longest_path(items: &[usize], cap: usize) -> (Vec>, Vec) { [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/detour.rs:62:52 [INFO] [stdout] | [INFO] [stdout] 62 | fn dijkstra(from: usize, to: usize, intersections: &Vec>, stop_when_found: bool) -> Vec> { [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] 62 - fn dijkstra(from: usize, to: usize, intersections: &Vec>, stop_when_found: bool) -> Vec> { [INFO] [stdout] 62 + fn dijkstra(from: usize, to: usize, intersections: &[HashMap], stop_when_found: bool) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/detour.rs:83:25 [INFO] [stdout] | [INFO] [stdout] 83 | let mut dist = vec![std::usize::MAX; intersections.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 83 - let mut dist = vec![std::usize::MAX; intersections.len()]; [INFO] [stdout] 83 + let mut dist = vec![usize::MAX; intersections.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/bumped.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | let mut dist = vec![std::usize::MAX; cities.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 58 - let mut dist = vec![std::usize::MAX; cities.len()]; [INFO] [stdout] 58 + let mut dist = vec![usize::MAX; cities.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bumped.rs:64:58 [INFO] [stdout] | [INFO] [stdout] 64 | fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [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] 64 - fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [INFO] [stdout] 64 + fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut [usize], cities: &Vec>, to: usize) { [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/bumped.rs:64:83 [INFO] [stdout] | [INFO] [stdout] 64 | fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [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] 64 - fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [INFO] [stdout] 64 + fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &[Vec<(usize, usize, usize)>], to: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bumped.rs:87:42 [INFO] [stdout] | [INFO] [stdout] 87 | inner_dijkstra(&mut heap, &mut dist, &cities, to); [INFO] [stdout] | ^^^^^^^ help: change this to: `cities` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bumped.rs:98:42 [INFO] [stdout] | [INFO] [stdout] 98 | inner_dijkstra(&mut heap, &mut dist, &cities, to); [INFO] [stdout] | ^^^^^^^ help: change this to: `cities` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/onewayroads.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 132 - return None; [INFO] [stdout] 132 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `height` is used to index `height_map` [INFO] [stdout] --> src/firefly.rs:29:19 [INFO] [stdout] | [INFO] [stdout] 29 | for height in 0..h { [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] 29 - for height in 0..h { [INFO] [stdout] 29 + for (height, ) in height_map.iter_mut().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/hoppers.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | (*nodes.get_mut(a - 1).unwrap()).neighbours.push(b - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut(a - 1).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/hoppers.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | (*nodes.get_mut(b - 1).unwrap()).neighbours.push(a - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut(b - 1).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/hoppers.rs:87:28 [INFO] [stdout] | [INFO] [stdout] 87 | fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 87 + fn dfs(node: usize, nodes: &[Node], visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/hoppers.rs:87:49 [INFO] [stdout] | [INFO] [stdout] 87 | fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 87 + fn dfs(node: usize, nodes: &Vec, visited: &mut [bool], color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/hoppers.rs:87:72 [INFO] [stdout] | [INFO] [stdout] 87 | fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 87 + fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut [Color]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/faultyrobot.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | (*nodes.get_mut((a - 1) as usize).unwrap()).neighbours.push(b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut((a - 1) as usize).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/faultyrobot.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | (*nodes.get_mut((-a - 1) as usize).unwrap()).forced_edge = Some(b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut((-a - 1) as usize).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/faultyrobot.rs:62:19 [INFO] [stdout] | [INFO] [stdout] 62 | fn explore(nodes: &Vec, mut pos: usize) -> (HashSet, Option) { [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] 62 - fn explore(nodes: &Vec, mut pos: usize) -> (HashSet, Option) { [INFO] [stdout] 62 + fn explore(nodes: &[Node], mut pos: usize) -> (HashSet, Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/evenup.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | while let Some(v) = values.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for v in values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | (*list.borrow_mut()).prev = Some(Rc::new(RefCell::new(Element { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `list.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:51:29 [INFO] [stdout] | [INFO] [stdout] 51 | let new = Rc::clone((*list.borrow()).prev.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `list.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/evenup.rs:62:16 [INFO] [stdout] | [INFO] [stdout] 62 | if (cursor.borrow().v + next.borrow().v) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(cursor.borrow().v + next.borrow().v).is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | (*prev.borrow_mut()).next = Some(next_next.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `prev.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:73:25 [INFO] [stdout] | [INFO] [stdout] 73 | (*next_next.borrow_mut()).prev = Some(prev.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_next.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:77:25 [INFO] [stdout] | [INFO] [stdout] 77 | (*prev.borrow_mut()).next = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `prev.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | (*next_next.borrow_mut()).prev = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_next.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/snippets/geometry.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | return self.x * self.x + self.y * self.y; [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] 68 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 68 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/snippets/geometry.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | f64::max(-1.0, f64::min(1.0, cos_theta)).acos() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cos_theta.clamp(-1.0, 1.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/snippets/geometry.rs:123:30 [INFO] [stdout] | [INFO] [stdout] 123 | c: (q - p).cross(&p) [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/snippets/geometry.rs:128:22 [INFO] [stdout] | [INFO] [stdout] 128 | self.v.cross(&p) - self.c [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter` for `Some` followed by `unwrap` [INFO] [stdout] --> src/primes2.rs:18:91 [INFO] [stdout] | [INFO] [stdout] 18 | ...se(&inp, *base)).filter(|x| x.is_some()).map(|x| x.unwrap()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_filter_map [INFO] [stdout] = note: `#[warn(clippy::option_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/primes2.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | let div = gcd(primes.clone(), poss.len() as u64); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `primes` [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: manual checked division [INFO] [stdout] --> src/primes2.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | if div != 0 { [INFO] [stdout] | ^^^^^^^^ check performed here [INFO] [stdout] 28 | writeln!(&mut w, "{}/{}", primes / div, (poss.len() as u64) / div).unwrap(); [INFO] [stdout] | ------------ ------------------------- ... and here [INFO] [stdout] | | [INFO] [stdout] | division performed here [INFO] [stdout] | [INFO] [stdout] = help: consider using `checked_div` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_checked_ops [INFO] [stdout] = note: `#[warn(clippy::manual_checked_ops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/primes2.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return true; [INFO] [stdout] 58 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/primes2.rs:54:22 [INFO] [stdout] | [INFO] [stdout] 54 | if n != x && n % x == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/visualgo.rs:36:42 [INFO] [stdout] | [INFO] [stdout] 36 | fn dijkstra(from: usize, to: usize, map: &Vec>) -> usize { [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] 36 - fn dijkstra(from: usize, to: usize, map: &Vec>) -> usize { [INFO] [stdout] 36 + fn dijkstra(from: usize, to: usize, map: &[Vec<(usize, usize)>]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/visualgo.rs:56:25 [INFO] [stdout] | [INFO] [stdout] 56 | let mut dist = vec![std::usize::MAX; map.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 56 - let mut dist = vec![std::usize::MAX; map.len()]; [INFO] [stdout] 56 + let mut dist = vec![usize::MAX; map.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/visualgo.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | paths[path_to] = paths[path_to] + paths[vertex]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `paths[path_to] += paths[vertex]` [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: unneeded `return` statement [INFO] [stdout] --> src/dunglish.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | 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] 25 - return true; [INFO] [stdout] 25 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/dunglish.rs:34:39 [INFO] [stdout] | [INFO] [stdout] 34 | let sentence_map: HashSet<&str> = sentence.iter().map(|&x| x).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sentence.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/dunglish.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | correct = correct * wordset.correct; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `correct *= wordset.correct` [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/dunglish.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | total = total * (wordset.correct + wordset.incorrect) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total *= (wordset.correct + wordset.incorrect)` [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 `writeln!` [INFO] [stdout] --> src/ternarianweights.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | writeln!(&mut w, "").unwrap(); [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#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/acearbiter.rs:27:20 [INFO] [stdout] | [INFO] [stdout] 27 | let whom = ((s0 + s1 + 1) / 2) % 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(s0 + s1).div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/robotsonagrid.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | 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] 28 - return false; [INFO] [stdout] 28 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/timebomb.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | if !(line[(i * 4)..((i * 4) + 3)] == ASCII[(40*k + n * 4)..(40*k + n * 4 + 3)]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(line[(i * 4)..((i * 4) + 3)] != ASCII[(40*k + n * 4)..(40*k + n * 4 + 3)])` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/timebomb.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | fn test_number(input: &Vec, n: usize, i: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn test_number(input: &Vec, n: usize, i: usize) -> bool { [INFO] [stdout] 12 + fn test_number(input: &[String], n: usize, i: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/typo.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | base = base % modulus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base %= modulus` [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/typo.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | exp = exp >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `exp >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/typo.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | res.sort_by(|(_, i), (_, o)| i.cmp(o)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 - res.sort_by(|(_, i), (_, o)| i.cmp(o)); [INFO] [stdout] 57 + res.sort_by_key(|(_, i)| *i); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/burrowswheeler.rs:13:37 [INFO] [stdout] | [INFO] [stdout] 13 | let mut shifts: Vec<&str> = (0..(input.len() / 2)).into_iter().map(|x| &input[x..((input.len() / 2) + x)]).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..(input.len() / 2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/nine.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | base = base % modulus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base %= modulus` [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/nine.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | exp = exp >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `exp >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/hnumbers.rs:59:23 [INFO] [stdout] | [INFO] [stdout] 59 | fn binary_search(inp: &Vec, search: usize) -> usize { [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] 59 - fn binary_search(inp: &Vec, search: usize) -> usize { [INFO] [stdout] 59 + fn binary_search(inp: &[usize], search: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/closestpair2.rs:35:26 [INFO] [stdout] | [INFO] [stdout] 35 | let mut ps = (&l).split(' '); [INFO] [stdout] | ^^^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:36:33 [INFO] [stdout] | [INFO] [stdout] 36 | let x = parse_float(&ps.next().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `ps.next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | let y = parse_float(&ps.next().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `ps.next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/closestpair2.rs:83:22 [INFO] [stdout] | [INFO] [stdout] 83 | fn min_distance_full<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 83 - fn min_distance_full<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] 83 + fn min_distance_full(points: &[Point]) -> (IntSize, &Point, &Point) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/closestpair2.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | fn min_distance<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 95 - fn min_distance<'a>(points: &'a [Point]) -> (IntSize, &'a Point, &'a Point) { [INFO] [stdout] 95 + fn min_distance(points: &[Point]) -> (IntSize, &Point, &Point) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:46 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:57 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[o]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:69 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/closestpair2.rs:131:80 [INFO] [stdout] | [INFO] [stdout] 131 | ans = cmp::min(ans, (Point::dist(&strip[i], &strip[o]), &strip[i], &strip[o])) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `strip[o]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/clockpictures.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | base = base % modulus; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base %= modulus` [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/clockpictures.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | exp = exp >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `exp >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/clockpictures.rs:34:15 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash(word: &Vec) -> i64 { [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] 34 - fn hash(word: &Vec) -> i64 { [INFO] [stdout] 34 + fn hash(word: &[u32]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/findinglines.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | std::f64::MAX [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 23 - std::f64::MAX [INFO] [stdout] 23 + f64::MAX [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/findinglines.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / return Random { [INFO] [stdout] 37 | | random: File::open("/dev/urandom").unwrap() [INFO] [stdout] 38 | | } [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] 36 ~ Random { [INFO] [stdout] 37 + random: File::open("/dev/urandom").unwrap() [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/findinglines.rs:43:19 [INFO] [stdout] | [INFO] [stdout] 43 | fn from_range(&mut self, s: usize, e: usize) -> usize { [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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/findinglines.rs:69:22 [INFO] [stdout] | [INFO] [stdout] 69 | let mut ps = (&l).split(' '); [INFO] [stdout] | ^^^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/dartscoring.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | return self.x * self.x + self.y * self.y; [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] 75 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 75 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/dartscoring.rs:128:19 [INFO] [stdout] | [INFO] [stdout] 128 | fn graham(points: &mut Vec) -> Vec<&Point> { [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] 128 - fn graham(points: &mut Vec) -> Vec<&Point> { [INFO] [stdout] 128 + fn graham(points: &mut [Point]) -> Vec<&Point> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/water.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | fn bfs(graph: &mut Vec>, s: usize, mut t: usize) -> Option { [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] 45 - fn bfs(graph: &mut Vec>, s: usize, mut t: usize) -> Option { [INFO] [stdout] 45 + fn bfs(graph: &mut [Vec], s: usize, mut t: usize) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/water.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | prev[s] = Some((s, std::isize::MAX)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 50 - prev[s] = Some((s, std::isize::MAX)); [INFO] [stdout] 50 + prev[s] = Some((s, isize::MAX)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `res_graph` [INFO] [stdout] --> src/pianolessons.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | for i in 0..n { [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] 22 - for i in 0..n { [INFO] [stdout] 22 + for in res_graph.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pianolessons.rs:65:83 [INFO] [stdout] | [INFO] [stdout] 65 | while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 65 - while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] 65 + while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, i16::MAX) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `res_graph` [INFO] [stdout] --> src/paintball.rs:37:28 [INFO] [stdout] | [INFO] [stdout] 37 | 'outloop: for i in 0..n { [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] 37 - 'outloop: for i in 0..n { [INFO] [stdout] 37 + 'outloop: for in res_graph.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/paintball.rs:73:83 [INFO] [stdout] | [INFO] [stdout] 73 | while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 73 - while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, std::i16::MAX) { [INFO] [stdout] 73 + while let Some(pushed_flow) = dfs(graph, &mut vec![false; graph.len()], s, t, i16::MAX) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:21:25 [INFO] [stdout] | [INFO] [stdout] 21 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [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: there is no need to manually implement bit rotation [INFO] [stdout] --> src/rubiksrevenge.rs:22:20 [INFO] [stdout] | [INFO] [stdout] 22 | rubik[i] = (rubik[i] << 2) + (rubik[i] >> 6); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `rubik[i].rotate_left(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:33:25 [INFO] [stdout] | [INFO] [stdout] 33 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/rubiksrevenge.rs:43:25 [INFO] [stdout] | [INFO] [stdout] 43 | let mut rubik = rubik.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*rubik` [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/rubiksrevenge.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | print!("{}", match (i >> (2 * (3 - o)) as i32 & 0b11) as u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(2 * (3 - o))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/rubiksrevenge.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | 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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/rubiksrevenge.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | / if !dist.contains_key(&neighbour) { [INFO] [stdout] 140 | | queue_next.push_back(neighbour); [INFO] [stdout] 141 | | dist.insert(neighbour, d + 1); [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 139 ~ dist.entry(neighbour).or_insert_with(|| { [INFO] [stdout] 140 + queue_next.push_back(neighbour); [INFO] [stdout] 141 + d + 1 [INFO] [stdout] 142 + }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u16; 12]` which implements the `Copy` trait [INFO] [stdout] --> src/holeynqueensbatman.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | return vec![cur_board.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*cur_board` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/pokemongogo.rs:55:43 [INFO] [stdout] | [INFO] [stdout] 55 | let mut dp: Vec> = vec![vec![std::i32::MAX; pokemon_count]; 1 << pokemon_map.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 55 - let mut dp: Vec> = vec![vec![std::i32::MAX; pokemon_count]; 1 << pokemon_map.len()]; [INFO] [stdout] 55 + let mut dp: Vec> = vec![vec![i32::MAX; pokemon_count]; 1 << pokemon_map.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/pokemongogo.rs:64:113 [INFO] [stdout] | [INFO] [stdout] 64 | ... dp[i][id] = pokemons.iter().enumerate().filter(|(x, _)| dp[i & !(1usize << pokemon)][*x] != std::i32::MAX).map(|(x, (_, p2))| ... [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 64 - dp[i][id] = pokemons.iter().enumerate().filter(|(x, _)| dp[i & !(1usize << pokemon)][*x] != std::i32::MAX).map(|(x, (_, p2))| dp[i & !(1usize << pokemon)][x] + p2.dist(point)).min().unwrap(); [INFO] [stdout] 64 + dp[i][id] = pokemons.iter().enumerate().filter(|(x, _)| dp[i & !(1usize << pokemon)][*x] != i32::MAX).map(|(x, (_, p2))| dp[i & !(1usize << pokemon)][x] + p2.dist(point)).min().unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/citrusintern.rs:46:23 [INFO] [stdout] | [INFO] [stdout] 46 | let mut promote = std::u64::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 46 - let mut promote = std::u64::MAX; [INFO] [stdout] 46 + let mut promote = u64::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> src/citrusintern.rs:60:49 [INFO] [stdout] | [INFO] [stdout] 60 | promote = cmp::min(promote, cmp::max(0, res.pick.checked_sub(res.skip_below).unwrap_or(0))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `res.pick.saturating_sub(res.skip_below)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] = note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mapcolouring.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | return (true, used_two_colors); [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] 119 - return (true, used_two_colors); [INFO] [stdout] 119 + (true, used_two_colors) [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/mapcolouring.rs:83:27 [INFO] [stdout] | [INFO] [stdout] 83 | fn check_bipartite(graph: &Vec>, mask: u32) -> (bool, bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 83 - fn check_bipartite(graph: &Vec>, mask: u32) -> (bool, bool) { [INFO] [stdout] 83 + fn check_bipartite(graph: &[Vec], mask: u32) -> (bool, bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `friend` is used to index `friends` [INFO] [stdout] --> src/socialadvertising.rs:27:27 [INFO] [stdout] | [INFO] [stdout] 27 | for friend in 0..n { [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] 27 - for friend in 0..n { [INFO] [stdout] 27 + for (friend, ) in friends.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/socialadvertising.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 30 | mask = mask | friends[friend]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mask |= friends[friend]` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | min: std::usize::MAX, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 23 - min: std::usize::MAX, [INFO] [stdout] 23 + min: usize::MAX, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:44:45 [INFO] [stdout] | [INFO] [stdout] 44 | min: if k == 1 { 1 } else { std::usize::MAX }, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 44 - min: if k == 1 { 1 } else { std::usize::MAX }, [INFO] [stdout] 44 + min: if k == 1 { 1 } else { usize::MAX }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(u64, usize); 50]` which implements the `Copy` trait [INFO] [stdout] --> src/nekameleoni.rs:92:28 [INFO] [stdout] | [INFO] [stdout] 92 | element.posf = left.posf.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `left.posf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(u64, usize); 50]` which implements the `Copy` trait [INFO] [stdout] --> src/nekameleoni.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | element.pref = left.pref.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `left.pref` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:128:27 [INFO] [stdout] | [INFO] [stdout] 128 | let mut min = std::usize::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 128 - let mut min = std::usize::MAX; [INFO] [stdout] 128 + let mut min = usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:149:58 [INFO] [stdout] | [INFO] [stdout] 149 | self.tree[idx].min = if self.k == 1 { 1 } else { std::usize::MAX }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 149 - self.tree[idx].min = if self.k == 1 { 1 } else { std::usize::MAX }; [INFO] [stdout] 149 + self.tree[idx].min = if self.k == 1 { 1 } else { usize::MAX }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/nekameleoni.rs:189:23 [INFO] [stdout] | [INFO] [stdout] 189 | if ans != std::usize::MAX { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 189 - if ans != std::usize::MAX { [INFO] [stdout] 189 + if ans != usize::MAX { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `min_reachable` [INFO] [stdout] --> src/emptyingbaltic.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | for x in 0..h { [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] 73 - for x in 0..h { [INFO] [stdout] 73 + for in min_reachable.iter().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `min_reachable` [INFO] [stdout] --> src/emptyingbaltic.rs:74:18 [INFO] [stdout] | [INFO] [stdout] 74 | for y in 0..w { [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] 74 - for y in 0..w { [INFO] [stdout] 74 + for in min_reachable.iter().take(w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/cardboardcontainer.rs:15:19 [INFO] [stdout] | [INFO] [stdout] 15 | let mut min = std::usize::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 15 - let mut min = std::usize::MAX; [INFO] [stdout] 15 + let mut min = usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/cardboardcontainer.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | if num % i == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `num.is_multiple_of(i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `index_pointer` is used as a loop counter [INFO] [stdout] --> src/moviecollection.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | for req in requests.split(' ').map(|x| x.parse::().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (index_pointer, req) in (m..).zip(requests.split(' ').map(|x| x.parse::().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/cleaningpipes.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | return self.x * self.x + self.y * self.y; [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] 77 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 77 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/cleaningpipes.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | f64::max(-1.0, f64::min(1.0, cos_theta)).acos() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cos_theta.clamp(-1.0, 1.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/cleaningpipes.rs:113:30 [INFO] [stdout] | [INFO] [stdout] 113 | if self.0 == other.0 { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 114 | | Some(self.0.clone()) [INFO] [stdout] 115 | | } else if self.0 == other.1 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/cleaningpipes.rs:115:37 [INFO] [stdout] | [INFO] [stdout] 115 | } else if self.0 == other.1 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 116 | | Some(self.0.clone()) [INFO] [stdout] 117 | | } else if self.1 == other.0 { [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` has identical blocks [INFO] [stdout] --> src/cleaningpipes.rs:117:37 [INFO] [stdout] | [INFO] [stdout] 117 | } else if self.1 == other.0 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 118 | | Some(self.1.clone()) [INFO] [stdout] 119 | | } else if self.1 == other.1 { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/cleaningpipes.rs:119:37 [INFO] [stdout] | [INFO] [stdout] 119 | } else if self.1 == other.1 { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 120 | | Some(self.1.clone()) [INFO] [stdout] 121 | | } 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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/cleaningpipes.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | if let Some(_) = s1.proper_intersect(&s2) { [INFO] [stdout] | -------^^^^^^^--------------------------- help: try: `if s1.proper_intersect(&s2).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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/cleaningpipes.rs:216:28 [INFO] [stdout] | [INFO] [stdout] 216 | fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 - fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 216 + fn dfs(node: usize, edges: &[Vec], visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/cleaningpipes.rs:216:55 [INFO] [stdout] | [INFO] [stdout] 216 | fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 - fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 216 + fn dfs(node: usize, edges: &Vec>, visited: &mut [bool], color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/cleaningpipes.rs:216:78 [INFO] [stdout] | [INFO] [stdout] 216 | fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 216 - fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 216 + fn dfs(node: usize, edges: &Vec>, visited: &mut Vec, color: &mut [Color]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mosquitoes.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | return self.x * self.x + self.y * self.y; [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] 72 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 72 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mosquitoes.rs:154:24 [INFO] [stdout] | [INFO] [stdout] 154 | if c.in_circle(&p) { [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/rafting.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | return self.x * self.x + self.y * self.y; [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] 70 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 70 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rafting.rs:103:30 [INFO] [stdout] | [INFO] [stdout] 103 | c: (q - p).cross(&p) [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/rafting.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | self.v.cross(&p) - self.c [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/rafting.rs:187:32 [INFO] [stdout] | [INFO] [stdout] 187 | let mut min_distance = std::f64::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 187 - let mut min_distance = std::f64::MAX; [INFO] [stdout] 187 + let mut min_distance = f64::MAX; [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/imperfectgps.rs:67:19 [INFO] [stdout] | [INFO] [stdout] 67 | fn path_len(path: &Vec<(f64, f64, usize)>) -> f64 { [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] 67 - fn path_len(path: &Vec<(f64, f64, usize)>) -> f64 { [INFO] [stdout] 67 + fn path_len(path: &[(f64, f64, usize)]) -> f64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/implementationirregularities.rs:20:55 [INFO] [stdout] | [INFO] [stdout] 20 | writeln!(&mut w, "{}", unbounded_binary_search(1, std::usize::MAX, |to_check: usize| { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 20 - writeln!(&mut w, "{}", unbounded_binary_search(1, std::usize::MAX, |to_check: usize| { [INFO] [stdout] 20 + writeln!(&mut w, "{}", unbounded_binary_search(1, usize::MAX, |to_check: usize| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/implementationirregularities.rs:21:27 [INFO] [stdout] | [INFO] [stdout] 21 | let mut pointer = std::i128::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 21 - let mut pointer = std::i128::MAX; [INFO] [stdout] 21 + let mut pointer = i128::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/deceleratingjump.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | let mut score = vec![vec![-std::isize::MAX; n]; n]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 35 - let mut score = vec![vec![-std::isize::MAX; n]; n]; [INFO] [stdout] 35 + let mut score = vec![vec![-isize::MAX; n]; n]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fairplay.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | Some(self.cmp(&other)) [INFO] [stdout] | ^^^^^^ help: change this to: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/fairplay.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | if n % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `!n.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ticketpricing.rs:38:78 [INFO] [stdout] | [INFO] [stdout] 38 | fn longest_path(ori_weeks_left: usize, ori_tickets_left: usize, week_prices: &Vec>) -> (isize, usize) { [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] 38 - fn longest_path(ori_weeks_left: usize, ori_tickets_left: usize, week_prices: &Vec>) -> (isize, usize) { [INFO] [stdout] 38 + fn longest_path(ori_weeks_left: usize, ori_tickets_left: usize, week_prices: &[Vec<(usize, usize)>]) -> (isize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/ticketpricing.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | let mut dist = vec![vec![-std::isize::MAX; ori_tickets_left + 1]; ori_weeks_left + 2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 68 - let mut dist = vec![vec![-std::isize::MAX; ori_tickets_left + 1]; ori_weeks_left + 2]; [INFO] [stdout] 68 + let mut dist = vec![vec![-isize::MAX; ori_tickets_left + 1]; ori_weeks_left + 2]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/ticketpricing.rs:71:32 [INFO] [stdout] | [INFO] [stdout] 71 | let mut origin = vec![vec![std::usize::MAX; ori_tickets_left + 1]; ori_weeks_left + 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 71 - let mut origin = vec![vec![std::usize::MAX; ori_tickets_left + 1]; ori_weeks_left + 1]; [INFO] [stdout] 71 + let mut origin = vec![vec![usize::MAX; ori_tickets_left + 1]; ori_weeks_left + 1]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/orders.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | cur = cur - c[index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cur -= c[index]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/orders.rs:47:24 [INFO] [stdout] | [INFO] [stdout] 47 | fn longest_path(items: &Vec, cap: usize) -> (Vec>, Vec) { [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] 47 - fn longest_path(items: &Vec, cap: usize) -> (Vec>, Vec) { [INFO] [stdout] 47 + fn longest_path(items: &[usize], cap: usize) -> (Vec>, Vec) { [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/detour.rs:62:52 [INFO] [stdout] | [INFO] [stdout] 62 | fn dijkstra(from: usize, to: usize, intersections: &Vec>, stop_when_found: bool) -> Vec> { [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] 62 - fn dijkstra(from: usize, to: usize, intersections: &Vec>, stop_when_found: bool) -> Vec> { [INFO] [stdout] 62 + fn dijkstra(from: usize, to: usize, intersections: &[HashMap], stop_when_found: bool) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/detour.rs:83:25 [INFO] [stdout] | [INFO] [stdout] 83 | let mut dist = vec![std::usize::MAX; intersections.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 83 - let mut dist = vec![std::usize::MAX; intersections.len()]; [INFO] [stdout] 83 + let mut dist = vec![usize::MAX; intersections.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/bumped.rs:58:25 [INFO] [stdout] | [INFO] [stdout] 58 | let mut dist = vec![std::usize::MAX; cities.len()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 58 - let mut dist = vec![std::usize::MAX; cities.len()]; [INFO] [stdout] 58 + let mut dist = vec![usize::MAX; cities.len()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bumped.rs:64:58 [INFO] [stdout] | [INFO] [stdout] 64 | fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [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] 64 - fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [INFO] [stdout] 64 + fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut [usize], cities: &Vec>, to: usize) { [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/bumped.rs:64:83 [INFO] [stdout] | [INFO] [stdout] 64 | fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [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] 64 - fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &Vec>, to: usize) { [INFO] [stdout] 64 + fn inner_dijkstra(heap: &mut BinaryHeap, dist: &mut Vec, cities: &[Vec<(usize, usize, usize)>], to: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bumped.rs:87:42 [INFO] [stdout] | [INFO] [stdout] 87 | inner_dijkstra(&mut heap, &mut dist, &cities, to); [INFO] [stdout] | ^^^^^^^ help: change this to: `cities` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bumped.rs:98:42 [INFO] [stdout] | [INFO] [stdout] 98 | inner_dijkstra(&mut heap, &mut dist, &cities, to); [INFO] [stdout] | ^^^^^^^ help: change this to: `cities` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/onewayroads.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 132 - return None; [INFO] [stdout] 132 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `height` is used to index `height_map` [INFO] [stdout] --> src/firefly.rs:29:19 [INFO] [stdout] | [INFO] [stdout] 29 | for height in 0..h { [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] 29 - for height in 0..h { [INFO] [stdout] 29 + for (height, ) in height_map.iter_mut().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/hoppers.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | (*nodes.get_mut(a - 1).unwrap()).neighbours.push(b - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut(a - 1).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/hoppers.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | (*nodes.get_mut(b - 1).unwrap()).neighbours.push(a - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut(b - 1).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/hoppers.rs:87:28 [INFO] [stdout] | [INFO] [stdout] 87 | fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 87 + fn dfs(node: usize, nodes: &[Node], visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/hoppers.rs:87:49 [INFO] [stdout] | [INFO] [stdout] 87 | fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 87 + fn dfs(node: usize, nodes: &Vec, visited: &mut [bool], color: &mut Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/hoppers.rs:87:72 [INFO] [stdout] | [INFO] [stdout] 87 | fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut Vec) -> bool { [INFO] [stdout] 87 + fn dfs(node: usize, nodes: &Vec, visited: &mut Vec, color: &mut [Color]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/faultyrobot.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | (*nodes.get_mut((a - 1) as usize).unwrap()).neighbours.push(b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut((a - 1) as usize).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/faultyrobot.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | (*nodes.get_mut((-a - 1) as usize).unwrap()).forced_edge = Some(b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `nodes.get_mut((-a - 1) as usize).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/faultyrobot.rs:62:19 [INFO] [stdout] | [INFO] [stdout] 62 | fn explore(nodes: &Vec, mut pos: usize) -> (HashSet, Option) { [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] 62 - fn explore(nodes: &Vec, mut pos: usize) -> (HashSet, Option) { [INFO] [stdout] 62 + fn explore(nodes: &[Node], mut pos: usize) -> (HashSet, Option) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/evenup.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | while let Some(v) = values.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for v in values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | (*list.borrow_mut()).prev = Some(Rc::new(RefCell::new(Element { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `list.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:51:29 [INFO] [stdout] | [INFO] [stdout] 51 | let new = Rc::clone((*list.borrow()).prev.as_ref().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `list.borrow()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/evenup.rs:62:16 [INFO] [stdout] | [INFO] [stdout] 62 | if (cursor.borrow().v + next.borrow().v) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(cursor.borrow().v + next.borrow().v).is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | (*prev.borrow_mut()).next = Some(next_next.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `prev.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:73:25 [INFO] [stdout] | [INFO] [stdout] 73 | (*next_next.borrow_mut()).prev = Some(prev.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_next.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:77:25 [INFO] [stdout] | [INFO] [stdout] 77 | (*prev.borrow_mut()).next = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `prev.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/evenup.rs:82:25 [INFO] [stdout] | [INFO] [stdout] 82 | (*next_next.borrow_mut()).prev = None; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `next_next.borrow_mut()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/snippets/geometry.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | return self.x * self.x + self.y * self.y; [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] 68 - return self.x * self.x + self.y * self.y; [INFO] [stdout] 68 + self.x * self.x + self.y * self.y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/snippets/geometry.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | f64::max(-1.0, f64::min(1.0, cos_theta)).acos() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cos_theta.clamp(-1.0, 1.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/snippets/geometry.rs:123:30 [INFO] [stdout] | [INFO] [stdout] 123 | c: (q - p).cross(&p) [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/snippets/geometry.rs:128:22 [INFO] [stdout] | [INFO] [stdout] 128 | self.v.cross(&p) - self.c [INFO] [stdout] | ^^ help: change this to: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.26s [INFO] running `Command { std: "docker" "inspect" "a44baf768d727c5eddffc1aa0e2c167f009f6b623369b24cec02ccf22eed153c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a44baf768d727c5eddffc1aa0e2c167f009f6b623369b24cec02ccf22eed153c", kill_on_drop: false }` [INFO] [stdout] a44baf768d727c5eddffc1aa0e2c167f009f6b623369b24cec02ccf22eed153c