[INFO] cloning repository https://github.com/randomtwdude/tohorank [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/randomtwdude/tohorank" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frandomtwdude%2Ftohorank", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frandomtwdude%2Ftohorank'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e5805a691689c1474c980a72f2feb1ae6b3efb07 [INFO] linting randomtwdude/tohorank against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frandomtwdude%2Ftohorank" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/randomtwdude/tohorank [INFO] finished tweaking git repo https://github.com/randomtwdude/tohorank [INFO] tweaked toml for git repo https://github.com/randomtwdude/tohorank written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/randomtwdude/tohorank 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/randomtwdude/tohorank already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded colored v2.1.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.79 [INFO] [stderr] Downloaded strum v0.26.2 [INFO] [stderr] Downloaded drawille v0.3.0 [INFO] [stderr] Downloaded quote v1.0.35 [INFO] [stderr] Downloaded libredox v0.1.3 [INFO] [stderr] Downloaded autocfg v1.2.0 [INFO] [stderr] Downloaded iana-time-zone v0.1.60 [INFO] [stderr] Downloaded getrandom v0.2.14 [INFO] [stderr] Downloaded num-traits v0.2.18 [INFO] [stderr] Downloaded cc v1.0.94 [INFO] [stderr] Downloaded memchr v2.7.2 [INFO] [stderr] Downloaded rustyline v14.0.0 [INFO] [stderr] Downloaded termplot v0.1.1 [INFO] [stderr] Downloaded serde v1.0.197 [INFO] [stderr] Downloaded serde_derive v1.0.197 [INFO] [stderr] Downloaded thiserror v1.0.58 [INFO] [stderr] Downloaded fuzzy-matcher v0.3.7 [INFO] [stderr] Downloaded syn v2.0.58 [INFO] [stderr] Downloaded radix_trie v0.2.1 [INFO] [stderr] Downloaded error-code v3.2.0 [INFO] [stderr] Downloaded clipboard-win v5.3.0 [INFO] [stderr] Downloaded thiserror-impl v1.0.58 [INFO] [stderr] Downloaded nix v0.28.0 [INFO] [stderr] Downloaded redox_users v0.4.5 [INFO] [stderr] Downloaded dirs v5.0.1 [INFO] [stderr] Downloaded rustix v0.38.32 [INFO] [stderr] Downloaded fd-lock v4.0.2 [INFO] [stderr] Downloaded endian-type v0.1.2 [INFO] [stderr] Downloaded windows_aarch64_gnullvm v0.52.4 [INFO] [stderr] Downloaded windows_x86_64_gnullvm v0.52.4 [INFO] [stderr] Downloaded nibble_vec v0.1.0 [INFO] [stderr] Downloaded windows-targets v0.52.4 [INFO] [stderr] Downloaded strum_macros v0.26.2 [INFO] [stderr] Downloaded rustversion v1.0.15 [INFO] [stderr] Downloaded windows_aarch64_msvc v0.52.4 [INFO] [stderr] Downloaded windows_i686_gnu v0.52.4 [INFO] [stderr] Downloaded windows_x86_64_gnu v0.52.4 [INFO] [stderr] Downloaded windows_x86_64_msvc v0.52.4 [INFO] [stderr] Downloaded windows_i686_msvc v0.52.4 [INFO] [stderr] Downloaded linux-raw-sys v0.4.13 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 74f1341e42019487c6ed07bdc721d2dfcee49bbcd05b6bc47537e689494a4074 [INFO] running `Command { std: "docker" "start" "-a" "74f1341e42019487c6ed07bdc721d2dfcee49bbcd05b6bc47537e689494a4074", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "74f1341e42019487c6ed07bdc721d2dfcee49bbcd05b6bc47537e689494a4074", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "74f1341e42019487c6ed07bdc721d2dfcee49bbcd05b6bc47537e689494a4074", kill_on_drop: false }` [INFO] [stdout] 74f1341e42019487c6ed07bdc721d2dfcee49bbcd05b6bc47537e689494a4074 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 26665962661b90bde3fef2adb7d178f64c1d930ca4f202f032518389149b6426 [INFO] running `Command { std: "docker" "start" "-a" "26665962661b90bde3fef2adb7d178f64c1d930ca4f202f032518389149b6426", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Compiling proc-macro2 v1.0.79 [INFO] [stderr] Compiling unicode-ident v1.0.12 [INFO] [stderr] Compiling autocfg v1.2.0 [INFO] [stderr] Compiling cfg_aliases v0.1.1 [INFO] [stderr] Compiling rustix v0.38.32 [INFO] [stderr] Checking bitflags v2.5.0 [INFO] [stderr] Compiling serde v1.0.197 [INFO] [stderr] Compiling nix v0.28.0 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Compiling rustversion v1.0.15 [INFO] [stderr] Checking linux-raw-sys v0.4.13 [INFO] [stderr] Checking nibble_vec v0.1.0 [INFO] [stderr] Compiling num-traits v0.2.18 [INFO] [stderr] Checking colored v2.1.0 [INFO] [stderr] Checking endian-type v0.1.2 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Checking radix_trie v0.2.1 [INFO] [stderr] Checking drawille v0.3.0 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking iana-time-zone v0.1.60 [INFO] [stderr] Checking unicode-segmentation v1.11.0 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Checking unicode-width v0.1.11 [INFO] [stderr] Checking utf8parse v0.2.1 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Checking memchr v2.7.2 [INFO] [stderr] Compiling syn v2.0.58 [INFO] [stderr] Checking home v0.5.9 [INFO] [stderr] Checking fuzzy-matcher v0.3.7 [INFO] [stderr] Checking termplot v0.1.1 [INFO] [stderr] Checking strum v0.26.2 [INFO] [stderr] Checking getrandom v0.2.14 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking fd-lock v4.0.2 [INFO] [stderr] Checking rustyline v14.0.0 [INFO] [stderr] Compiling serde_derive v1.0.197 [INFO] [stderr] Compiling strum_macros v0.26.2 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking tohorank v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/glicko.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | if records.len() > 0 { // avoid cluttering the history [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/glicko.rs:174:19 [INFO] [stdout] | [INFO] [stdout] 174 | 1.0 / (1.0 + (-1.0 * g(phij) * (mu - muj)).exp()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-g(phij)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/glicko.rs:212:15 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^ help: change this to: `v` [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/glicko.rs:212:19 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^ help: change this to: `d` [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/glicko.rs:212:23 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^^^ help: change this to: `sig` [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/glicko.rs:212:29 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^^^ help: change this to: `phi` [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/glicko.rs:212:35 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^^^ help: change this to: `tau` [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: name `LLS` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | LLS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Lls` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PCB` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:23:2 [INFO] [stdout] | [INFO] [stdout] 23 | PCB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Pcb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SWR` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:29:2 [INFO] [stdout] | [INFO] [stdout] 29 | SWR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Swr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UFO` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | UFO, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Ufo` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GFW` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:34:2 [INFO] [stdout] | [INFO] [stdout] 34 | GFW, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Gfw` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DDC` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:37:2 [INFO] [stdout] | [INFO] [stdout] 37 | DDC, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ddc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ISC` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:38:2 [INFO] [stdout] | [INFO] [stdout] 38 | ISC, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Isc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SFW` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:45:2 [INFO] [stdout] | [INFO] [stdout] 45 | SFW, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Sfw` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CBM` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:47:2 [INFO] [stdout] | [INFO] [stdout] 47 | CBM, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cbm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/groups.rs:154:3 [INFO] [stdout] | [INFO] [stdout] 154 | / match self { [INFO] [stdout] 155 | | Tags::st1 => false, [INFO] [stdout] 156 | | Tags::st2 => false, [INFO] [stdout] 157 | | Tags::st3 => false, [INFO] [stdout] ... | [INFO] [stdout] 162 | | _ => true, [INFO] [stdout] 163 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 154 - match self { [INFO] [stdout] 155 - Tags::st1 => false, [INFO] [stdout] 156 - Tags::st2 => false, [INFO] [stdout] 157 - Tags::st3 => false, [INFO] [stdout] 158 - Tags::st4 => false, [INFO] [stdout] 159 - Tags::st5 => false, [INFO] [stdout] 160 - Tags::st6 => false, [INFO] [stdout] 161 - Tags::ex => false, [INFO] [stdout] 162 - _ => true, [INFO] [stdout] 163 - } [INFO] [stdout] 154 + !matches!(self, Tags::st1 | Tags::st2 | Tags::st3 | Tags::st4 | Tags::st5 | Tags::st6 | Tags::ex) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/stats.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a Vec) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 22 | -> Vec<&'a Chara> { [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] 21 ~ pub fn filter_group(tags: Vec<(Tags, bool)>, pool: &Vec) [INFO] [stdout] 22 ~ -> Vec<&Chara> { [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/stats.rs:21:56 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 - pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a Vec) [INFO] [stdout] 21 + pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a [Chara]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/stats.rs:57:25 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut Vec) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 58 | -> (Vec<&'a mut Chara>, Vec) { [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] 57 ~ pub fn filter_group_mut(tags: Vec<(Tags, bool)>, pool: &mut Vec) [INFO] [stdout] 58 ~ -> (Vec<&mut Chara>, Vec) { [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/stats.rs:57:60 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut 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] 57 - pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut Vec) [INFO] [stdout] 57 + pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut [Chara]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern takes a reference on something that is being dereferenced [INFO] [stdout] --> src/stats.rs:86:22 [INFO] [stdout] | [INFO] [stdout] 86 | .filter(|(_, &ref th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&ref` part [INFO] [stdout] | [INFO] [stdout] 86 - .filter(|(_, &ref th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] 86 + .filter(|(_, th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/stats.rs:86:46 [INFO] [stdout] | [INFO] [stdout] 86 | .filter(|(_, &ref th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^ help: change this to: `th` [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 variable `offset` is used as a loop counter [INFO] [stdout] --> src/stats.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | for id in to_remove { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `for (offset, id) in to_remove.into_iter().enumerate()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/stats.rs:99:56 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn rank_slice_by_chara<'a>(chara: &'a Chara, pool: &'a Vec<&'a Chara>) [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] 99 ~ pub fn rank_slice_by_chara<'a>(chara: &'a Chara, pool: &'a [&'a Chara]) [INFO] [stdout] 100 | -> Vec<&'a Chara> { [INFO] [stdout] 101 ~ let mut poolc = pool.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/stats.rs:130:12 [INFO] [stdout] | [INFO] [stdout] 130 | if tag.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tag.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/stats.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | if tag.len() > 0 && tag[0].0.exname() != "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tag.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/data.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 47 | / let touhou = Chara { [INFO] [stdout] 48 | | name: chara_name, [INFO] [stdout] 49 | | rank: Glicko { [INFO] [stdout] 50 | | rate: 1500.0, [INFO] [stdout] ... | [INFO] [stdout] 65 | | flags: chara_flags, [INFO] [stdout] 66 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 67 | touhou [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 47 ~ [INFO] [stdout] 48 ~ Chara { [INFO] [stdout] 49 + name: chara_name, [INFO] [stdout] 50 + rank: Glicko { [INFO] [stdout] 51 + rate: 1500.0, [INFO] [stdout] 52 + devi: 350.0, [INFO] [stdout] 53 + vola: 0.06, [INFO] [stdout] 54 + }, [INFO] [stdout] 55 + hist: Past { [INFO] [stdout] 56 + wins: 0, [INFO] [stdout] 57 + loss: 0, [INFO] [stdout] 58 + draw: 0, [INFO] [stdout] 59 + old_rate: VecDeque::with_capacity(MAX_HISTORY_SESS), [INFO] [stdout] 60 + old_rank: VecDeque::with_capacity(MAX_HISTORY_SESS), [INFO] [stdout] 61 + peak_rate: None, [INFO] [stdout] 62 + peak_rank: None, [INFO] [stdout] 63 + }, [INFO] [stdout] 64 + recent: VecDeque::with_capacity(MAX_HISTORY_SESS), [INFO] [stdout] 65 + groups: chara_groups, [INFO] [stdout] 66 + flags: chara_flags, [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/data.rs:120:44 [INFO] [stdout] | [INFO] [stdout] 120 | for (_, line) in reader.lines().skip(3).enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 120 - for (_, line) in reader.lines().skip(3).enumerate() { [INFO] [stdout] 120 + for line in reader.lines().skip(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tokens.get(0)` [INFO] [stdout] --> src/data.rs:127:28 [INFO] [stdout] | [INFO] [stdout] 127 | let name = tokens.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [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/chara.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn update_history(touhous: &mut Vec, records: &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] 32 - pub fn update_history(touhous: &mut Vec, records: &Vec) { [INFO] [stdout] 32 + pub fn update_history(touhous: &mut [Chara], records: &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/chara.rs:32:58 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn update_history(touhous: &mut Vec, records: &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] 32 - pub fn update_history(touhous: &mut Vec, records: &Vec) { [INFO] [stdout] 32 + pub fn update_history(touhous: &mut Vec, records: &[Match]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/chara.rs:59:16 [INFO] [stdout] | [INFO] [stdout] 59 | if fumo.hist.peak_rank == None [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `fumo.hist.peak_rank.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/chara.rs:64:16 [INFO] [stdout] | [INFO] [stdout] 64 | if fumo.hist.peak_rate == None [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `fumo.hist.peak_rate.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:76:18 [INFO] [stdout] | [INFO] [stdout] 76 | r if r == 2.0 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 76 - r if r == 2.0 => { [INFO] [stdout] 76 + 2.0 => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | r if r == 1.0 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 - r if r == 1.0 => { [INFO] [stdout] 80 + 1.0 => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 84 | r if r == 0.5 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 84 - r if r == 0.5 => { [INFO] [stdout] 84 + 0.5 => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:88:18 [INFO] [stdout] | [INFO] [stdout] 88 | r if r == 0.0 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 88 - r if r == 0.0 => { [INFO] [stdout] 88 + 0.0 => { [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/chara.rs:120:22 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn find(touhous: &Vec, query: String) [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] 120 - pub fn find(touhous: &Vec, query: String) [INFO] [stdout] 120 + pub fn find(touhous: &[Chara], query: String) [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/chara.rs:135:26 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn find_mut(touhous: &mut Vec, query: String) [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] 135 - pub fn find_mut(touhous: &mut Vec, query: String) [INFO] [stdout] 135 + pub fn find_mut(touhous: &mut [Chara], query: String) [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/chara.rs:151:32 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn find_mut_exact(touhous: &mut Vec, query: String) [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] 151 - pub fn find_mut_exact(touhous: &mut Vec, query: String) [INFO] [stdout] 151 + pub fn find_mut_exact(touhous: &mut [Chara], query: String) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/chara.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / for th in touhous.iter_mut() { [INFO] [stdout] 154 | | if th.name == query { [INFO] [stdout] 155 | | return Some(th); [INFO] [stdout] ... | [INFO] [stdout] 158 | | None [INFO] [stdout] | |________^ help: replace with an iterator: `touhous.iter_mut().find(|th| th.name == query).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sort.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if records.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/sort.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | let linev: Vec<&str> = line.split(" ").into_iter().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.split(" ")` [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: comparison to empty slice [INFO] [stdout] --> src/sort.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | *a == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sort.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | / !(!flags[0] && a.is_pc98() [INFO] [stdout] 199 | | || !flags[1] && a.is_not_girl() [INFO] [stdout] 200 | | || !flags[2] && a.is_nameless()) [INFO] [stdout] | |____________________________________________^ help: try: `(!a.is_nameless() || flags[2]) && (!a.is_not_girl() || flags[1]) && (!a.is_pc98() || flags[0])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern takes a reference on something that is being dereferenced [INFO] [stdout] --> src/sort.rs:204:22 [INFO] [stdout] | [INFO] [stdout] 204 | .filter(|(_, &ref th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&ref` part [INFO] [stdout] | [INFO] [stdout] 204 - .filter(|(_, &ref th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] 204 + .filter(|(_, th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sort.rs:204:45 [INFO] [stdout] | [INFO] [stdout] 204 | .filter(|(_, &ref th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^ help: change this to: `th` [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 variable `offset` is used as a loop counter [INFO] [stdout] --> src/sort.rs:208:5 [INFO] [stdout] | [INFO] [stdout] 208 | for id in to_remove { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `for (offset, id) in to_remove.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/norm.rs:50:64 [INFO] [stdout] | [INFO] [stdout] 50 | list.entry(line[1].to_string()).and_modify(|a| (*a).1 = line[0].parse().unwrap()); [INFO] [stdout] | ^^^^ help: try: `a` [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/norm.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | list.retain(|_, rank| (*rank).1 != 0); [INFO] [stdout] | ^^^^^^^ help: try: `rank` [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 checked division [INFO] [stdout] --> src/lobby.rs:119:12 [INFO] [stdout] | [INFO] [stdout] 119 | if total == 0 { [INFO] [stdout] | ^^^^^^^^^^ check performed here [INFO] [stdout] ... [INFO] [stdout] 122 | 100 * chara.hist.wins / total [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 late initialization [INFO] [stdout] --> src/lobby.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | let side; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `side` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 133 ~ [INFO] [stdout] 134 ~ let side = if touhous.get(battle.one).unwrap().name == chara.name { [INFO] [stdout] 135 ~ 1 [INFO] [stdout] 136 | } else { [INFO] [stdout] 137 ~ 2 [INFO] [stdout] 138 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/lobby.rs:141:22 [INFO] [stdout] | [INFO] [stdout] 141 | r if r == 0.5 => { "Drew".white().bold() }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - r if r == 0.5 => { "Drew".white().bold() }, [INFO] [stdout] 141 + 0.5 => { "Drew".white().bold() }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/lobby.rs:142:22 [INFO] [stdout] | [INFO] [stdout] 142 | r if r == 2.0 => { "Drew (lost)".red().bold() }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 - r if r == 2.0 => { "Drew (lost)".red().bold() }, [INFO] [stdout] 142 + 2.0 => { "Drew (lost)".red().bold() }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lobby.rs:200:33 [INFO] [stdout] | [INFO] [stdout] 200 | let rk_diff: isize = if touhou.hist.old_rank.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!touhou.hist.old_rank.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lobby.rs:205:21 [INFO] [stdout] | [INFO] [stdout] 205 | let trend = format!("{}", [INFO] [stdout] | _____________________^ [INFO] [stdout] 206 | | if rk_diff.abs() > 5 { [INFO] [stdout] 207 | | format!("{}", [INFO] [stdout] 208 | | if rk_diff.is_positive() { [INFO] [stdout] ... | [INFO] [stdout] 217 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 205 ~ let trend = (if rk_diff.abs() > 5 { [INFO] [stdout] 206 + format!("{}", [INFO] [stdout] 207 + if rk_diff.is_positive() { [INFO] [stdout] 208 ~ "🡾 ".red() [INFO] [stdout] 209 + } else { [INFO] [stdout] 210 ~ "🡽 ".blue() [INFO] [stdout] 211 + } [INFO] [stdout] 212 + ) [INFO] [stdout] 213 + } else { [INFO] [stdout] 214 + "".to_string() [INFO] [stdout] 215 ~ }).to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/main.rs:219:33 [INFO] [stdout] | [INFO] [stdout] 219 | ... &token[1..] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/main.rs:218:50 [INFO] [stdout] | [INFO] [stdout] 218 | ... let token_unsigned = if token.starts_with("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 218 ~ let token_unsigned = if let Some() = token.strip_prefix("-") { [INFO] [stdout] 219 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/main.rs:221:33 [INFO] [stdout] | [INFO] [stdout] 221 | ... &token[..] [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:244:24 [INFO] [stdout] | [INFO] [stdout] 244 | if invited.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `invited.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/glicko.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | if records.len() > 0 { // avoid cluttering the history [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/glicko.rs:174:19 [INFO] [stdout] | [INFO] [stdout] 174 | 1.0 / (1.0 + (-1.0 * g(phij) * (mu - muj)).exp()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-g(phij)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/glicko.rs:212:15 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^ help: change this to: `v` [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/glicko.rs:212:19 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^ help: change this to: `d` [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/glicko.rs:212:23 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^^^ help: change this to: `sig` [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/glicko.rs:212:29 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^^^ help: change this to: `phi` [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/glicko.rs:212:35 [INFO] [stdout] | [INFO] [stdout] 212 | f(&x, &v, &d, &sig, &phi, &tau) [INFO] [stdout] | ^^^^ help: change this to: `tau` [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: name `LLS` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | LLS, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Lls` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PCB` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:23:2 [INFO] [stdout] | [INFO] [stdout] 23 | PCB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Pcb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SWR` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:29:2 [INFO] [stdout] | [INFO] [stdout] 29 | SWR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Swr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `UFO` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | UFO, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Ufo` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GFW` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:34:2 [INFO] [stdout] | [INFO] [stdout] 34 | GFW, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Gfw` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DDC` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:37:2 [INFO] [stdout] | [INFO] [stdout] 37 | DDC, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ddc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ISC` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:38:2 [INFO] [stdout] | [INFO] [stdout] 38 | ISC, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Isc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SFW` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:45:2 [INFO] [stdout] | [INFO] [stdout] 45 | SFW, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Sfw` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CBM` contains a capitalized acronym [INFO] [stdout] --> src/groups.rs:47:2 [INFO] [stdout] | [INFO] [stdout] 47 | CBM, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cbm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/groups.rs:154:3 [INFO] [stdout] | [INFO] [stdout] 154 | / match self { [INFO] [stdout] 155 | | Tags::st1 => false, [INFO] [stdout] 156 | | Tags::st2 => false, [INFO] [stdout] 157 | | Tags::st3 => false, [INFO] [stdout] ... | [INFO] [stdout] 162 | | _ => true, [INFO] [stdout] 163 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 154 - match self { [INFO] [stdout] 155 - Tags::st1 => false, [INFO] [stdout] 156 - Tags::st2 => false, [INFO] [stdout] 157 - Tags::st3 => false, [INFO] [stdout] 158 - Tags::st4 => false, [INFO] [stdout] 159 - Tags::st5 => false, [INFO] [stdout] 160 - Tags::st6 => false, [INFO] [stdout] 161 - Tags::ex => false, [INFO] [stdout] 162 - _ => true, [INFO] [stdout] 163 - } [INFO] [stdout] 154 + !matches!(self, Tags::st1 | Tags::st2 | Tags::st3 | Tags::st4 | Tags::st5 | Tags::st6 | Tags::ex) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/stats.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a Vec) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 22 | -> Vec<&'a Chara> { [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] 21 ~ pub fn filter_group(tags: Vec<(Tags, bool)>, pool: &Vec) [INFO] [stdout] 22 ~ -> Vec<&Chara> { [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/stats.rs:21:56 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 - pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a Vec) [INFO] [stdout] 21 + pub fn filter_group<'a>(tags: Vec<(Tags, bool)>, pool: &'a [Chara]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/stats.rs:57:25 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut Vec) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 58 | -> (Vec<&'a mut Chara>, Vec) { [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] 57 ~ pub fn filter_group_mut(tags: Vec<(Tags, bool)>, pool: &mut Vec) [INFO] [stdout] 58 ~ -> (Vec<&mut Chara>, Vec) { [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/stats.rs:57:60 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut 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] 57 - pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut Vec) [INFO] [stdout] 57 + pub fn filter_group_mut<'a>(tags: Vec<(Tags, bool)>, pool: &'a mut [Chara]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern takes a reference on something that is being dereferenced [INFO] [stdout] --> src/stats.rs:86:22 [INFO] [stdout] | [INFO] [stdout] 86 | .filter(|(_, &ref th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&ref` part [INFO] [stdout] | [INFO] [stdout] 86 - .filter(|(_, &ref th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] 86 + .filter(|(_, th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/stats.rs:86:46 [INFO] [stdout] | [INFO] [stdout] 86 | .filter(|(_, &ref th)| !stage_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^ help: change this to: `th` [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 variable `offset` is used as a loop counter [INFO] [stdout] --> src/stats.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | for id in to_remove { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `for (offset, id) in to_remove.into_iter().enumerate()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/stats.rs:99:56 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn rank_slice_by_chara<'a>(chara: &'a Chara, pool: &'a Vec<&'a Chara>) [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] 99 ~ pub fn rank_slice_by_chara<'a>(chara: &'a Chara, pool: &'a [&'a Chara]) [INFO] [stdout] 100 | -> Vec<&'a Chara> { [INFO] [stdout] 101 ~ let mut poolc = pool.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/stats.rs:130:12 [INFO] [stdout] | [INFO] [stdout] 130 | if tag.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tag.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/stats.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | if tag.len() > 0 && tag[0].0.exname() != "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tag.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/data.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 47 | / let touhou = Chara { [INFO] [stdout] 48 | | name: chara_name, [INFO] [stdout] 49 | | rank: Glicko { [INFO] [stdout] 50 | | rate: 1500.0, [INFO] [stdout] ... | [INFO] [stdout] 65 | | flags: chara_flags, [INFO] [stdout] 66 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 67 | touhou [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 47 ~ [INFO] [stdout] 48 ~ Chara { [INFO] [stdout] 49 + name: chara_name, [INFO] [stdout] 50 + rank: Glicko { [INFO] [stdout] 51 + rate: 1500.0, [INFO] [stdout] 52 + devi: 350.0, [INFO] [stdout] 53 + vola: 0.06, [INFO] [stdout] 54 + }, [INFO] [stdout] 55 + hist: Past { [INFO] [stdout] 56 + wins: 0, [INFO] [stdout] 57 + loss: 0, [INFO] [stdout] 58 + draw: 0, [INFO] [stdout] 59 + old_rate: VecDeque::with_capacity(MAX_HISTORY_SESS), [INFO] [stdout] 60 + old_rank: VecDeque::with_capacity(MAX_HISTORY_SESS), [INFO] [stdout] 61 + peak_rate: None, [INFO] [stdout] 62 + peak_rank: None, [INFO] [stdout] 63 + }, [INFO] [stdout] 64 + recent: VecDeque::with_capacity(MAX_HISTORY_SESS), [INFO] [stdout] 65 + groups: chara_groups, [INFO] [stdout] 66 + flags: chara_flags, [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/data.rs:120:44 [INFO] [stdout] | [INFO] [stdout] 120 | for (_, line) in reader.lines().skip(3).enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 120 - for (_, line) in reader.lines().skip(3).enumerate() { [INFO] [stdout] 120 + for line in reader.lines().skip(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tokens.get(0)` [INFO] [stdout] --> src/data.rs:127:28 [INFO] [stdout] | [INFO] [stdout] 127 | let name = tokens.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `tokens.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [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/chara.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn update_history(touhous: &mut Vec, records: &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] 32 - pub fn update_history(touhous: &mut Vec, records: &Vec) { [INFO] [stdout] 32 + pub fn update_history(touhous: &mut [Chara], records: &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/chara.rs:32:58 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn update_history(touhous: &mut Vec, records: &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] 32 - pub fn update_history(touhous: &mut Vec, records: &Vec) { [INFO] [stdout] 32 + pub fn update_history(touhous: &mut Vec, records: &[Match]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/chara.rs:59:16 [INFO] [stdout] | [INFO] [stdout] 59 | if fumo.hist.peak_rank == None [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `fumo.hist.peak_rank.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/chara.rs:64:16 [INFO] [stdout] | [INFO] [stdout] 64 | if fumo.hist.peak_rate == None [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `fumo.hist.peak_rate.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:76:18 [INFO] [stdout] | [INFO] [stdout] 76 | r if r == 2.0 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 76 - r if r == 2.0 => { [INFO] [stdout] 76 + 2.0 => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | r if r == 1.0 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 80 - r if r == 1.0 => { [INFO] [stdout] 80 + 1.0 => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 84 | r if r == 0.5 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 84 - r if r == 0.5 => { [INFO] [stdout] 84 + 0.5 => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/chara.rs:88:18 [INFO] [stdout] | [INFO] [stdout] 88 | r if r == 0.0 => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 88 - r if r == 0.0 => { [INFO] [stdout] 88 + 0.0 => { [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/chara.rs:120:22 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn find(touhous: &Vec, query: String) [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] 120 - pub fn find(touhous: &Vec, query: String) [INFO] [stdout] 120 + pub fn find(touhous: &[Chara], query: String) [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/chara.rs:135:26 [INFO] [stdout] | [INFO] [stdout] 135 | pub fn find_mut(touhous: &mut Vec, query: String) [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] 135 - pub fn find_mut(touhous: &mut Vec, query: String) [INFO] [stdout] 135 + pub fn find_mut(touhous: &mut [Chara], query: String) [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/chara.rs:151:32 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn find_mut_exact(touhous: &mut Vec, query: String) [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] 151 - pub fn find_mut_exact(touhous: &mut Vec, query: String) [INFO] [stdout] 151 + pub fn find_mut_exact(touhous: &mut [Chara], query: String) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> src/chara.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / for th in touhous.iter_mut() { [INFO] [stdout] 154 | | if th.name == query { [INFO] [stdout] 155 | | return Some(th); [INFO] [stdout] ... | [INFO] [stdout] 158 | | None [INFO] [stdout] | |________^ help: replace with an iterator: `touhous.iter_mut().find(|th| th.name == query).map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = note: you may need to dereference some variables [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/sort.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if records.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `records.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/sort.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | let linev: Vec<&str> = line.split(" ").into_iter().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.split(" ")` [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: comparison to empty slice [INFO] [stdout] --> src/sort.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | *a == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/sort.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | / !(!flags[0] && a.is_pc98() [INFO] [stdout] 199 | | || !flags[1] && a.is_not_girl() [INFO] [stdout] 200 | | || !flags[2] && a.is_nameless()) [INFO] [stdout] | |____________________________________________^ help: try: `(!a.is_nameless() || flags[2]) && (!a.is_not_girl() || flags[1]) && (!a.is_pc98() || flags[0])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern takes a reference on something that is being dereferenced [INFO] [stdout] --> src/sort.rs:204:22 [INFO] [stdout] | [INFO] [stdout] 204 | .filter(|(_, &ref th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&ref` part [INFO] [stdout] | [INFO] [stdout] 204 - .filter(|(_, &ref th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] 204 + .filter(|(_, th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sort.rs:204:45 [INFO] [stdout] | [INFO] [stdout] 204 | .filter(|(_, &ref th)| !flag_filter(&th) /* remove if false */) [INFO] [stdout] | ^^^ help: change this to: `th` [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 variable `offset` is used as a loop counter [INFO] [stdout] --> src/sort.rs:208:5 [INFO] [stdout] | [INFO] [stdout] 208 | for id in to_remove { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `for (offset, id) in to_remove.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/norm.rs:50:64 [INFO] [stdout] | [INFO] [stdout] 50 | list.entry(line[1].to_string()).and_modify(|a| (*a).1 = line[0].parse().unwrap()); [INFO] [stdout] | ^^^^ help: try: `a` [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/norm.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | list.retain(|_, rank| (*rank).1 != 0); [INFO] [stdout] | ^^^^^^^ help: try: `rank` [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 checked division [INFO] [stdout] --> src/lobby.rs:119:12 [INFO] [stdout] | [INFO] [stdout] 119 | if total == 0 { [INFO] [stdout] | ^^^^^^^^^^ check performed here [INFO] [stdout] ... [INFO] [stdout] 122 | 100 * chara.hist.wins / total [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 late initialization [INFO] [stdout] --> src/lobby.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | let side; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `side` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 133 ~ [INFO] [stdout] 134 ~ let side = if touhous.get(battle.one).unwrap().name == chara.name { [INFO] [stdout] 135 ~ 1 [INFO] [stdout] 136 | } else { [INFO] [stdout] 137 ~ 2 [INFO] [stdout] 138 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/lobby.rs:141:22 [INFO] [stdout] | [INFO] [stdout] 141 | r if r == 0.5 => { "Drew".white().bold() }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - r if r == 0.5 => { "Drew".white().bold() }, [INFO] [stdout] 141 + 0.5 => { "Drew".white().bold() }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/lobby.rs:142:22 [INFO] [stdout] | [INFO] [stdout] 142 | r if r == 2.0 => { "Drew (lost)".red().bold() }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 - r if r == 2.0 => { "Drew (lost)".red().bold() }, [INFO] [stdout] 142 + 2.0 => { "Drew (lost)".red().bold() }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lobby.rs:200:33 [INFO] [stdout] | [INFO] [stdout] 200 | let rk_diff: isize = if touhou.hist.old_rank.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!touhou.hist.old_rank.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lobby.rs:205:21 [INFO] [stdout] | [INFO] [stdout] 205 | let trend = format!("{}", [INFO] [stdout] | _____________________^ [INFO] [stdout] 206 | | if rk_diff.abs() > 5 { [INFO] [stdout] 207 | | format!("{}", [INFO] [stdout] 208 | | if rk_diff.is_positive() { [INFO] [stdout] ... | [INFO] [stdout] 217 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 205 ~ let trend = (if rk_diff.abs() > 5 { [INFO] [stdout] 206 + format!("{}", [INFO] [stdout] 207 + if rk_diff.is_positive() { [INFO] [stdout] 208 ~ "🡾 ".red() [INFO] [stdout] 209 + } else { [INFO] [stdout] 210 ~ "🡽 ".blue() [INFO] [stdout] 211 + } [INFO] [stdout] 212 + ) [INFO] [stdout] 213 + } else { [INFO] [stdout] 214 + "".to_string() [INFO] [stdout] 215 ~ }).to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/main.rs:219:33 [INFO] [stdout] | [INFO] [stdout] 219 | ... &token[1..] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/main.rs:218:50 [INFO] [stdout] | [INFO] [stdout] 218 | ... let token_unsigned = if token.starts_with("-") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 218 ~ let token_unsigned = if let Some() = token.strip_prefix("-") { [INFO] [stdout] 219 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/main.rs:221:33 [INFO] [stdout] | [INFO] [stdout] 221 | ... &token[..] [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `token` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:244:24 [INFO] [stdout] | [INFO] [stdout] 244 | if invited.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `invited.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.75s [INFO] running `Command { std: "docker" "inspect" "26665962661b90bde3fef2adb7d178f64c1d930ca4f202f032518389149b6426", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "26665962661b90bde3fef2adb7d178f64c1d930ca4f202f032518389149b6426", kill_on_drop: false }` [INFO] [stdout] 26665962661b90bde3fef2adb7d178f64c1d930ca4f202f032518389149b6426