[INFO] cloning repository https://github.com/gregwebs/tiny-desk-splitter [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/gregwebs/tiny-desk-splitter" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgregwebs%2Ftiny-desk-splitter", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgregwebs%2Ftiny-desk-splitter'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8babdfcdb1e723c59be59c6902870da6739cabf2 [INFO] linting gregwebs/tiny-desk-splitter against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgregwebs%2Ftiny-desk-splitter" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/gregwebs/tiny-desk-splitter [INFO] finished tweaking git repo https://github.com/gregwebs/tiny-desk-splitter [INFO] tweaked toml for git repo https://github.com/gregwebs/tiny-desk-splitter written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/gregwebs/tiny-desk-splitter 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/gregwebs/tiny-desk-splitter 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 stringmetrics v2.2.2 [INFO] [stderr] Downloaded pathfinder_simd v0.5.4 [INFO] [stderr] Downloaded scraper v0.17.1 [INFO] [stderr] Downloaded ego-tree v0.6.3 [INFO] [stderr] Downloaded ffmpeg-sys-next v7.1.2 [INFO] [stderr] Downloaded dwrote v0.11.3 [INFO] [stderr] Downloaded servo_arc v0.3.0 [INFO] [stderr] Downloaded selectors v0.25.0 [INFO] [stderr] Downloaded cssparser v0.31.2 [INFO] [stderr] Downloaded ffmpeg-next v7.1.0 [INFO] [stderr] Downloaded font-kit v0.14.2 [INFO] [stderr] Downloaded unidecode v0.3.0 [INFO] [stderr] Downloaded rustfft v6.3.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2e39e75251ddddd3d9d6183499ee92f877e5caf2ca6e53063e29ec2a47076b18 [INFO] running `Command { std: "docker" "start" "-a" "2e39e75251ddddd3d9d6183499ee92f877e5caf2ca6e53063e29ec2a47076b18", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2e39e75251ddddd3d9d6183499ee92f877e5caf2ca6e53063e29ec2a47076b18", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2e39e75251ddddd3d9d6183499ee92f877e5caf2ca6e53063e29ec2a47076b18", kill_on_drop: false }` [INFO] [stdout] 2e39e75251ddddd3d9d6183499ee92f877e5caf2ca6e53063e29ec2a47076b18 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ef5f5c7bf807e082b4e2f5ccf6e4e20c74cb58c9f1a553dea7c607d8c907e3a7 [INFO] running `Command { std: "docker" "start" "-a" "ef5f5c7bf807e082b4e2f5ccf6e4e20c74cb58c9f1a553dea7c607d8c907e3a7", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.100 [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling cc v1.2.19 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking bitflags v2.9.0 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Checking litemap v0.7.5 [INFO] [stderr] Compiling icu_locid_transform_data v1.5.1 [INFO] [stderr] Checking writeable v0.5.5 [INFO] [stderr] Compiling phf_shared v0.10.0 [INFO] [stderr] Compiling icu_properties_data v1.5.1 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Compiling icu_normalizer_data v1.5.1 [INFO] [stderr] Checking new_debug_unreachable v1.0.6 [INFO] [stderr] Checking tokio v1.44.2 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling httparse v1.10.1 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Checking write16 v1.0.0 [INFO] [stderr] Checking precomputed-hash v0.1.1 [INFO] [stderr] Checking mac v0.1.1 [INFO] [stderr] Checking utf16_iter v1.0.5 [INFO] [stderr] Checking futf v0.1.5 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking phf v0.10.1 [INFO] [stderr] Compiling glob v0.3.2 [INFO] [stderr] Compiling openssl-sys v0.9.107 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking dtoa v1.0.10 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Checking tendril v0.4.3 [INFO] [stderr] Compiling openssl v0.10.72 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking chrono v0.4.40 [INFO] [stderr] Checking dtoa-short v0.3.5 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Checking clap_builder v4.5.37 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Compiling phf_generator v0.10.0 [INFO] [stderr] Compiling string_cache_codegen v0.5.4 [INFO] [stderr] Compiling phf_codegen v0.10.0 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Compiling selectors v0.25.0 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Compiling semver v1.0.26 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking tokio-util v0.7.14 [INFO] [stderr] Checking servo_arc v0.3.0 [INFO] [stderr] Compiling markup5ever v0.11.0 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking getopts v0.2.21 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling libloading v0.8.6 [INFO] [stderr] Checking ipnet v2.11.0 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Checking ego-tree v0.6.3 [INFO] [stderr] Compiling bindgen v0.70.1 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Compiling itertools v0.13.0 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Compiling html5ever v0.26.0 [INFO] [stderr] Compiling clap_derive v4.5.32 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking cssparser v0.31.2 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Compiling derive_more v0.99.19 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking clap v4.5.37 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Compiling pathfinder_simd v0.5.4 [INFO] [stderr] Compiling freetype-sys v0.20.1 [INFO] [stderr] Compiling num_cpus v1.16.0 [INFO] [stderr] Compiling yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking color_quant v1.1.0 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking zune-inflate v0.2.54 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking half v2.6.0 [INFO] [stderr] Checking lebe v0.5.2 [INFO] [stderr] Checking bytemuck v1.22.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking exr v1.73.0 [INFO] [stderr] Checking gif v0.13.1 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling matrixmultiply v0.3.9 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Compiling rustix v1.0.5 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Compiling font-kit v0.14.2 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking gif v0.12.0 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Compiling rustfft v6.3.0 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking float-ord v0.3.2 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking strength_reduce v0.2.4 [INFO] [stderr] Compiling ffmpeg-next v7.1.0 [INFO] [stderr] Checking transpose v0.2.3 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Checking primal-check v0.3.4 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking termcolor v1.4.1 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking scraper v0.17.1 [INFO] [stderr] Checking humantime v2.2.0 [INFO] [stderr] Checking tempfile v3.19.1 [INFO] [stderr] Checking tiny-desk-scraper v0.1.0 (/opt/rustwide/workdir/scraper) [INFO] [stderr] Checking ndarray v0.15.6 [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | return s.split(char).next().unwrap_or("").trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 37 - return s.split(char).next().unwrap_or("").trim().to_string(); [INFO] [stdout] 37 + s.split(char).next().unwrap_or("").trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> scraper/src/scraper.rs:197:50 [INFO] [stdout] | [INFO] [stdout] 197 | ... if let Some(start) = song_text.chars().nth(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `song_text.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> scraper/src/scraper.rs:199:81 [INFO] [stdout] | [INFO] [stdout] 199 | ... song_text = song_text[1..].trim_end_matches(|c| c == '"' || c == '\'').to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:222:9 [INFO] [stdout] | [INFO] [stdout] 222 | return mtext == "MUSICIANS" || mtext == "MUSICIAN"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 222 - return mtext == "MUSICIANS" || mtext == "MUSICIAN"; [INFO] [stdout] 222 + mtext == "MUSICIANS" || mtext == "MUSICIAN" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> scraper/src/scraper.rs:244:43 [INFO] [stdout] | [INFO] [stdout] 244 | .trim_end_matches(|c| c == '"' || c == '\'') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> scraper/src/scraper.rs:243:45 [INFO] [stdout] | [INFO] [stdout] 243 | .trim_start_matches(|c| c == '"' || c == '\'') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:374:9 [INFO] [stdout] | [INFO] [stdout] 374 | return stripped; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 374 - return stripped; [INFO] [stdout] 374 + stripped [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:376:9 [INFO] [stdout] | [INFO] [stdout] 376 | return s; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 376 - return s; [INFO] [stdout] 376 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking unidecode v0.3.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking stringmetrics v2.2.2 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | return s.split(char).next().unwrap_or("").trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 37 - return s.split(char).next().unwrap_or("").trim().to_string(); [INFO] [stdout] 37 + s.split(char).next().unwrap_or("").trim().to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> scraper/src/scraper.rs:197:50 [INFO] [stdout] | [INFO] [stdout] 197 | ... if let Some(start) = song_text.chars().nth(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `song_text.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> scraper/src/scraper.rs:199:81 [INFO] [stdout] | [INFO] [stdout] 199 | ... song_text = song_text[1..].trim_end_matches(|c| c == '"' || c == '\'').to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:222:9 [INFO] [stdout] | [INFO] [stdout] 222 | return mtext == "MUSICIANS" || mtext == "MUSICIAN"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 222 - return mtext == "MUSICIANS" || mtext == "MUSICIAN"; [INFO] [stdout] 222 + mtext == "MUSICIANS" || mtext == "MUSICIAN" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> scraper/src/scraper.rs:244:43 [INFO] [stdout] | [INFO] [stdout] 244 | .trim_end_matches(|c| c == '"' || c == '\'') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> scraper/src/scraper.rs:243:45 [INFO] [stdout] | [INFO] [stdout] 243 | .trim_start_matches(|c| c == '"' || c == '\'') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['"', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:374:9 [INFO] [stdout] | [INFO] [stdout] 374 | return stripped; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 374 - return stripped; [INFO] [stdout] 374 + stripped [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> scraper/src/scraper.rs:376:9 [INFO] [stdout] | [INFO] [stdout] 376 | return s; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 376 - return s; [INFO] [stdout] 376 + s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> scraper/src/tests/scraper_tests.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | if path.extension().map_or(false, |ext| ext == "html") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 78 - if path.extension().map_or(false, |ext| ext == "html") { [INFO] [stdout] 78 + if path.extension().is_some_and(|ext| ext == "html") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> scraper/src/tests/scraper_tests.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | if failures.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!failures.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 boolean expression can be simplified [INFO] [stdout] --> scraper/src/tests/scraper_tests.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | assert!(!result.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `result.is_ok()` [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] [stderr] Compiling ffmpeg-sys-next v7.1.2 [INFO] [stderr] Checking plotters-bitmap v0.3.7 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking live-set-splitter v0.1.0 (/opt/rustwide/workdir/live-set-song-splitter) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | Ffmpeg { cmd: cmd } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `cmd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | Ffmpeg { cmd: cmd } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `cmd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OutputMetadata` is never constructed [INFO] [stdout] --> live-set-song-splitter/src/main.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | struct OutputMetadata { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / return match parse_tesseract_output(&text, &artist_cmp) { [INFO] [stdout] 18 | | Some(result) => Ok(Some(result)), [INFO] [stdout] 19 | | None => Ok(None), [INFO] [stdout] 20 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ match parse_tesseract_output(&text, &artist_cmp) { [INFO] [stdout] 18 + Some(result) => Ok(Some(result)), [INFO] [stdout] 19 + None => Ok(None), [INFO] [stdout] 20 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:17:48 [INFO] [stdout] | [INFO] [stdout] 17 | return match parse_tesseract_output(&text, &artist_cmp) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `artist_cmp` [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: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | cmd.args(&["--psm", psm_value]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--psm", psm_value]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:65:24 [INFO] [stdout] | [INFO] [stdout] 65 | .filter(|line| line.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.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: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | / match &self { [INFO] [stdout] 86 | | &ArtistMatchReason::No(no) => { [INFO] [stdout] 87 | | write!(f, "{}", no) [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 85 ~ match self { [INFO] [stdout] 86 ~ ArtistMatchReason::No(no) => { [INFO] [stdout] 87 | write!(f, "{}", no) [INFO] [stdout] 88 | } [INFO] [stdout] 89 ~ ArtistMatchReason::Yes(yes) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / match &self { [INFO] [stdout] 116 | | &NoArtistMatchReason::EmptyArtist => { [INFO] [stdout] 117 | | write!(f, "empty artist") [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 115 ~ match self { [INFO] [stdout] 116 ~ NoArtistMatchReason::EmptyArtist => { [INFO] [stdout] 117 | write!(f, "empty artist") [INFO] [stdout] 118 | } [INFO] [stdout] 119 ~ NoArtistMatchReason::EmptyLine => { [INFO] [stdout] 120 | write!(f, "empty line") [INFO] [stdout] 121 | } [INFO] [stdout] 122 ~ NoArtistMatchReason::Fallthrough => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match &self { [INFO] [stdout] 138 | | &YesArtistMatchReason::StartsWith => { [INFO] [stdout] 139 | | write!(f, "starts with") [INFO] [stdout] ... | [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 137 ~ match self { [INFO] [stdout] 138 ~ YesArtistMatchReason::StartsWith => { [INFO] [stdout] 139 | write!(f, "starts with") [INFO] [stdout] 140 | } [INFO] [stdout] 141 ~ YesArtistMatchReason::OffByOne => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:203:5 [INFO] [stdout] | [INFO] [stdout] 203 | return ArtistMatchReason::No(NoArtistMatchReason::Fallthrough); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 203 - return ArtistMatchReason::No(NoArtistMatchReason::Fallthrough); [INFO] [stdout] 203 + ArtistMatchReason::No(NoArtistMatchReason::Fallthrough) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:189:63 [INFO] [stdout] | [INFO] [stdout] 189 | if levenshtein_weight(&artist, &line, levenshtein_limit + 10 as u32, &weights) [INFO] [stdout] | ^^^^^^^^^ help: try: `10_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:197:67 [INFO] [stdout] | [INFO] [stdout] 197 | if levenshtein_weight(&artist, &line, levenshtein_limit + 10 as u32, &weights) [INFO] [stdout] | ^^^^^^^^^ help: try: `10_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:380:9 [INFO] [stdout] | [INFO] [stdout] 380 | &weights, [INFO] [stdout] | ^^^^^^^^ help: change this to: `weights` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:446:5 [INFO] [stdout] | [INFO] [stdout] 446 | return None [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 446 - return None [INFO] [stdout] 446 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:423:24 [INFO] [stdout] | [INFO] [stdout] 423 | let numbered = &song_title[movement.len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:422:5 [INFO] [stdout] | [INFO] [stdout] 422 | if song_title.starts_with(movement) { [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] 422 ~ if let Some(numbered) = song_title.strip_prefix(movement) { [INFO] [stdout] 423 ~ // println!("starts with Movement, now: {}", &numbered); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:427:52 [INFO] [stdout] | [INFO] [stdout] 427 | if numbered.to_lowercase().starts_with(&spelled) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `spelled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:431:42 [INFO] [stdout] | [INFO] [stdout] 431 | let mut un_coloned = &un_numbered[2..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | if un_numbered.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] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 430 ~ if let Some() = un_numbered.strip_prefix(": ") { [INFO] [stdout] 431 ~ let mut un_coloned = ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:433:24 [INFO] [stdout] | [INFO] [stdout] 433 | if un_coloned.chars().nth(0) == Some('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `un_coloned.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:437:24 [INFO] [stdout] | [INFO] [stdout] 437 | if un_coloned.len() > 0 && un_coloned.chars().nth(un_coloned.chars().count() -1) == Some('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!un_coloned.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/audio.rs:21:15 [INFO] [stdout] | [INFO] [stdout] 21 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 22 | | "-i", [INFO] [stdout] 23 | | input_file, [INFO] [stdout] 24 | | "-vn", // No video [INFO] [stdout] ... | [INFO] [stdout] 32 | | temp_wav, [INFO] [stdout] 33 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 ~ .args([ [INFO] [stdout] 22 + "-i", [INFO] [stdout] 23 + input_file, [INFO] [stdout] 24 + "-vn", // No video [INFO] [stdout] 25 + "-acodec", [INFO] [stdout] 26 + "pcm_s16le", // PCM signed 16-bit little-endian [INFO] [stdout] 27 + "-ar", [INFO] [stdout] 28 + &SAMPLE_RATE.to_string(), // Sample rate [INFO] [stdout] 29 + "-ac", [INFO] [stdout] 30 + "1", // Mono channel [INFO] [stdout] 31 + "-y", // Overwrite output file [INFO] [stdout] 32 + temp_wav, [INFO] [stdout] 33 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> live-set-song-splitter/src/audio.rs:87:21 [INFO] [stdout] | [INFO] [stdout] 87 | let start = if i < window_size { 0 } else { i - window_size }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.saturating_sub(window_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | return self; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 33 - return self; [INFO] [stdout] 33 + self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn from_to(&mut self, start_time: f64, end_time: f64) -> &mut Ffmpeg { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | cmd.args(&["-hide_banner", "-loglevel", "warning"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-hide_banner", "-loglevel", "warning"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | cmd.args(&["-hide_banner", "-loglevel", "warning"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-hide_banner", "-loglevel", "warning"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:81:15 [INFO] [stdout] | [INFO] [stdout] 81 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 82 | | "-splitx", [INFO] [stdout] 83 | | &format!("{:.3}:{:.3}", start_time, end_time), [INFO] [stdout] 84 | | "-out", [INFO] [stdout] 85 | | output_file, [INFO] [stdout] 86 | | input_file, [INFO] [stdout] 87 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 81 ~ .args([ [INFO] [stdout] 82 + "-splitx", [INFO] [stdout] 83 + &format!("{:.3}:{:.3}", start_time, end_time), [INFO] [stdout] 84 + "-out", [INFO] [stdout] 85 + output_file, [INFO] [stdout] 86 + input_file, [INFO] [stdout] 87 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:109:15 [INFO] [stdout] | [INFO] [stdout] 109 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 110 | | "-i", input_file, "-vn", // No video [INFO] [stdout] 111 | | "-acodec", "copy", // Copy audio stream without re-encoding [INFO] [stdout] 112 | | "-map", "0:a", [INFO] [stdout] 113 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 109 ~ .args([ [INFO] [stdout] 110 + "-i", input_file, "-vn", // No video [INFO] [stdout] 111 + "-acodec", "copy", // Copy audio stream without re-encoding [INFO] [stdout] 112 + "-map", "0:a", [INFO] [stdout] 113 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:120:14 [INFO] [stdout] | [INFO] [stdout] 120 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 121 | | "-y", // Overwrite output file [INFO] [stdout] 122 | | output_file, [INFO] [stdout] 123 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 120 ~ cmd.args([ [INFO] [stdout] 121 + "-y", // Overwrite output file [INFO] [stdout] 122 + output_file, [INFO] [stdout] 123 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:145:14 [INFO] [stdout] | [INFO] [stdout] 145 | cmd.args(&["-metadata", &format!("artist={}", concertdata.artist)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("artist={}", concertdata.artist)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:149:18 [INFO] [stdout] | [INFO] [stdout] 149 | cmd.args(&["-metadata", &format!("title={}", title)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("title={}", title)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:154:18 [INFO] [stdout] | [INFO] [stdout] 154 | cmd.args(&["-metadata", &format!("album={}", album)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("album={}", album)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:160:22 [INFO] [stdout] | [INFO] [stdout] 160 | cmd.args(&["-metadata", &format!("date={}", year_value)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("date={}", year_value)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:166:18 [INFO] [stdout] | [INFO] [stdout] 166 | cmd.args(&["-metadata", &format!("track={}", track)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("track={}", track)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/io.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | return Ok(()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 16 - return Ok(()); [INFO] [stdout] 16 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/video.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | return dark_pixels as f64 / pixel_count as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 36 - return dark_pixels as f64 / pixel_count as f64; [INFO] [stdout] 36 + dark_pixels as f64 / pixel_count as f64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/video.rs:121:19 [INFO] [stdout] | [INFO] [stdout] 121 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 122 | | "-v", [INFO] [stdout] 123 | | "error", [INFO] [stdout] 124 | | "-select_streams", [INFO] [stdout] ... | [INFO] [stdout] 130 | | &input_file, [INFO] [stdout] 131 | | ]) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 121 ~ .args([ [INFO] [stdout] 122 + "-v", [INFO] [stdout] 123 + "error", [INFO] [stdout] 124 + "-select_streams", [INFO] [stdout] 125 + "v:0", [INFO] [stdout] 126 + "-show_entries", [INFO] [stdout] 127 + "stream=r_frame_rate:format=duration,start_time", [INFO] [stdout] 128 + "-of", [INFO] [stdout] 129 + "json", [INFO] [stdout] 130 + &input_file, [INFO] [stdout] 131 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/video.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | &input_file, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `input_file` [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 borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/video.rs:187:19 [INFO] [stdout] | [INFO] [stdout] 187 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 188 | | "-v", [INFO] [stdout] 189 | | "error", [INFO] [stdout] 190 | | "-select_streams", [INFO] [stdout] ... | [INFO] [stdout] 196 | | input_file, [INFO] [stdout] 197 | | ]) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 187 ~ .args([ [INFO] [stdout] 188 + "-v", [INFO] [stdout] 189 + "error", [INFO] [stdout] 190 + "-select_streams", [INFO] [stdout] 191 + "v:0", [INFO] [stdout] 192 + "-show_entries", [INFO] [stdout] 193 + "packet=pts_time,flags", [INFO] [stdout] 194 + "-of", [INFO] [stdout] 195 + "csv=print_section=0", [INFO] [stdout] 196 + input_file, [INFO] [stdout] 197 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> live-set-song-splitter/src/main.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | / impl Default for OutputFormat { [INFO] [stdout] 33 | | fn default() -> Self { [INFO] [stdout] 34 | | OutputFormat::Both [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 23 + #[derive(Default)] [INFO] [stdout] 24 | enum OutputFormat { [INFO] [stdout] 25 | /// Output video files (mp4) [INFO] [stdout] ... [INFO] [stdout] 29 | /// Output both video and audio files [INFO] [stdout] 30 ~ #[default] [INFO] [stdout] 31 ~ Both, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> live-set-song-splitter/src/main.rs:163:16 [INFO] [stdout] | [INFO] [stdout] 163 | if input_dir == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `input_dir.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: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/main.rs:205:12 [INFO] [stdout] | [INFO] [stdout] 205 | if timestamps_data.songs.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `timestamps_data.songs.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] --> live-set-song-splitter/src/main.rs:245:8 [INFO] [stdout] | [INFO] [stdout] 245 | if segments.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `segments.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:437:19 [INFO] [stdout] | [INFO] [stdout] 437 | .args(&["-i", input_file]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `["-i", input_file]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:439:19 [INFO] [stdout] | [INFO] [stdout] 439 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 440 | | "-frame_pts", [INFO] [stdout] 441 | | "1", [INFO] [stdout] 442 | | "-fps_mode", [INFO] [stdout] 443 | | "passthrough", // Use original timestamps [INFO] [stdout] 444 | | ]) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 439 ~ .args([ [INFO] [stdout] 440 + "-frame_pts", [INFO] [stdout] 441 + "1", [INFO] [stdout] 442 + "-fps_mode", [INFO] [stdout] 443 + "passthrough", // Use original timestamps [INFO] [stdout] 444 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> live-set-song-splitter/src/main.rs:466:25 [INFO] [stdout] | [INFO] [stdout] 466 | .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 466 - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] 466 + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "png")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> live-set-song-splitter/src/main.rs:529:21 [INFO] [stdout] | [INFO] [stdout] 529 | let threshold = adaptive_threshold [INFO] [stdout] | _____________________^ [INFO] [stdout] 530 | | .min(audio::ENERGY_THRESHOLD) [INFO] [stdout] 531 | | .max(audio::ENERGY_THRESHOLD * 0.1); [INFO] [stdout] | |___________________________________________^ help: replace with clamp: `adaptive_threshold.clamp(audio::ENERGY_THRESHOLD * 0.1, audio::ENERGY_THRESHOLD)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:752:5 [INFO] [stdout] | [INFO] [stdout] 752 | / return frame_name [INFO] [stdout] 753 | | .strip_suffix(".png") [INFO] [stdout] 754 | | .and_then(|s| s.parse::().ok()) [INFO] [stdout] 755 | | .unwrap_or(0); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 752 ~ frame_name [INFO] [stdout] 753 + .strip_suffix(".png") [INFO] [stdout] 754 + .and_then(|s| s.parse::().ok()) [INFO] [stdout] 755 ~ .unwrap_or(0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> live-set-song-splitter/src/main.rs:750:49 [INFO] [stdout] | [INFO] [stdout] 750 | fn frame_number_from_image_filename(frame_path: &std::path::PathBuf) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 750 - fn frame_number_from_image_filename(frame_path: &std::path::PathBuf) -> usize { [INFO] [stdout] 750 + fn frame_number_from_image_filename(frame_path: &Path) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:822:5 [INFO] [stdout] | [INFO] [stdout] 822 | return Ok(frames); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 822 - return Ok(frames); [INFO] [stdout] 822 + Ok(frames) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:778:27 [INFO] [stdout] | [INFO] [stdout] 778 | io::overwrite_dir(&temp_dir)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `temp_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:792:21 [INFO] [stdout] | [INFO] [stdout] 792 | ffmpeg.args(&[ [INFO] [stdout] | _____________________^ [INFO] [stdout] 793 | | "-i", [INFO] [stdout] 794 | | input_file, [INFO] [stdout] 795 | | "-c:v", [INFO] [stdout] ... | [INFO] [stdout] 803 | | &format!("{}/%d.png", temp_dir), // Use sequential numbering [INFO] [stdout] 804 | | ]); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 792 ~ ffmpeg.args([ [INFO] [stdout] 793 + "-i", [INFO] [stdout] 794 + input_file, [INFO] [stdout] 795 + "-c:v", [INFO] [stdout] 796 + "png", [INFO] [stdout] 797 + "-frame_pts", [INFO] [stdout] 798 + "1", [INFO] [stdout] 799 + "-fps_mode", [INFO] [stdout] 800 + "passthrough", // Use original timestamps (replaces -vsync 0) [INFO] [stdout] 801 + "-vf", [INFO] [stdout] 802 + &filters, [INFO] [stdout] 803 + &format!("{}/%d.png", temp_dir), // Use sequential numbering [INFO] [stdout] 804 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:815:31 [INFO] [stdout] | [INFO] [stdout] 815 | let frames = fs::read_dir(&temp_dir)? [INFO] [stdout] | ^^^^^^^^^ help: change this to: `temp_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> live-set-song-splitter/src/main.rs:817:25 [INFO] [stdout] | [INFO] [stdout] 817 | .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 817 - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] 817 + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "png")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/main.rs:864:12 [INFO] [stdout] | [INFO] [stdout] 864 | if song_title_matched.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!song_title_matched.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:939:21 [INFO] [stdout] | [INFO] [stdout] 939 | &temp_dir, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `temp_dir` [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 `if` statement can be collapsed [INFO] [stdout] --> live-set-song-splitter/src/main.rs:983:17 [INFO] [stdout] | [INFO] [stdout] 983 | / if *song_title == missing_song { [INFO] [stdout] 984 | | if best_match.is_none() || time < &best_match.as_ref().unwrap().1 { [INFO] [stdout] 985 | | best_match = Some((song_title.clone(), *time, *frame_num)); [INFO] [stdout] 986 | | } [INFO] [stdout] 987 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 983 ~ if *song_title == missing_song [INFO] [stdout] 984 ~ && (best_match.is_none() || time < &best_match.as_ref().unwrap().1) { [INFO] [stdout] 985 | best_match = Some((song_title.clone(), *time, *frame_num)); [INFO] [stdout] 986 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:999:53 [INFO] [stdout] | [INFO] [stdout] 999 | song_start_times.sort_by(|a, b| a.1.partial_cmp(&b.1).unwrap()); [INFO] [stdout] | ^^^^ help: change this to: `b.1` [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 function has too many arguments (8/7) [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1061:1 [INFO] [stdout] | [INFO] [stdout] 1061 | / fn match_song_titles( [INFO] [stdout] 1062 | | input_file: &str, [INFO] [stdout] 1063 | | temp_dir: &str, [INFO] [stdout] 1064 | | ocr_parse: &ocr::OcrParse, [INFO] [stdout] ... | [INFO] [stdout] 1069 | | settings: &Settings, [INFO] [stdout] 1070 | | ) -> Result> { [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1166:13 [INFO] [stdout] | [INFO] [stdout] 1166 | return Ok(Some((song_title.to_string(), timestamp, *overlay))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1166 - return Ok(Some((song_title.to_string(), timestamp, *overlay))); [INFO] [stdout] 1166 + Ok(Some((song_title.to_string(), timestamp, *overlay))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1098:51 [INFO] [stdout] | [INFO] [stdout] 1098 | if let Some(matched) = matches_song_title(&lines, song_title, *overlay) { [INFO] [stdout] | ^^^^^^ help: change this to: `lines` [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: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1130:39 [INFO] [stdout] | [INFO] [stdout] 1130 | let overlay_text = if lines.len() > 0 { &lines[0] } else { "" }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lines.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1147:41 [INFO] [stdout] | [INFO] [stdout] 1147 | save_matched_image(&frame_path, &song_title, frame_num, "initial")?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `song_title` [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] --> live-set-song-splitter/src/main.rs:1159:9 [INFO] [stdout] | [INFO] [stdout] 1159 | &artist_cmp, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `artist_cmp` [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] --> live-set-song-splitter/src/main.rs:1160:9 [INFO] [stdout] | [INFO] [stdout] 1160 | &song_title, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `song_title` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1198:5 [INFO] [stdout] | [INFO] [stdout] 1198 | return Ok(final_timestamp); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1198 - return Ok(final_timestamp); [INFO] [stdout] 1198 + Ok(final_timestamp) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1185:9 [INFO] [stdout] | [INFO] [stdout] 1185 | &artist_cmp, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `artist_cmp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1409:13 [INFO] [stdout] | [INFO] [stdout] 1409 | return Ok(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1409 - return Ok(0.0); [INFO] [stdout] 1409 + Ok(0.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1264:19 [INFO] [stdout] | [INFO] [stdout] 1264 | .args(&["-i", input_file]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `["-i", input_file]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1295:25 [INFO] [stdout] | [INFO] [stdout] 1295 | .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1295 - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] 1295 + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "png")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1343:55 [INFO] [stdout] | [INFO] [stdout] 1343 | let result = ocr::run_tesseract_ocr_parse(&frame_file, artist, *psm)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `frame_file` [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] --> live-set-song-splitter/src/main.rs:1351:85 [INFO] [stdout] | [INFO] [stdout] 1351 | || matches_song_title_weighted(&lines, song_title, overlay, &weights) [INFO] [stdout] | ^^^^^^^^ help: change this to: `weights` [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 `if` statement can be collapsed [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1353:21 [INFO] [stdout] | [INFO] [stdout] 1353 | / if matched { [INFO] [stdout] 1354 | | if earliest_match.is_none() || frame_num < earliest_match.unwrap() { [INFO] [stdout] 1355 | | earliest_match = Some(frame_num); [INFO] [stdout] 1356 | | earliest_match_found = true; [INFO] [stdout] ... | [INFO] [stdout] 1363 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1353 ~ if matched [INFO] [stdout] 1354 ~ && (earliest_match.is_none() || frame_num < earliest_match.unwrap()) { [INFO] [stdout] 1355 | earliest_match = Some(frame_num); [INFO] [stdout] ... [INFO] [stdout] 1361 | } [INFO] [stdout] 1362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1431:15 [INFO] [stdout] | [INFO] [stdout] 1431 | .args(&["-i", input_file, "-c", "copy"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-i", input_file, "-c", "copy"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1438:14 [INFO] [stdout] | [INFO] [stdout] 1438 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 1439 | | "-y", // Overwrite output file [INFO] [stdout] 1440 | | output_file, [INFO] [stdout] 1441 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1438 ~ cmd.args([ [INFO] [stdout] 1439 + "-y", // Overwrite output file [INFO] [stdout] 1440 + output_file, [INFO] [stdout] 1441 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OutputMetadata` is never constructed [INFO] [stdout] --> live-set-song-splitter/src/main.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | struct OutputMetadata { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / return match parse_tesseract_output(&text, &artist_cmp) { [INFO] [stdout] 18 | | Some(result) => Ok(Some(result)), [INFO] [stdout] 19 | | None => Ok(None), [INFO] [stdout] 20 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 ~ match parse_tesseract_output(&text, &artist_cmp) { [INFO] [stdout] 18 + Some(result) => Ok(Some(result)), [INFO] [stdout] 19 + None => Ok(None), [INFO] [stdout] 20 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:17:48 [INFO] [stdout] | [INFO] [stdout] 17 | return match parse_tesseract_output(&text, &artist_cmp) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `artist_cmp` [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: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | cmd.args(&["--psm", psm_value]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["--psm", psm_value]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:65:24 [INFO] [stdout] | [INFO] [stdout] 65 | .filter(|line| line.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!line.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: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | / match &self { [INFO] [stdout] 86 | | &ArtistMatchReason::No(no) => { [INFO] [stdout] 87 | | write!(f, "{}", no) [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 85 ~ match self { [INFO] [stdout] 86 ~ ArtistMatchReason::No(no) => { [INFO] [stdout] 87 | write!(f, "{}", no) [INFO] [stdout] 88 | } [INFO] [stdout] 89 ~ ArtistMatchReason::Yes(yes) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / match &self { [INFO] [stdout] 116 | | &NoArtistMatchReason::EmptyArtist => { [INFO] [stdout] 117 | | write!(f, "empty artist") [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 115 ~ match self { [INFO] [stdout] 116 ~ NoArtistMatchReason::EmptyArtist => { [INFO] [stdout] 117 | write!(f, "empty artist") [INFO] [stdout] 118 | } [INFO] [stdout] 119 ~ NoArtistMatchReason::EmptyLine => { [INFO] [stdout] 120 | write!(f, "empty line") [INFO] [stdout] 121 | } [INFO] [stdout] 122 ~ NoArtistMatchReason::Fallthrough => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / match &self { [INFO] [stdout] 138 | | &YesArtistMatchReason::StartsWith => { [INFO] [stdout] 139 | | write!(f, "starts with") [INFO] [stdout] ... | [INFO] [stdout] 144 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 137 ~ match self { [INFO] [stdout] 138 ~ YesArtistMatchReason::StartsWith => { [INFO] [stdout] 139 | write!(f, "starts with") [INFO] [stdout] 140 | } [INFO] [stdout] 141 ~ YesArtistMatchReason::OffByOne => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:203:5 [INFO] [stdout] | [INFO] [stdout] 203 | return ArtistMatchReason::No(NoArtistMatchReason::Fallthrough); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 203 - return ArtistMatchReason::No(NoArtistMatchReason::Fallthrough); [INFO] [stdout] 203 + ArtistMatchReason::No(NoArtistMatchReason::Fallthrough) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:189:63 [INFO] [stdout] | [INFO] [stdout] 189 | if levenshtein_weight(&artist, &line, levenshtein_limit + 10 as u32, &weights) [INFO] [stdout] | ^^^^^^^^^ help: try: `10_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:197:67 [INFO] [stdout] | [INFO] [stdout] 197 | if levenshtein_weight(&artist, &line, levenshtein_limit + 10 as u32, &weights) [INFO] [stdout] | ^^^^^^^^^ help: try: `10_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:220:13 [INFO] [stdout] | [INFO] [stdout] 220 | assert!(false, "{:?}", result) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:380:9 [INFO] [stdout] | [INFO] [stdout] 380 | &weights, [INFO] [stdout] | ^^^^^^^^ help: change this to: `weights` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:446:5 [INFO] [stdout] | [INFO] [stdout] 446 | return None [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 446 - return None [INFO] [stdout] 446 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:423:24 [INFO] [stdout] | [INFO] [stdout] 423 | let numbered = &song_title[movement.len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:422:5 [INFO] [stdout] | [INFO] [stdout] 422 | if song_title.starts_with(movement) { [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] 422 ~ if let Some(numbered) = song_title.strip_prefix(movement) { [INFO] [stdout] 423 ~ // println!("starts with Movement, now: {}", &numbered); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:427:52 [INFO] [stdout] | [INFO] [stdout] 427 | if numbered.to_lowercase().starts_with(&spelled) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `spelled` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:431:42 [INFO] [stdout] | [INFO] [stdout] 431 | let mut un_coloned = &un_numbered[2..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:430:17 [INFO] [stdout] | [INFO] [stdout] 430 | if un_numbered.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] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 430 ~ if let Some() = un_numbered.strip_prefix(": ") { [INFO] [stdout] 431 ~ let mut un_coloned = ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:433:24 [INFO] [stdout] | [INFO] [stdout] 433 | if un_coloned.chars().nth(0) == Some('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `un_coloned.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:437:24 [INFO] [stdout] | [INFO] [stdout] 437 | if un_coloned.len() > 0 && un_coloned.chars().nth(un_coloned.chars().count() -1) == Some('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!un_coloned.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: this boolean expression can be simplified [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:523:17 [INFO] [stdout] | [INFO] [stdout] 523 | assert!(!matches_song_title(&other_lines, "test song", true).is_some()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches_song_title(&other_lines, "test song", true).is_none()` [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 boolean expression can be simplified [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:530:17 [INFO] [stdout] | [INFO] [stdout] 530 | assert!(!matches_song_title(&ocr_lines, "hello world", false).is_some()); // Should fail without overlay [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches_song_title(&ocr_lines, "hello world", false).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:560:17 [INFO] [stdout] | [INFO] [stdout] 560 | assert!(!matches_song_title(&lines, "too much", true).is_some()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `matches_song_title(&lines, "too much", true).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:589:17 [INFO] [stdout] | [INFO] [stdout] 589 | assert!(!result.is_some()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `result.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:585:49 [INFO] [stdout] | [INFO] [stdout] 585 | let result = matches_song_title(&lines, &song_title, true); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `song_title` [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 borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/audio.rs:21:15 [INFO] [stdout] | [INFO] [stdout] 21 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 22 | | "-i", [INFO] [stdout] 23 | | input_file, [INFO] [stdout] 24 | | "-vn", // No video [INFO] [stdout] ... | [INFO] [stdout] 32 | | temp_wav, [INFO] [stdout] 33 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 ~ .args([ [INFO] [stdout] 22 + "-i", [INFO] [stdout] 23 + input_file, [INFO] [stdout] 24 + "-vn", // No video [INFO] [stdout] 25 + "-acodec", [INFO] [stdout] 26 + "pcm_s16le", // PCM signed 16-bit little-endian [INFO] [stdout] 27 + "-ar", [INFO] [stdout] 28 + &SAMPLE_RATE.to_string(), // Sample rate [INFO] [stdout] 29 + "-ac", [INFO] [stdout] 30 + "1", // Mono channel [INFO] [stdout] 31 + "-y", // Overwrite output file [INFO] [stdout] 32 + temp_wav, [INFO] [stdout] 33 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual arithmetic check found [INFO] [stdout] --> live-set-song-splitter/src/audio.rs:87:21 [INFO] [stdout] | [INFO] [stdout] 87 | let start = if i < window_size { 0 } else { i - window_size }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `i.saturating_sub(window_size)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | return self; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 33 - return self; [INFO] [stdout] 33 + self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn from_to(&mut self, start_time: f64, end_time: f64) -> &mut Ffmpeg { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:60:14 [INFO] [stdout] | [INFO] [stdout] 60 | cmd.args(&["-hide_banner", "-loglevel", "warning"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-hide_banner", "-loglevel", "warning"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | cmd.args(&["-hide_banner", "-loglevel", "warning"]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-hide_banner", "-loglevel", "warning"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:81:15 [INFO] [stdout] | [INFO] [stdout] 81 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 82 | | "-splitx", [INFO] [stdout] 83 | | &format!("{:.3}:{:.3}", start_time, end_time), [INFO] [stdout] 84 | | "-out", [INFO] [stdout] 85 | | output_file, [INFO] [stdout] 86 | | input_file, [INFO] [stdout] 87 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 81 ~ .args([ [INFO] [stdout] 82 + "-splitx", [INFO] [stdout] 83 + &format!("{:.3}:{:.3}", start_time, end_time), [INFO] [stdout] 84 + "-out", [INFO] [stdout] 85 + output_file, [INFO] [stdout] 86 + input_file, [INFO] [stdout] 87 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:109:15 [INFO] [stdout] | [INFO] [stdout] 109 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 110 | | "-i", input_file, "-vn", // No video [INFO] [stdout] 111 | | "-acodec", "copy", // Copy audio stream without re-encoding [INFO] [stdout] 112 | | "-map", "0:a", [INFO] [stdout] 113 | | ]) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 109 ~ .args([ [INFO] [stdout] 110 + "-i", input_file, "-vn", // No video [INFO] [stdout] 111 + "-acodec", "copy", // Copy audio stream without re-encoding [INFO] [stdout] 112 + "-map", "0:a", [INFO] [stdout] 113 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:120:14 [INFO] [stdout] | [INFO] [stdout] 120 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 121 | | "-y", // Overwrite output file [INFO] [stdout] 122 | | output_file, [INFO] [stdout] 123 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 120 ~ cmd.args([ [INFO] [stdout] 121 + "-y", // Overwrite output file [INFO] [stdout] 122 + output_file, [INFO] [stdout] 123 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:145:14 [INFO] [stdout] | [INFO] [stdout] 145 | cmd.args(&["-metadata", &format!("artist={}", concertdata.artist)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("artist={}", concertdata.artist)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:149:18 [INFO] [stdout] | [INFO] [stdout] 149 | cmd.args(&["-metadata", &format!("title={}", title)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("title={}", title)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:154:18 [INFO] [stdout] | [INFO] [stdout] 154 | cmd.args(&["-metadata", &format!("album={}", album)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("album={}", album)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:160:22 [INFO] [stdout] | [INFO] [stdout] 160 | cmd.args(&["-metadata", &format!("date={}", year_value)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("date={}", year_value)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/ffmpeg.rs:166:18 [INFO] [stdout] | [INFO] [stdout] 166 | cmd.args(&["-metadata", &format!("track={}", track)]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-metadata", &format!("track={}", track)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/io.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | return Ok(()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 16 - return Ok(()); [INFO] [stdout] 16 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/video.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | return dark_pixels as f64 / pixel_count as f64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 36 - return dark_pixels as f64 / pixel_count as f64; [INFO] [stdout] 36 + dark_pixels as f64 / pixel_count as f64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/video.rs:121:19 [INFO] [stdout] | [INFO] [stdout] 121 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 122 | | "-v", [INFO] [stdout] 123 | | "error", [INFO] [stdout] 124 | | "-select_streams", [INFO] [stdout] ... | [INFO] [stdout] 130 | | &input_file, [INFO] [stdout] 131 | | ]) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 121 ~ .args([ [INFO] [stdout] 122 + "-v", [INFO] [stdout] 123 + "error", [INFO] [stdout] 124 + "-select_streams", [INFO] [stdout] 125 + "v:0", [INFO] [stdout] 126 + "-show_entries", [INFO] [stdout] 127 + "stream=r_frame_rate:format=duration,start_time", [INFO] [stdout] 128 + "-of", [INFO] [stdout] 129 + "json", [INFO] [stdout] 130 + &input_file, [INFO] [stdout] 131 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/video.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | &input_file, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `input_file` [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 borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/video.rs:187:19 [INFO] [stdout] | [INFO] [stdout] 187 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 188 | | "-v", [INFO] [stdout] 189 | | "error", [INFO] [stdout] 190 | | "-select_streams", [INFO] [stdout] ... | [INFO] [stdout] 196 | | input_file, [INFO] [stdout] 197 | | ]) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 187 ~ .args([ [INFO] [stdout] 188 + "-v", [INFO] [stdout] 189 + "error", [INFO] [stdout] 190 + "-select_streams", [INFO] [stdout] 191 + "v:0", [INFO] [stdout] 192 + "-show_entries", [INFO] [stdout] 193 + "packet=pts_time,flags", [INFO] [stdout] 194 + "-of", [INFO] [stdout] 195 + "csv=print_section=0", [INFO] [stdout] 196 + input_file, [INFO] [stdout] 197 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> live-set-song-splitter/src/main.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | / impl Default for OutputFormat { [INFO] [stdout] 33 | | fn default() -> Self { [INFO] [stdout] 34 | | OutputFormat::Both [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 23 + #[derive(Default)] [INFO] [stdout] 24 | enum OutputFormat { [INFO] [stdout] 25 | /// Output video files (mp4) [INFO] [stdout] ... [INFO] [stdout] 29 | /// Output both video and audio files [INFO] [stdout] 30 ~ #[default] [INFO] [stdout] 31 ~ Both, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> live-set-song-splitter/src/main.rs:163:16 [INFO] [stdout] | [INFO] [stdout] 163 | if input_dir == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `input_dir.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: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/main.rs:205:12 [INFO] [stdout] | [INFO] [stdout] 205 | if timestamps_data.songs.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `timestamps_data.songs.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] --> live-set-song-splitter/src/main.rs:245:8 [INFO] [stdout] | [INFO] [stdout] 245 | if segments.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `segments.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:437:19 [INFO] [stdout] | [INFO] [stdout] 437 | .args(&["-i", input_file]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `["-i", input_file]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:439:19 [INFO] [stdout] | [INFO] [stdout] 439 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 440 | | "-frame_pts", [INFO] [stdout] 441 | | "1", [INFO] [stdout] 442 | | "-fps_mode", [INFO] [stdout] 443 | | "passthrough", // Use original timestamps [INFO] [stdout] 444 | | ]) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 439 ~ .args([ [INFO] [stdout] 440 + "-frame_pts", [INFO] [stdout] 441 + "1", [INFO] [stdout] 442 + "-fps_mode", [INFO] [stdout] 443 + "passthrough", // Use original timestamps [INFO] [stdout] 444 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> live-set-song-splitter/src/main.rs:466:25 [INFO] [stdout] | [INFO] [stdout] 466 | .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 466 - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] 466 + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "png")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> live-set-song-splitter/src/main.rs:529:21 [INFO] [stdout] | [INFO] [stdout] 529 | let threshold = adaptive_threshold [INFO] [stdout] | _____________________^ [INFO] [stdout] 530 | | .min(audio::ENERGY_THRESHOLD) [INFO] [stdout] 531 | | .max(audio::ENERGY_THRESHOLD * 0.1); [INFO] [stdout] | |___________________________________________^ help: replace with clamp: `adaptive_threshold.clamp(audio::ENERGY_THRESHOLD * 0.1, audio::ENERGY_THRESHOLD)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:752:5 [INFO] [stdout] | [INFO] [stdout] 752 | / return frame_name [INFO] [stdout] 753 | | .strip_suffix(".png") [INFO] [stdout] 754 | | .and_then(|s| s.parse::().ok()) [INFO] [stdout] 755 | | .unwrap_or(0); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 752 ~ frame_name [INFO] [stdout] 753 + .strip_suffix(".png") [INFO] [stdout] 754 + .and_then(|s| s.parse::().ok()) [INFO] [stdout] 755 ~ .unwrap_or(0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> live-set-song-splitter/src/main.rs:750:49 [INFO] [stdout] | [INFO] [stdout] 750 | fn frame_number_from_image_filename(frame_path: &std::path::PathBuf) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 750 - fn frame_number_from_image_filename(frame_path: &std::path::PathBuf) -> usize { [INFO] [stdout] 750 + fn frame_number_from_image_filename(frame_path: &Path) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:822:5 [INFO] [stdout] | [INFO] [stdout] 822 | return Ok(frames); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 822 - return Ok(frames); [INFO] [stdout] 822 + Ok(frames) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:778:27 [INFO] [stdout] | [INFO] [stdout] 778 | io::overwrite_dir(&temp_dir)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `temp_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:792:21 [INFO] [stdout] | [INFO] [stdout] 792 | ffmpeg.args(&[ [INFO] [stdout] | _____________________^ [INFO] [stdout] 793 | | "-i", [INFO] [stdout] 794 | | input_file, [INFO] [stdout] 795 | | "-c:v", [INFO] [stdout] ... | [INFO] [stdout] 803 | | &format!("{}/%d.png", temp_dir), // Use sequential numbering [INFO] [stdout] 804 | | ]); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 792 ~ ffmpeg.args([ [INFO] [stdout] 793 + "-i", [INFO] [stdout] 794 + input_file, [INFO] [stdout] 795 + "-c:v", [INFO] [stdout] 796 + "png", [INFO] [stdout] 797 + "-frame_pts", [INFO] [stdout] 798 + "1", [INFO] [stdout] 799 + "-fps_mode", [INFO] [stdout] 800 + "passthrough", // Use original timestamps (replaces -vsync 0) [INFO] [stdout] 801 + "-vf", [INFO] [stdout] 802 + &filters, [INFO] [stdout] 803 + &format!("{}/%d.png", temp_dir), // Use sequential numbering [INFO] [stdout] 804 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:815:31 [INFO] [stdout] | [INFO] [stdout] 815 | let frames = fs::read_dir(&temp_dir)? [INFO] [stdout] | ^^^^^^^^^ help: change this to: `temp_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> live-set-song-splitter/src/main.rs:817:25 [INFO] [stdout] | [INFO] [stdout] 817 | .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 817 - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] 817 + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "png")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/main.rs:864:12 [INFO] [stdout] | [INFO] [stdout] 864 | if song_title_matched.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!song_title_matched.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:939:21 [INFO] [stdout] | [INFO] [stdout] 939 | &temp_dir, [INFO] [stdout] | ^^^^^^^^^ help: change this to: `temp_dir` [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 `if` statement can be collapsed [INFO] [stdout] --> live-set-song-splitter/src/main.rs:983:17 [INFO] [stdout] | [INFO] [stdout] 983 | / if *song_title == missing_song { [INFO] [stdout] 984 | | if best_match.is_none() || time < &best_match.as_ref().unwrap().1 { [INFO] [stdout] 985 | | best_match = Some((song_title.clone(), *time, *frame_num)); [INFO] [stdout] 986 | | } [INFO] [stdout] 987 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 983 ~ if *song_title == missing_song [INFO] [stdout] 984 ~ && (best_match.is_none() || time < &best_match.as_ref().unwrap().1) { [INFO] [stdout] 985 | best_match = Some((song_title.clone(), *time, *frame_num)); [INFO] [stdout] 986 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:999:53 [INFO] [stdout] | [INFO] [stdout] 999 | song_start_times.sort_by(|a, b| a.1.partial_cmp(&b.1).unwrap()); [INFO] [stdout] | ^^^^ help: change this to: `b.1` [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 function has too many arguments (8/7) [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1061:1 [INFO] [stdout] | [INFO] [stdout] 1061 | / fn match_song_titles( [INFO] [stdout] 1062 | | input_file: &str, [INFO] [stdout] 1063 | | temp_dir: &str, [INFO] [stdout] 1064 | | ocr_parse: &ocr::OcrParse, [INFO] [stdout] ... | [INFO] [stdout] 1069 | | settings: &Settings, [INFO] [stdout] 1070 | | ) -> Result> { [INFO] [stdout] | |________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1166:13 [INFO] [stdout] | [INFO] [stdout] 1166 | return Ok(Some((song_title.to_string(), timestamp, *overlay))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1166 - return Ok(Some((song_title.to_string(), timestamp, *overlay))); [INFO] [stdout] 1166 + Ok(Some((song_title.to_string(), timestamp, *overlay))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1098:51 [INFO] [stdout] | [INFO] [stdout] 1098 | if let Some(matched) = matches_song_title(&lines, song_title, *overlay) { [INFO] [stdout] | ^^^^^^ help: change this to: `lines` [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: length comparison to zero [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1130:39 [INFO] [stdout] | [INFO] [stdout] 1130 | let overlay_text = if lines.len() > 0 { &lines[0] } else { "" }; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lines.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1147:41 [INFO] [stdout] | [INFO] [stdout] 1147 | save_matched_image(&frame_path, &song_title, frame_num, "initial")?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `song_title` [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] --> live-set-song-splitter/src/main.rs:1159:9 [INFO] [stdout] | [INFO] [stdout] 1159 | &artist_cmp, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `artist_cmp` [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] --> live-set-song-splitter/src/main.rs:1160:9 [INFO] [stdout] | [INFO] [stdout] 1160 | &song_title, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `song_title` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1198:5 [INFO] [stdout] | [INFO] [stdout] 1198 | return Ok(final_timestamp); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1198 - return Ok(final_timestamp); [INFO] [stdout] 1198 + Ok(final_timestamp) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1185:9 [INFO] [stdout] | [INFO] [stdout] 1185 | &artist_cmp, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `artist_cmp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1409:13 [INFO] [stdout] | [INFO] [stdout] 1409 | return Ok(0.0); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1409 - return Ok(0.0); [INFO] [stdout] 1409 + Ok(0.0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1264:19 [INFO] [stdout] | [INFO] [stdout] 1264 | .args(&["-i", input_file]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `["-i", input_file]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1295:25 [INFO] [stdout] | [INFO] [stdout] 1295 | .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 1295 - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "png")) [INFO] [stdout] 1295 + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "png")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1343:55 [INFO] [stdout] | [INFO] [stdout] 1343 | let result = ocr::run_tesseract_ocr_parse(&frame_file, artist, *psm)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `frame_file` [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] --> live-set-song-splitter/src/main.rs:1351:85 [INFO] [stdout] | [INFO] [stdout] 1351 | || matches_song_title_weighted(&lines, song_title, overlay, &weights) [INFO] [stdout] | ^^^^^^^^ help: change this to: `weights` [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 `if` statement can be collapsed [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1353:21 [INFO] [stdout] | [INFO] [stdout] 1353 | / if matched { [INFO] [stdout] 1354 | | if earliest_match.is_none() || frame_num < earliest_match.unwrap() { [INFO] [stdout] 1355 | | earliest_match = Some(frame_num); [INFO] [stdout] 1356 | | earliest_match_found = true; [INFO] [stdout] ... | [INFO] [stdout] 1363 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1353 ~ if matched [INFO] [stdout] 1354 ~ && (earliest_match.is_none() || frame_num < earliest_match.unwrap()) { [INFO] [stdout] 1355 | earliest_match = Some(frame_num); [INFO] [stdout] ... [INFO] [stdout] 1361 | } [INFO] [stdout] 1362 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1431:15 [INFO] [stdout] | [INFO] [stdout] 1431 | .args(&["-i", input_file, "-c", "copy"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-i", input_file, "-c", "copy"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> live-set-song-splitter/src/main.rs:1438:14 [INFO] [stdout] | [INFO] [stdout] 1438 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 1439 | | "-y", // Overwrite output file [INFO] [stdout] 1440 | | output_file, [INFO] [stdout] 1441 | | ]); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1438 ~ cmd.args([ [INFO] [stdout] 1439 + "-y", // Overwrite output file [INFO] [stdout] 1440 + output_file, [INFO] [stdout] 1441 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> live-set-song-splitter/src/ocr.rs:497:13 [INFO] [stdout] | [INFO] [stdout] 497 | &vec!["__ My Everythi".to_string()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&["__ My Everythi".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 17s [INFO] running `Command { std: "docker" "inspect" "ef5f5c7bf807e082b4e2f5ccf6e4e20c74cb58c9f1a553dea7c607d8c907e3a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ef5f5c7bf807e082b4e2f5ccf6e4e20c74cb58c9f1a553dea7c607d8c907e3a7", kill_on_drop: false }` [INFO] [stdout] ef5f5c7bf807e082b4e2f5ccf6e4e20c74cb58c9f1a553dea7c607d8c907e3a7