[INFO] cloning repository https://github.com/daverodger/chordy [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/daverodger/chordy" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdaverodger%2Fchordy", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdaverodger%2Fchordy'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] db5b41b4d0f1f1cf92f6e2b962f1f4348339cbd0 [INFO] linting daverodger/chordy against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdaverodger%2Fchordy" "/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/daverodger/chordy [INFO] finished tweaking git repo https://github.com/daverodger/chordy [INFO] tweaked toml for git repo https://github.com/daverodger/chordy written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/daverodger/chordy 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/daverodger/chordy 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 sarge v7.2.4 [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] 0594c1fa1c01452db735a900d246a6614948000eed1c1eccf1848d34eaec3b81 [INFO] running `Command { std: "docker" "start" "-a" "0594c1fa1c01452db735a900d246a6614948000eed1c1eccf1848d34eaec3b81", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0594c1fa1c01452db735a900d246a6614948000eed1c1eccf1848d34eaec3b81", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0594c1fa1c01452db735a900d246a6614948000eed1c1eccf1848d34eaec3b81", kill_on_drop: false }` [INFO] [stdout] 0594c1fa1c01452db735a900d246a6614948000eed1c1eccf1848d34eaec3b81 [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] f7361cf0ed40deb46f2ce0421a80555d2c6808953ce80dbc0b715edb9577df4e [INFO] running `Command { std: "docker" "start" "-a" "f7361cf0ed40deb46f2ce0421a80555d2c6808953ce80dbc0b715edb9577df4e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling syn v2.0.68 [INFO] [stderr] Compiling rustversion v1.0.17 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Compiling serde_json v1.0.120 [INFO] [stderr] Compiling chord_generator v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking sarge v7.2.4 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking getrandom v0.2.15 [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] Compiling serde_derive v1.0.203 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | _________________^ [INFO] [stdout] 142 | | || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 | | || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 | | || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | |_________________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 - || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (!(self.root.pitch != Pitch::Natural || self.root.raw_note.0 != 'D' && self.root.raw_note.0 != 'G' && self.root.raw_note.0 != 'F') [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 - || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && ((self.root.raw_note.0 == 'F' || self.root.raw_note.0 == 'G' || self.root.raw_note.0 == 'D') && self.root.pitch == Pitch::Natural [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 - || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural || self.root.pitch == Pitch::Natural && self.root.raw_note.0 == 'G' || self.root.pitch == Pitch::Natural && self.root.raw_note.0 == 'F' [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | _________________^ [INFO] [stdout] 142 | | || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 | | || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (!(self.root.pitch != Pitch::Natural || self.root.raw_note.0 != 'D' && self.root.raw_note.0 != 'G') [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && ((self.root.raw_note.0 == 'G' || self.root.raw_note.0 == 'D') && self.root.pitch == Pitch::Natural [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural || self.root.pitch == Pitch::Natural && self.root.raw_note.0 == 'G' [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | _________________^ [INFO] [stdout] 142 | | || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (!(self.root.pitch != Pitch::Natural || self.root.raw_note.0 != 'D' && self.root.raw_note.0 != 'G') [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && ((self.root.raw_note.0 == 'G' || self.root.raw_note.0 == 'D') && self.root.pitch == Pitch::Natural [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/types.rs:136:82 [INFO] [stdout] | [INFO] [stdout] 136 | || (self.root.raw_note.0 == 'C' && self.root.pitch == Pitch::Sharp)) { [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 137 | | for c in &mut self.chords { [INFO] [stdout] 138 | | c.chord.note = c.chord.note.sharp_to_flat(); [INFO] [stdout] 139 | | } [INFO] [stdout] 140 | | } else if self.key == Tonality::Minor [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/types.rs:145:82 [INFO] [stdout] | [INFO] [stdout] 145 | || (self.root.raw_note.0 == 'A' && self.root.pitch == Pitch::Sharp)) { [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 146 | | for c in &mut self.chords { [INFO] [stdout] 147 | | c.chord.note = c.chord.note.sharp_to_flat(); [INFO] [stdout] 148 | | } [INFO] [stdout] 149 | | } [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: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/types.rs:175:12 [INFO] [stdout] | [INFO] [stdout] 175 | if note < 'A' || note > 'G' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!('A'..='G').contains(¬e)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/types.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let new_position: usize; [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 `new_position` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 251 ~ [INFO] [stdout] 252 ~ let new_position: usize = match position { [INFO] [stdout] 253 ~ 0 => RAW_NOTE_MAP.len() - 1, [INFO] [stdout] 254 ~ _ => position - 1, [INFO] [stdout] 255 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `RawNote` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:261:23 [INFO] [stdout] | [INFO] [stdout] 261 | let (n, p) = (self.raw_note.clone(), self.pitch.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.raw_note` [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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types.rs:283:5 [INFO] [stdout] | [INFO] [stdout] 283 | / pub fn from_str(s: &str) -> Option { [INFO] [stdout] 284 | | match s.len() { [INFO] [stdout] 285 | | 1 => Some(Note { [INFO] [stdout] 286 | | raw_note: RawNote::from(s.chars().next().unwrap().to_ascii_uppercase()), [INFO] [stdout] ... | [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types.rs:433:9 [INFO] [stdout] | [INFO] [stdout] 429 | / let chord = Chord { [INFO] [stdout] 430 | | note: random(), [INFO] [stdout] 431 | | chord_type: random(), [INFO] [stdout] 432 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 433 | chord [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] 429 ~ [INFO] [stdout] 430 ~ Chord { [INFO] [stdout] 431 + note: random(), [INFO] [stdout] 432 + chord_type: random(), [INFO] [stdout] 433 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/progression_parser.rs:34:49 [INFO] [stdout] | [INFO] [stdout] 34 | let file = fs::read(data_file_path.clone()).expect(&format!("Failed to read data file: {:?}", data_file_path)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to read data file: {:?}", data_file_path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | _________________^ [INFO] [stdout] 142 | | || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 | | || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 | | || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | |_________________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 - || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (!(self.root.pitch != Pitch::Natural || self.root.raw_note.0 != 'D' && self.root.raw_note.0 != 'G' && self.root.raw_note.0 != 'F') [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 - || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && ((self.root.raw_note.0 == 'F' || self.root.raw_note.0 == 'G' || self.root.raw_note.0 == 'D') && self.root.pitch == Pitch::Natural [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 144 - || (self.root.raw_note.0 == 'F' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural || self.root.pitch == Pitch::Natural && self.root.raw_note.0 == 'G' || self.root.pitch == Pitch::Natural && self.root.raw_note.0 == 'F' [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | _________________^ [INFO] [stdout] 142 | | || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 | | || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (!(self.root.pitch != Pitch::Natural || self.root.raw_note.0 != 'D' && self.root.raw_note.0 != 'G') [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && ((self.root.raw_note.0 == 'G' || self.root.raw_note.0 == 'D') && self.root.pitch == Pitch::Natural [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 143 - || (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural || self.root.pitch == Pitch::Natural && self.root.raw_note.0 == 'G' [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | _________________^ [INFO] [stdout] 142 | | || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] | |_________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && (!(self.root.pitch != Pitch::Natural || self.root.raw_note.0 != 'D' && self.root.raw_note.0 != 'G') [INFO] [stdout] | [INFO] [stdout] 141 - && ((self.root.raw_note.0 == 'D' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 142 - || (self.root.raw_note.0 == 'G' && self.root.pitch == Pitch::Natural) [INFO] [stdout] 141 + && ((self.root.raw_note.0 == 'G' || self.root.raw_note.0 == 'D') && self.root.pitch == Pitch::Natural [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/types.rs:136:82 [INFO] [stdout] | [INFO] [stdout] 136 | || (self.root.raw_note.0 == 'C' && self.root.pitch == Pitch::Sharp)) { [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 137 | | for c in &mut self.chords { [INFO] [stdout] 138 | | c.chord.note = c.chord.note.sharp_to_flat(); [INFO] [stdout] 139 | | } [INFO] [stdout] 140 | | } else if self.key == Tonality::Minor [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/types.rs:145:82 [INFO] [stdout] | [INFO] [stdout] 145 | || (self.root.raw_note.0 == 'A' && self.root.pitch == Pitch::Sharp)) { [INFO] [stdout] | __________________________________________________________________________________^ [INFO] [stdout] 146 | | for c in &mut self.chords { [INFO] [stdout] 147 | | c.chord.note = c.chord.note.sharp_to_flat(); [INFO] [stdout] 148 | | } [INFO] [stdout] 149 | | } [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 call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/progression_parser.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | let beat = u8::from_str_radix(beat, 10).unwrap_or(4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `beat.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/charts.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | chart.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `chart.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/helpers.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / match c { [INFO] [stdout] 15 | | 'I' | 'V' => true, [INFO] [stdout] 16 | | _ => false [INFO] [stdout] 17 | | } [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] 14 - match c { [INFO] [stdout] 15 - 'I' | 'V' => true, [INFO] [stdout] 16 - _ => false [INFO] [stdout] 17 - } [INFO] [stdout] 14 + matches!(c, 'I' | 'V') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/types.rs:175:12 [INFO] [stdout] | [INFO] [stdout] 175 | if note < 'A' || note > 'G' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!('A'..='G').contains(¬e)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` 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/helpers.rs:29:41 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn random_progression(progressions: &Vec) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 29 - pub fn random_progression(progressions: &Vec) -> Option { [INFO] [stdout] 29 + pub fn random_progression(progressions: &[GenericProgression]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/types.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let new_position: usize; [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 `new_position` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 251 ~ [INFO] [stdout] 252 ~ let new_position: usize = match position { [INFO] [stdout] 253 ~ 0 => RAW_NOTE_MAP.len() - 1, [INFO] [stdout] 254 ~ _ => position - 1, [INFO] [stdout] 255 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `RawNote` which implements the `Copy` trait [INFO] [stdout] --> src/types.rs:261:23 [INFO] [stdout] | [INFO] [stdout] 261 | let (n, p) = (self.raw_note.clone(), self.pitch.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.raw_note` [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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types.rs:283:5 [INFO] [stdout] | [INFO] [stdout] 283 | / pub fn from_str(s: &str) -> Option { [INFO] [stdout] 284 | | match s.len() { [INFO] [stdout] 285 | | 1 => Some(Note { [INFO] [stdout] 286 | | raw_note: RawNote::from(s.chars().next().unwrap().to_ascii_uppercase()), [INFO] [stdout] ... | [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types.rs:433:9 [INFO] [stdout] | [INFO] [stdout] 429 | / let chord = Chord { [INFO] [stdout] 430 | | note: random(), [INFO] [stdout] 431 | | chord_type: random(), [INFO] [stdout] 432 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 433 | chord [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] 429 ~ [INFO] [stdout] 430 ~ Chord { [INFO] [stdout] 431 + note: random(), [INFO] [stdout] 432 + chord_type: random(), [INFO] [stdout] 433 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/progression_parser.rs:34:49 [INFO] [stdout] | [INFO] [stdout] 34 | let file = fs::read(data_file_path.clone()).expect(&format!("Failed to read data file: {:?}", data_file_path)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to read data file: {:?}", data_file_path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/progression_parser.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | let beat = u8::from_str_radix(beat, 10).unwrap_or(4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `beat.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/charts.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | chart.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `chart.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/helpers.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / match c { [INFO] [stdout] 15 | | 'I' | 'V' => true, [INFO] [stdout] 16 | | _ => false [INFO] [stdout] 17 | | } [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] 14 - match c { [INFO] [stdout] 15 - 'I' | 'V' => true, [INFO] [stdout] 16 - _ => false [INFO] [stdout] 17 - } [INFO] [stdout] 14 + matches!(c, 'I' | 'V') [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/helpers.rs:29:41 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn random_progression(progressions: &Vec) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 29 - pub fn random_progression(progressions: &Vec) -> Option { [INFO] [stdout] 29 + pub fn random_progression(progressions: &[GenericProgression]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | let note: Note; [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 `note` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 62 ~ [INFO] [stdout] 63 ~ let note: Note = match key { [INFO] [stdout] 64 ~ None => random(), [INFO] [stdout] 65 ~ Some(k) => Note::from_str(&k).unwrap(), [INFO] [stdout] 66 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | let note: Note; [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 `note` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 62 ~ [INFO] [stdout] 63 ~ let note: Note = match key { [INFO] [stdout] 64 ~ None => random(), [INFO] [stdout] 65 ~ Some(k) => Note::from_str(&k).unwrap(), [INFO] [stdout] 66 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.84s [INFO] running `Command { std: "docker" "inspect" "f7361cf0ed40deb46f2ce0421a80555d2c6808953ce80dbc0b715edb9577df4e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f7361cf0ed40deb46f2ce0421a80555d2c6808953ce80dbc0b715edb9577df4e", kill_on_drop: false }` [INFO] [stdout] f7361cf0ed40deb46f2ce0421a80555d2c6808953ce80dbc0b715edb9577df4e