[INFO] cloning repository https://github.com/emk/subtitles-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/emk/subtitles-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femk%2Fsubtitles-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femk%2Fsubtitles-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5d02b526f1a7f49cdd4190e32c024247da107d42 [INFO] linting emk/subtitles-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femk%2Fsubtitles-rs" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/emk/subtitles-rs [INFO] finished tweaking git repo https://github.com/emk/subtitles-rs [INFO] tweaked toml for git repo https://github.com/emk/subtitles-rs written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/emk/subtitles-rs 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/emk/subtitles-rs 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] Updating git repository `https://github.com/emk/async-openai.git` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded proc-macro2 v1.0.84 [INFO] [stderr] Downloaded mp4ameta_proc v0.6.0 [INFO] [stderr] Downloaded whatlang v0.16.4 [INFO] [stderr] Downloaded derive_builder_macro v0.12.0 [INFO] [stderr] Downloaded unicode-width v0.1.12 [INFO] [stderr] Downloaded darling_macro v0.14.4 [INFO] [stderr] Downloaded backoff v0.4.0 [INFO] [stderr] Downloaded darling v0.14.4 [INFO] [stderr] Downloaded tar v0.4.40 [INFO] [stderr] Downloaded derive_builder v0.12.0 [INFO] [stderr] Downloaded extension-traits v1.0.1 [INFO] [stderr] Downloaded async-convert v1.0.0 [INFO] [stderr] Downloaded ext-trait v1.0.1 [INFO] [stderr] Downloaded bytemuck v1.16.0 [INFO] [stderr] Downloaded id3 v1.13.1 [INFO] [stderr] Downloaded hyper v1.3.1 [INFO] [stderr] Downloaded reqwest v0.12.4 [INFO] [stderr] Downloaded pest v2.7.10 [INFO] [stderr] Downloaded pest_meta v2.7.10 [INFO] [stderr] Downloaded num v0.4.3 [INFO] [stderr] Downloaded peg-macros v0.8.3 [INFO] [stderr] Downloaded peg v0.8.3 [INFO] [stderr] Downloaded readme-rustdocifier v0.1.1 [INFO] [stderr] Downloaded never-say-never v6.6.666 [INFO] [stderr] Downloaded hyper-util v0.1.5 [INFO] [stderr] Downloaded handlebars v5.1.2 [INFO] [stderr] Downloaded macro_rules_attribute-proc_macro v0.1.3 [INFO] [stderr] Downloaded difference v2.0.0 [INFO] [stderr] Downloaded nougat v0.2.4 [INFO] [stderr] Downloaded terminal_size v0.3.0 [INFO] [stderr] Downloaded hyper v0.14.28 [INFO] [stderr] Downloaded anstyle-query v1.0.3 [INFO] [stderr] Downloaded nougat-proc_macros v0.2.4 [INFO] [stderr] Downloaded paragraph-breaker v0.4.4 [INFO] [stderr] Downloaded isolang v2.4.0 [INFO] [stderr] Downloaded peg-runtime v0.8.3 [INFO] [stderr] Downloaded object v0.35.0 [INFO] [stderr] Downloaded backtrace v0.3.72 [INFO] [stderr] Downloaded cc v1.0.98 [INFO] [stderr] Downloaded metaflac v0.2.7 [INFO] [stderr] Downloaded pest_generator v2.7.10 [INFO] [stderr] Downloaded pest_derive v2.7.10 [INFO] [stderr] Downloaded darling_core v0.14.4 [INFO] [stderr] Downloaded webrtc-vad v0.4.0 [INFO] [stderr] Downloaded derive_builder_core v0.12.0 [INFO] [stderr] Downloaded reqwest-eventsource v0.4.0 [INFO] [stderr] Downloaded lending-iterator-proc_macros v0.1.7 [INFO] [stderr] Downloaded eventsource-stream v0.2.3 [INFO] [stderr] Downloaded audiotags-macro v0.2.0 [INFO] [stderr] Downloaded ext-trait-proc_macros v1.0.1 [INFO] [stderr] Downloaded macro_rules_attribute v0.1.3 [INFO] [stderr] Downloaded lending-iterator v0.1.7 [INFO] [stderr] Downloaded rusqlite v0.31.0 [INFO] [stderr] Downloaded polonius-the-crab v0.2.1 [INFO] [stderr] Downloaded miniz_oxide v0.7.3 [INFO] [stderr] Downloaded audiotags v0.5.0 [INFO] [stderr] Downloaded mp4ameta v0.11.0 [INFO] [stderr] Downloaded chardet v0.2.4 [INFO] [stderr] Downloaded rust-stemmers v1.2.0 [INFO] [stderr] Downloaded libsqlite3-sys v0.28.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 1751cfe899a3868a168a489515093031b16f58d36e8f7e60ad8c1e103755a484 [INFO] running `Command { std: "docker" "start" "-a" "1751cfe899a3868a168a489515093031b16f58d36e8f7e60ad8c1e103755a484", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1751cfe899a3868a168a489515093031b16f58d36e8f7e60ad8c1e103755a484", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1751cfe899a3868a168a489515093031b16f58d36e8f7e60ad8c1e103755a484", kill_on_drop: false }` [INFO] [stdout] 1751cfe899a3868a168a489515093031b16f58d36e8f7e60ad8c1e103755a484 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] ecf6b78b05b3bf3c65fb7624f055305168d1935cd3eded9e09eb811e3a68be5d [INFO] running `Command { std: "docker" "start" "-a" "ecf6b78b05b3bf3c65fb7624f055305168d1935cd3eded9e09eb811e3a68be5d", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.84 [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling autocfg v1.3.0 [INFO] [stderr] Checking memchr v2.7.2 [INFO] [stderr] Checking pin-project-lite v0.2.14 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking itoa v1.0.11 [INFO] [stderr] Checking bytes v1.6.0 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Compiling serde v1.0.203 [INFO] [stderr] Compiling cc v1.0.98 [INFO] [stderr] Checking futures-sink v0.3.30 [INFO] [stderr] Compiling thiserror v1.0.61 [INFO] [stderr] Checking futures-io v0.3.30 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking bitflags v2.5.0 [INFO] [stderr] Checking zerocopy v0.7.34 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Compiling httparse v1.8.0 [INFO] [stderr] Compiling serde_json v1.0.117 [INFO] [stderr] Checking allocator-api2 v0.2.18 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking tower-service v0.3.2 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Checking tinyvec v1.6.0 [INFO] [stderr] Checking linux-raw-sys v0.4.14 [INFO] [stderr] Checking unicode-bidi v0.3.15 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling unicase v2.7.0 [INFO] [stderr] Checking ipnet v2.9.0 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking sync_wrapper v0.1.2 [INFO] [stderr] Checking miniz_oxide v0.7.3 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Compiling pkg-config v0.3.30 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking phf_shared v0.11.2 [INFO] [stderr] Checking fastrand v2.1.0 [INFO] [stderr] Checking encoding_index_tests v0.1.4 [INFO] [stderr] Compiling paste v1.0.15 [INFO] [stderr] Compiling ucd-trie v0.1.6 [INFO] [stderr] Compiling mime_guess v2.0.4 [INFO] [stderr] Checking tower-layer v0.3.2 [INFO] [stderr] Checking phf v0.11.2 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Checking socket2 v0.5.7 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Compiling syn v2.0.66 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking anstyle-parse v0.2.4 [INFO] [stderr] Checking rustls-pemfile v1.0.4 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking unicode-normalization v0.1.23 [INFO] [stderr] Checking flate2 v1.0.30 [INFO] [stderr] Checking fallible-streaming-iterator v0.1.9 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking anstyle v1.0.7 [INFO] [stderr] Compiling ring v0.17.8 [INFO] [stderr] Compiling libsqlite3-sys v0.28.0 [INFO] [stderr] Checking is_terminal_polyfill v1.70.0 [INFO] [stderr] Checking indexmap v2.2.6 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Checking idna v0.5.0 [INFO] [stderr] Checking fallible-iterator v0.3.0 [INFO] [stderr] Checking openssl-probe v0.1.5 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking regex-syntax v0.8.3 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking colorchoice v1.0.1 [INFO] [stderr] Checking crc-catalog v2.4.0 [INFO] [stderr] Compiling peg-runtime v0.8.3 [INFO] [stderr] Checking http-body v1.0.0 [INFO] [stderr] Checking anstyle-query v1.0.3 [INFO] [stderr] Checking crc v3.2.1 [INFO] [stderr] Checking anstream v0.6.14 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking http-body-util v0.1.1 [INFO] [stderr] Checking rustls-native-certs v0.6.3 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Compiling peg-macros v0.8.3 [INFO] [stderr] Checking filetime v0.2.23 [INFO] [stderr] Checking encoding_rs v0.8.34 [INFO] [stderr] Checking url v2.5.0 [INFO] [stderr] Compiling portable-atomic v1.6.0 [INFO] [stderr] Compiling macro_rules_attribute-proc_macro v0.1.3 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking lzma-rs v0.3.0 [INFO] [stderr] Checking num-bigint v0.4.5 [INFO] [stderr] Compiling webrtc-vad v0.4.0 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Compiling semver v1.0.23 [INFO] [stderr] Checking unicode-width v0.1.12 [INFO] [stderr] Compiling mp4ameta_proc v0.6.0 [INFO] [stderr] Checking macro_rules_attribute v0.1.3 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Checking clap_lex v0.7.0 [INFO] [stderr] Compiling anyhow v1.0.86 [INFO] [stderr] Checking console v0.15.8 [INFO] [stderr] Checking metaflac v0.2.7 [INFO] [stderr] Checking mp4ameta v0.11.0 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking id3 v1.13.1 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking encoding-index-korean v1.20141219.5 [INFO] [stderr] Checking tempfile v3.10.1 [INFO] [stderr] Checking xattr v1.3.1 [INFO] [stderr] Checking terminal_size v0.3.0 [INFO] [stderr] Checking encoding-index-japanese v1.20141219.5 [INFO] [stderr] Checking peg v0.8.3 [INFO] [stderr] Checking tar v0.4.40 [INFO] [stderr] Checking encoding-index-tradchinese v1.20141219.5 [INFO] [stderr] Checking clap_builder v4.5.2 [INFO] [stderr] Checking encoding-index-simpchinese v1.20141219.5 [INFO] [stderr] Checking encoding-index-singlebyte v1.20141219.5 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Checking number_prefix v0.4.0 [INFO] [stderr] Checking audiotags-macro v0.2.0 [INFO] [stderr] Checking humantime v2.1.0 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking eventsource-stream v0.2.3 [INFO] [stderr] Checking never-say-never v6.6.666 [INFO] [stderr] Checking polonius-the-crab v0.2.1 [INFO] [stderr] Checking indicatif v0.17.8 [INFO] [stderr] Checking whatlang v0.16.4 [INFO] [stderr] Checking regex-automata v0.4.6 [INFO] [stderr] Checking encoding v0.2.33 [INFO] [stderr] Checking ordered-float v4.2.0 [INFO] [stderr] Checking bytemuck v1.16.0 [INFO] [stderr] Checking paragraph-breaker v0.4.4 [INFO] [stderr] Checking cast v0.3.0 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking chardet v0.2.4 [INFO] [stderr] Checking dotenv v0.15.0 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking sharded-slab v0.1.7 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking cli_test_dir v0.1.8 (/opt/rustwide/workdir/cli_test_dir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> cli_test_dir/src/lib.rs:302:19 [INFO] [stdout] | [INFO] [stdout] 302 | TestDir { bin: bin, dir: dir } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `bin` [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] --> cli_test_dir/src/lib.rs:302:29 [INFO] [stdout] | [INFO] [stdout] 302 | TestDir { bin: bin, dir: dir } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> cli_test_dir/src/lib.rs:302:19 [INFO] [stdout] | [INFO] [stdout] 302 | TestDir { bin: bin, dir: dir } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `bin` [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] --> cli_test_dir/src/lib.rs:302:29 [INFO] [stdout] | [INFO] [stdout] 302 | TestDir { bin: bin, dir: dir } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unit tests in doctest are not executed [INFO] [stdout] --> cli_test_dir/src/lib.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | //! #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest [INFO] [stdout] = note: `#[warn(clippy::test_attr_in_doctest)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unit tests in doctest are not executed [INFO] [stdout] --> cli_test_dir/src/lib.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | //! #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#test_attr_in_doctest [INFO] [stdout] = note: `#[warn(clippy::test_attr_in_doctest)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> cli_test_dir/src/lib.rs:382:26 [INFO] [stdout] | [INFO] [stdout] 382 | self.expect_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: the borrowed expression implements the required traits [INFO] [stdout] --> cli_test_dir/src/lib.rs:383:36 [INFO] [stdout] | [INFO] [stdout] 383 | let mut f = fs::File::open(&path).expect("could not open file"); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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 following explicit lifetimes could be elided: 'a [INFO] [stdout] --> cli_test_dir/src/lib.rs:586:6 [INFO] [stdout] | [INFO] [stdout] 586 | impl<'a> ExpectStatus for &'a mut process::Command { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 586 - impl<'a> ExpectStatus for &'a mut process::Command { [INFO] [stdout] 586 + impl ExpectStatus for &mut process::Command { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> cli_test_dir/src/lib.rs:234:19 [INFO] [stdout] | [INFO] [stdout] 234 | fn exe_name(name: &str) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 234 | fn exe_name(name: &str) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> cli_test_dir/src/lib.rs:382:26 [INFO] [stdout] | [INFO] [stdout] 382 | self.expect_path(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: the borrowed expression implements the required traits [INFO] [stdout] --> cli_test_dir/src/lib.rs:383:36 [INFO] [stdout] | [INFO] [stdout] 383 | let mut f = fs::File::open(&path).expect("could not open file"); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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 following explicit lifetimes could be elided: 'a [INFO] [stdout] --> cli_test_dir/src/lib.rs:586:6 [INFO] [stdout] | [INFO] [stdout] 586 | impl<'a> ExpectStatus for &'a mut process::Command { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 586 - impl<'a> ExpectStatus for &'a mut process::Command { [INFO] [stdout] 586 + impl ExpectStatus for &mut process::Command { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> cli_test_dir/src/lib.rs:234:19 [INFO] [stdout] | [INFO] [stdout] 234 | fn exe_name(name: &str) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 234 | fn exe_name(name: &str) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking tracing-subscriber v0.3.18 [INFO] [stderr] Compiling serde_derive v1.0.203 [INFO] [stderr] Compiling tokio-macros v2.2.0 [INFO] [stderr] Compiling thiserror-impl v1.0.61 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Compiling async-trait v0.1.80 [INFO] [stderr] Compiling clap_derive v4.5.4 [INFO] [stderr] Checking regex v1.10.4 [INFO] [stderr] Compiling darling_core v0.14.4 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking tokio v1.37.0 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking env_filter v0.1.0 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking env_logger v0.11.3 [INFO] [stderr] Compiling ext-trait-proc_macros v1.0.1 [INFO] [stderr] Compiling nougat-proc_macros v0.2.4 [INFO] [stderr] Compiling lending-iterator-proc_macros v0.1.7 [INFO] [stderr] Checking async-convert v1.0.0 [INFO] [stderr] Compiling pest v2.7.10 [INFO] [stderr] Checking audiotags v0.5.0 [INFO] [stderr] Checking clap v4.5.4 [INFO] [stderr] Checking ext-trait v1.0.1 [INFO] [stderr] Checking extension-traits v1.0.1 [INFO] [stderr] Compiling darling_macro v0.14.4 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking nougat v0.2.4 [INFO] [stderr] Checking lending-iterator v0.1.7 [INFO] [stderr] Compiling darling v0.14.4 [INFO] [stderr] Compiling derive_builder_core v0.12.0 [INFO] [stderr] Compiling pest_meta v2.7.10 [INFO] [stderr] Compiling derive_builder_macro v0.12.0 [INFO] [stderr] Checking derive_builder v0.12.0 [INFO] [stderr] Checking futures-executor v0.3.30 [INFO] [stderr] Compiling pest_generator v2.7.10 [INFO] [stderr] Checking futures v0.3.30 [INFO] [stderr] Compiling pest_derive v2.7.10 [INFO] [stderr] Checking tokio-util v0.7.11 [INFO] [stderr] Checking hyper v1.3.1 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking backoff v0.4.0 [INFO] [stderr] Checking tokio-stream v0.1.15 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking isolang v2.4.0 [INFO] [stderr] Checking secrecy v0.8.0 [INFO] [stderr] Checking csv v1.3.0 [INFO] [stderr] Checking rust-stemmers v1.2.0 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking relative-path v1.9.3 [INFO] [stderr] Checking uuid v1.8.0 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Checking hyper-util v0.1.5 [INFO] [stderr] Checking rusqlite v0.31.0 [INFO] [stderr] Checking handlebars v5.1.2 [INFO] [stderr] Checking reqwest v0.12.4 [INFO] [stderr] Checking hyper v0.14.28 [INFO] [stderr] Checking dict_importer v0.1.0 (/opt/rustwide/workdir/libs/dict_importer) [INFO] [stderr] Checking aligned_media v0.1.0 (/opt/rustwide/workdir/aligned_media) [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:9:33 [INFO] [stdout] | [INFO] [stdout] 9 | static NUMERIC_VALUE_FOR_CHAR: &'static [u8; 128] = &[ [INFO] [stdout] | -^^^^^^^---------- help: consider removing `'static`: `&[u8; 128]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:9:33 [INFO] [stdout] | [INFO] [stdout] 9 | static NUMERIC_VALUE_FOR_CHAR: &'static [u8; 128] = &[ [INFO] [stdout] | -^^^^^^^---------- help: consider removing `'static`: `&[u8; 128]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> aligned_media/src/lib.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | track_type: track_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `track_type` [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] --> aligned_media/src/lib.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | track_type: track_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `track_type` [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: this `to_owned` call clones the `Cow<'_, Path>` itself and does not cause its contents to become owned [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:102:24 [INFO] [stdout] | [INFO] [stdout] 102 | let path = entry.path().map_err(mkerr)?.to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] = note: `#[warn(clippy::suspicious_to_owned)]` on by default [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 102 | let path = entry.path().map_err(mkerr)?.into_owned(); [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 102 - let path = entry.path().map_err(mkerr)?.to_owned(); [INFO] [stdout] 102 + let path = entry.path().map_err(mkerr)?.clone(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:141:25 [INFO] [stdout] | [INFO] [stdout] 141 | .map(|line| Ok(line.map_err(Error::could_not_load_dictionary)?.parse()?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 141 - .map(|line| Ok(line.map_err(Error::could_not_load_dictionary)?.parse()?)) [INFO] [stdout] 141 + .map(|line| line.map_err(Error::could_not_load_dictionary)?.parse()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> libs/dict_importer/src/download.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | .map_err(|e| Error::could_not_load_dictionary(e))??; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Error::could_not_load_dictionary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `to_owned` call clones the `Cow<'_, Path>` itself and does not cause its contents to become owned [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:102:24 [INFO] [stdout] | [INFO] [stdout] 102 | let path = entry.path().map_err(mkerr)?.to_owned(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned [INFO] [stdout] = note: `#[warn(clippy::suspicious_to_owned)]` on by default [INFO] [stdout] help: depending on intent, either make the `Cow` an `Owned` variant [INFO] [stdout] | [INFO] [stdout] 102 | let path = entry.path().map_err(mkerr)?.into_owned(); [INFO] [stdout] | ++ [INFO] [stdout] help: or clone the `Cow` itself [INFO] [stdout] | [INFO] [stdout] 102 - let path = entry.path().map_err(mkerr)?.to_owned(); [INFO] [stdout] 102 + let path = entry.path().map_err(mkerr)?.clone(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:141:25 [INFO] [stdout] | [INFO] [stdout] 141 | .map(|line| Ok(line.map_err(Error::could_not_load_dictionary)?.parse()?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 141 - .map(|line| Ok(line.map_err(Error::could_not_load_dictionary)?.parse()?)) [INFO] [stdout] 141 + .map(|line| line.map_err(Error::could_not_load_dictionary)?.parse()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:299:56 [INFO] [stdout] | [INFO] [stdout] 299 | let dict = Dictionary::from_archive_reader(fixture.as_ref()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `fixture` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:154:20 [INFO] [stdout] | [INFO] [stdout] 154 | pub fn entries(&self) -> EntriesIter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 154 | pub fn entries(&self) -> EntriesIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> aligned_media/src/html.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / Ok( [INFO] [stdout] 37 | | grammar::fragment(html).map_err(|err| Error::CouldNotParseHtml { [INFO] [stdout] 38 | | html: html.to_owned(), [INFO] [stdout] 39 | | source: Box::new(err), [INFO] [stdout] 40 | | })?, [INFO] [stdout] 41 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 36 ~ grammar::fragment(html).map_err(|err| Error::CouldNotParseHtml { [INFO] [stdout] 37 | html: html.to_owned(), [INFO] [stdout] 38 | source: Box::new(err), [INFO] [stdout] 39 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> aligned_media/src/html.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | ::std::char::from_u32(code).ok_or_else(|| "a valid UTF-8 character") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 156 - ::std::char::from_u32(code).ok_or_else(|| "a valid UTF-8 character") [INFO] [stdout] 156 + ::std::char::from_u32(code).ok_or("a valid UTF-8 character") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> libs/dict_importer/src/download.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | .map_err(|e| Error::could_not_load_dictionary(e))??; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Error::could_not_load_dictionary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking dict_manager v0.1.0 (/opt/rustwide/workdir/libs/dict_manager) [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> aligned_media/src/lib.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 227 | | Self::from_bytes(data.as_bytes()) [INFO] [stdout] 228 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> aligned_media/src/lib.rs:259:35 [INFO] [stdout] | [INFO] [stdout] 259 | for (_track_id, track) in &self.tracks { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 259 - for (_track_id, track) in &self.tracks { [INFO] [stdout] 259 + for track in self.tracks.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> aligned_media/src/lib.rs:593:16 [INFO] [stdout] | [INFO] [stdout] 593 | if heading < 1 || heading > 6 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=6).contains(&heading)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> aligned_media/src/lib.rs:675:17 [INFO] [stdout] | [INFO] [stdout] 675 | return Err(Error::InvalidSegmentContent { id: alignment.id }); [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] 675 - return Err(Error::InvalidSegmentContent { id: alignment.id }); [INFO] [stdout] 675 + Err(Error::InvalidSegmentContent { id: alignment.id }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> libs/dict_importer/src/dictd.rs:154:20 [INFO] [stdout] | [INFO] [stdout] 154 | pub fn entries(&self) -> EntriesIter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 154 | pub fn entries(&self) -> EntriesIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> aligned_media/src/lib.rs:747:13 [INFO] [stdout] | [INFO] [stdout] 747 | / (|| Error::InvalidPath { [INFO] [stdout] 748 | | path: path.display().to_string(), [INFO] [stdout] 749 | | })() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 747 ~ Error::InvalidPath { [INFO] [stdout] 748 + path: path.display().to_string(), [INFO] [stdout] 749 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aligned_media/src/lib.rs:751:29 [INFO] [stdout] | [INFO] [stdout] 751 | Self::from_rel_path(&path) [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: try not to call a closure in the expression where it is declared [INFO] [stdout] --> aligned_media/src/lib.rs:760:24 [INFO] [stdout] | [INFO] [stdout] 760 | return Err((|| Error::InvalidPath { [INFO] [stdout] | ________________________^ [INFO] [stdout] 761 | | path: path.to_string(), [INFO] [stdout] 762 | | })()); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 760 ~ return Err(Error::InvalidPath { [INFO] [stdout] 761 + path: path.to_string(), [INFO] [stdout] 762 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> aligned_media/src/lib.rs:766:16 [INFO] [stdout] | [INFO] [stdout] 766 | if component == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `component.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: try not to call a closure in the expression where it is declared [INFO] [stdout] --> aligned_media/src/lib.rs:771:28 [INFO] [stdout] | [INFO] [stdout] 771 | return Err((|| Error::InvalidPath { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 772 | | path: path.to_string(), [INFO] [stdout] 773 | | })()); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 771 ~ return Err(Error::InvalidPath { [INFO] [stdout] 772 + path: path.to_string(), [INFO] [stdout] 773 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> aligned_media/src/html.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | / Ok( [INFO] [stdout] 37 | | grammar::fragment(html).map_err(|err| Error::CouldNotParseHtml { [INFO] [stdout] 38 | | html: html.to_owned(), [INFO] [stdout] 39 | | source: Box::new(err), [INFO] [stdout] 40 | | })?, [INFO] [stdout] 41 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 36 ~ grammar::fragment(html).map_err(|err| Error::CouldNotParseHtml { [INFO] [stdout] 37 | html: html.to_owned(), [INFO] [stdout] 38 | source: Box::new(err), [INFO] [stdout] 39 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> aligned_media/src/html.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | ::std::char::from_u32(code).ok_or_else(|| "a valid UTF-8 character") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 156 - ::std::char::from_u32(code).ok_or_else(|| "a valid UTF-8 character") [INFO] [stdout] 156 + ::std::char::from_u32(code).ok_or("a valid UTF-8 character") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> aligned_media/src/lib.rs:226:5 [INFO] [stdout] | [INFO] [stdout] 226 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 227 | | Self::from_bytes(data.as_bytes()) [INFO] [stdout] 228 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> aligned_media/src/lib.rs:259:35 [INFO] [stdout] | [INFO] [stdout] 259 | for (_track_id, track) in &self.tracks { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 259 - for (_track_id, track) in &self.tracks { [INFO] [stdout] 259 + for track in self.tracks.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> aligned_media/src/lib.rs:593:16 [INFO] [stdout] | [INFO] [stdout] 593 | if heading < 1 || heading > 6 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=6).contains(&heading)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> aligned_media/src/lib.rs:675:17 [INFO] [stdout] | [INFO] [stdout] 675 | return Err(Error::InvalidSegmentContent { id: alignment.id }); [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] 675 - return Err(Error::InvalidSegmentContent { id: alignment.id }); [INFO] [stdout] 675 + Err(Error::InvalidSegmentContent { id: alignment.id }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: try not to call a closure in the expression where it is declared [INFO] [stdout] --> aligned_media/src/lib.rs:747:13 [INFO] [stdout] | [INFO] [stdout] 747 | / (|| Error::InvalidPath { [INFO] [stdout] 748 | | path: path.display().to_string(), [INFO] [stdout] 749 | | })() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] = note: `#[warn(clippy::redundant_closure_call)]` on by default [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 747 ~ Error::InvalidPath { [INFO] [stdout] 748 + path: path.display().to_string(), [INFO] [stdout] 749 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aligned_media/src/lib.rs:751:29 [INFO] [stdout] | [INFO] [stdout] 751 | Self::from_rel_path(&path) [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: try not to call a closure in the expression where it is declared [INFO] [stdout] --> aligned_media/src/lib.rs:760:24 [INFO] [stdout] | [INFO] [stdout] 760 | return Err((|| Error::InvalidPath { [INFO] [stdout] | ________________________^ [INFO] [stdout] 761 | | path: path.to_string(), [INFO] [stdout] 762 | | })()); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 760 ~ return Err(Error::InvalidPath { [INFO] [stdout] 761 + path: path.to_string(), [INFO] [stdout] 762 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> aligned_media/src/lib.rs:766:16 [INFO] [stdout] | [INFO] [stdout] 766 | if component == "" [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `component.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: try not to call a closure in the expression where it is declared [INFO] [stdout] --> aligned_media/src/lib.rs:771:28 [INFO] [stdout] | [INFO] [stdout] 771 | return Err((|| Error::InvalidPath { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 772 | | path: path.to_string(), [INFO] [stdout] 773 | | })()); [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call [INFO] [stdout] help: try doing something like [INFO] [stdout] | [INFO] [stdout] 771 ~ return Err(Error::InvalidPath { [INFO] [stdout] 772 + path: path.to_string(), [INFO] [stdout] 773 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> libs/dict_manager/src/lib.rs:236:58 [INFO] [stdout] | [INFO] [stdout] 236 | let stem = word_stem(&lang_pair.foreign, &headword); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `headword` [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 following explicit lifetimes could be elided: 'w [INFO] [stdout] --> libs/dict_manager/src/lib.rs:298:14 [INFO] [stdout] | [INFO] [stdout] 298 | fn word_stem<'w>(lang: &Language, word: &'w str) -> Option { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 298 - fn word_stem<'w>(lang: &Language, word: &'w str) -> Option { [INFO] [stdout] 298 + fn word_stem(lang: &Language, word: &str) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> libs/dict_manager/src/lib.rs:236:58 [INFO] [stdout] | [INFO] [stdout] 236 | let stem = word_stem(&lang_pair.foreign, &headword); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `headword` [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 following explicit lifetimes could be elided: 'w [INFO] [stdout] --> libs/dict_manager/src/lib.rs:298:14 [INFO] [stdout] | [INFO] [stdout] 298 | fn word_stem<'w>(lang: &Language, word: &'w str) -> Option { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 298 - fn word_stem<'w>(lang: &Language, word: &'w str) -> Option { [INFO] [stdout] 298 + fn word_stem(lang: &Language, word: &str) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking hyper-rustls v0.24.2 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking reqwest-eventsource v0.4.0 [INFO] [stderr] Checking async-openai v0.19.1 (https://github.com/emk/async-openai.git?branch=transcription_verbose_json#930778ba) [INFO] [stderr] Checking substudy v0.6.10 (/opt/rustwide/workdir/substudy) [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> substudy/tests/tests.rs:68:15 [INFO] [stdout] | [INFO] [stdout] 68 | .args(&["export", "csv"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["export", "csv"]` [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: the borrowed expression implements the required traits [INFO] [stdout] --> substudy/tests/tests.rs:86:15 [INFO] [stdout] | [INFO] [stdout] 86 | .args(&["export", "review"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["export", "review"]` [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] --> substudy/tests/tests.rs:103:15 [INFO] [stdout] | [INFO] [stdout] 103 | .args(&["export", "tracks"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["export", "tracks"]` [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] --> substudy/tests/tests.rs:118:15 [INFO] [stdout] | [INFO] [stdout] 118 | .args(&["list", "tracks"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `["list", "tracks"]` [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: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/align.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [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: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:265:18 [INFO] [stdout] | [INFO] [stdout] 265 | static STYLE1B: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:266:18 [INFO] [stdout] | [INFO] [stdout] 266 | static STYLE1E: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:267:18 [INFO] [stdout] | [INFO] [stdout] 267 | static STYLE2B: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:268:18 [INFO] [stdout] | [INFO] [stdout] 268 | static STYLE2E: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/clean.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/contexts.rs:108:17 [INFO] [stdout] | [INFO] [stdout] 108 | prev: prev, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `prev` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/align.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [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: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:265:18 [INFO] [stdout] | [INFO] [stdout] 265 | static STYLE1B: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:266:18 [INFO] [stdout] | [INFO] [stdout] 266 | static STYLE1E: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:267:18 [INFO] [stdout] | [INFO] [stdout] 267 | static STYLE2B: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> substudy/src/align.rs:268:18 [INFO] [stdout] | [INFO] [stdout] 268 | static STYLE2E: &'static str = ""; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | subtitles: subtitles, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `subtitles` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | language: language, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | video: video, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `video` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | foreign: foreign, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `foreign` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | native: native, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `native` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | file_stem: file_stem, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `file_stem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | foreign_lang: foreign_lang, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreign_lang` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/clean.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | index: index, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | image_path: image_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/contexts.rs:108:17 [INFO] [stdout] | [INFO] [stdout] 108 | prev: prev, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `prev` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | audio_path: audio_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `audio_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | subtitles: subtitles, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `subtitles` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | language: language, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:181:13 [INFO] [stdout] | [INFO] [stdout] 181 | video: video, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `video` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | foreign: foreign, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `foreign` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | native: native, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `native` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/exporter.rs:186:13 [INFO] [stdout] | [INFO] [stdout] 186 | file_stem: file_stem, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `file_stem` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | foreign_lang: foreign_lang, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `foreign_lang` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | index: index, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | image_path: image_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/export/review/mod.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | audio_path: audio_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `audio_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/merge.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/merge.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/srt.rs:163:28 [INFO] [stdout] | [INFO] [stdout] 163 | Subtitle { index: index, period: p, lines: l } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/time.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 73 | begin: begin, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `begin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/time.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | end: end, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/video.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | metadata: metadata, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `metadata` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/srt.rs:163:28 [INFO] [stdout] | [INFO] [stdout] 163 | Subtitle { index: index, period: p, lines: l } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/time.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 73 | begin: begin, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `begin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/time.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | end: end, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> substudy/src/video.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | metadata: metadata, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `metadata` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> substudy/src/video.rs:108:21 [INFO] [stdout] | [INFO] [stdout] 108 | pub struct Fraction(Ratio); [INFO] [stdout] | -------- ^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Fraction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/ai.rs:113:40 [INFO] [stdout] | [INFO] [stdout] 113 | match r.perform_cached(&cache).await { [INFO] [stdout] | ^^^^^^ help: change this to: `cache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> substudy/src/align.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | if !(i < items.len()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(i >= items.len())` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/align.rs:161:42 [INFO] [stdout] | [INFO] [stdout] 161 | let srt_es = SubtitleFile::from_path(&path_es).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `path_es` [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] --> substudy/src/align.rs:163:42 [INFO] [stdout] | [INFO] [stdout] 163 | let srt_en = SubtitleFile::from_path(&path_en).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `path_en` [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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/align.rs:191:15 [INFO] [stdout] | [INFO] [stdout] 191 | .map(|&(ref indices1, ref indices2)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 191 - .map(|&(ref indices1, ref indices2)| { [INFO] [stdout] 191 + .map(|(indices1, indices2)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/align.rs:192:27 [INFO] [stdout] | [INFO] [stdout] 192 | (merge(file1, &indices1), merge(file2, &indices2)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `indices1` [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] --> substudy/src/align.rs:192:52 [INFO] [stdout] | [INFO] [stdout] 192 | (merge(file1, &indices1), merge(file2, &indices2)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `indices2` [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 pattern creates a reference to a reference [INFO] [stdout] --> substudy/src/align.rs:204:14 [INFO] [stdout] | [INFO] [stdout] 204 | Some(ref file2) => align_files(file1, file2), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 204 - Some(ref file2) => align_files(file1, file2), [INFO] [stdout] 204 + Some(file2) => align_files(file1, file2), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/align.rs:231:21 [INFO] [stdout] | [INFO] [stdout] 231 | aligned.retain(|&(ref foreign, _)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 231 - aligned.retain(|&(ref foreign, _)| { [INFO] [stdout] 231 + aligned.retain(|(foreign, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/align.rs:254:44 [INFO] [stdout] | [INFO] [stdout] 254 | let cleaned = strip_formatting(&l); [INFO] [stdout] | ^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> substudy/src/align.rs:274:21 [INFO] [stdout] | [INFO] [stdout] 274 | .map(|pair| match pair { [INFO] [stdout] | _____________________^ [INFO] [stdout] 275 | | &(None, None) => panic!("Shouldn't have empty alignment pair!"), [INFO] [stdout] 276 | | &(Some(ref sub), None) => clone_as(sub, STYLE1B, STYLE1E), [INFO] [stdout] 277 | | &(None, Some(ref sub)) => clone_as(sub, STYLE2B, STYLE2E), [INFO] [stdout] ... | [INFO] [stdout] 286 | | }) [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: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 274 ~ .map(|pair| match *pair { [INFO] [stdout] 275 ~ (None, None) => panic!("Shouldn't have empty alignment pair!"), [INFO] [stdout] 276 ~ (Some(ref sub), None) => clone_as(sub, STYLE1B, STYLE1E), [INFO] [stdout] 277 ~ (None, Some(ref sub)) => clone_as(sub, STYLE2B, STYLE2E), [INFO] [stdout] 278 ~ (Some(ref sub1), Some(ref sub2)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/align.rs:327:42 [INFO] [stdout] | [INFO] [stdout] 327 | let srt_es = SubtitleFile::from_path(&path_es).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `path_es` [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] --> substudy/src/align.rs:329:42 [INFO] [stdout] | [INFO] [stdout] 329 | let srt_en = SubtitleFile::from_path(&path_en).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `path_en` [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] --> substudy/src/align.rs:331:44 [INFO] [stdout] | [INFO] [stdout] 331 | let expected = SubtitleFile::from_path(&path_combined).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `path_combined` [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] --> substudy/src/clean.rs:18:28 [INFO] [stdout] | [INFO] [stdout] 18 | formatting.replace_all(&line, "") [INFO] [stdout] | ^^^^^ help: change this to: `line` [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] --> substudy/src/clean.rs:45:29 [INFO] [stdout] | [INFO] [stdout] 45 | .map(|l| clean_line(&l)) [INFO] [stdout] | ^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> substudy/src/clean.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | .filter(|l| l.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!l.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: length comparison to zero [INFO] [stdout] --> substudy/src/clean.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | if lines.len() == 0 { [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] --> substudy/src/contexts.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | curr: f(&self.curr), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.curr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> substudy/src/contexts.rs:55:6 [INFO] [stdout] | [INFO] [stdout] 55 | impl<'a, T: Clone> Context<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 55 - impl<'a, T: Clone> Context<&'a T> { [INFO] [stdout] 55 + impl Context<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> substudy/src/contexts.rs:128:6 [INFO] [stdout] | [INFO] [stdout] 128 | impl<'a, T> ItemsInContextExt for &'a [T] { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 128 - impl<'a, T> ItemsInContextExt for &'a [T] { [INFO] [stdout] 128 + impl ItemsInContextExt for &[T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/contexts.rs:146:20 [INFO] [stdout] | [INFO] [stdout] 146 | slice: &self, [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/anki/mod.rs:107:19 [INFO] [stdout] | [INFO] [stdout] 107 | .filter(|&&(ref f, _)| f.is_some()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 107 - .filter(|&&(ref f, _)| f.is_some()) [INFO] [stdout] 107 + .filter(|&(f, _)| f.is_some()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/anki/mod.rs:123:32 [INFO] [stdout] | [INFO] [stdout] 123 | let foreign = ctx.map(|&(ref f, _)| f).flatten(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 123 - let foreign = ctx.map(|&(ref f, _)| f).flatten(); [INFO] [stdout] 123 + let foreign = ctx.map(|(f, _)| f).flatten(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/anki/mod.rs:124:31 [INFO] [stdout] | [INFO] [stdout] 124 | let native = ctx.map(|&(_, ref n)| n).flatten(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 124 - let native = ctx.map(|&(_, ref n)| n).flatten(); [INFO] [stdout] 124 + let native = ctx.map(|(_, n)| n).flatten(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> substudy/src/export/exporter.rs:178:43 [INFO] [stdout] | [INFO] [stdout] 178 | let native = native_subtitles.map(|subs| LanguageResources::new(subs)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `LanguageResources::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/review/mod.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | let (i, &(ref foreign, ref native)) = sub; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 41 - let (i, &(ref foreign, ref native)) = sub; [INFO] [stdout] 41 + let (i, (foreign, native)) = sub; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> substudy/src/export/review/mod.rs:69:51 [INFO] [stdout] | [INFO] [stdout] 69 | handlebars.register_template_string("review", template.to_owned())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `template` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> substudy/src/export/tracks.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | result.push_str("…"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('…')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> substudy/src/export/tracks.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | prev.text.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `prev.text.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/import/whisper.rs:102:43 [INFO] [stdout] | [INFO] [stdout] 102 | let normalized = NON_WORD.replace_all(&text, "").to_string(); [INFO] [stdout] | ^^^^^ help: change this to: `text` [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: field `0` is never read [INFO] [stdout] --> substudy/src/video.rs:108:21 [INFO] [stdout] | [INFO] [stdout] 108 | pub struct Fraction(Ratio); [INFO] [stdout] | -------- ^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Fraction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> substudy/src/import/whisper.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / pub fn from_str(s: &str) -> Result { [INFO] [stdout] 154 | | serde_json::from_str(s) [INFO] [stdout] 155 | | .with_context(|| format!("Failed to parse Whisper JSON string: {:?}", s)) [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> substudy/src/import/whisper.rs:217:36 [INFO] [stdout] | [INFO] [stdout] 217 | segment_indices.extend(repeat(segment_idx).take(diff_words.len())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(segment_idx, diff_words.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/ai.rs:113:40 [INFO] [stdout] | [INFO] [stdout] 113 | match r.perform_cached(&cache).await { [INFO] [stdout] | ^^^^^^ help: change this to: `cache` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> substudy/src/align.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | if !(i < items.len()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(i >= items.len())` [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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/align.rs:191:15 [INFO] [stdout] | [INFO] [stdout] 191 | .map(|&(ref indices1, ref indices2)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 191 - .map(|&(ref indices1, ref indices2)| { [INFO] [stdout] 191 + .map(|(indices1, indices2)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/align.rs:192:27 [INFO] [stdout] | [INFO] [stdout] 192 | (merge(file1, &indices1), merge(file2, &indices2)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `indices1` [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] --> substudy/src/align.rs:192:52 [INFO] [stdout] | [INFO] [stdout] 192 | (merge(file1, &indices1), merge(file2, &indices2)) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `indices2` [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 pattern creates a reference to a reference [INFO] [stdout] --> substudy/src/align.rs:204:14 [INFO] [stdout] | [INFO] [stdout] 204 | Some(ref file2) => align_files(file1, file2), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 204 - Some(ref file2) => align_files(file1, file2), [INFO] [stdout] 204 + Some(file2) => align_files(file1, file2), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/align.rs:231:21 [INFO] [stdout] | [INFO] [stdout] 231 | aligned.retain(|&(ref foreign, _)| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 231 - aligned.retain(|&(ref foreign, _)| { [INFO] [stdout] 231 + aligned.retain(|(foreign, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/align.rs:254:44 [INFO] [stdout] | [INFO] [stdout] 254 | let cleaned = strip_formatting(&l); [INFO] [stdout] | ^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> substudy/src/align.rs:274:21 [INFO] [stdout] | [INFO] [stdout] 274 | .map(|pair| match pair { [INFO] [stdout] | _____________________^ [INFO] [stdout] 275 | | &(None, None) => panic!("Shouldn't have empty alignment pair!"), [INFO] [stdout] 276 | | &(Some(ref sub), None) => clone_as(sub, STYLE1B, STYLE1E), [INFO] [stdout] 277 | | &(None, Some(ref sub)) => clone_as(sub, STYLE2B, STYLE2E), [INFO] [stdout] ... | [INFO] [stdout] 286 | | }) [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: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 274 ~ .map(|pair| match *pair { [INFO] [stdout] 275 ~ (None, None) => panic!("Shouldn't have empty alignment pair!"), [INFO] [stdout] 276 ~ (Some(ref sub), None) => clone_as(sub, STYLE1B, STYLE1E), [INFO] [stdout] 277 ~ (None, Some(ref sub)) => clone_as(sub, STYLE2B, STYLE2E), [INFO] [stdout] 278 ~ (Some(ref sub1), Some(ref sub2)) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/clean.rs:18:28 [INFO] [stdout] | [INFO] [stdout] 18 | formatting.replace_all(&line, "") [INFO] [stdout] | ^^^^^ help: change this to: `line` [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] --> substudy/src/clean.rs:45:29 [INFO] [stdout] | [INFO] [stdout] 45 | .map(|l| clean_line(&l)) [INFO] [stdout] | ^^ help: change this to: `l` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> substudy/src/clean.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | .filter(|l| l.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!l.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: length comparison to zero [INFO] [stdout] --> substudy/src/clean.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | if lines.len() == 0 { [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: redundant closure [INFO] [stdout] --> substudy/src/import/whisper.rs:403:25 [INFO] [stdout] | [INFO] [stdout] 403 | .filter_map(|word| normalize_word_text_for_diff(word)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `normalize_word_text_for_diff` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/import/whisper.rs:402:20 [INFO] [stdout] | [INFO] [stdout] 402 | .split(&segment) [INFO] [stdout] | ^^^^^^^^ help: change this to: `segment` [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] --> substudy/src/contexts.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | curr: f(&self.curr), [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `self.curr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> substudy/src/contexts.rs:55:6 [INFO] [stdout] | [INFO] [stdout] 55 | impl<'a, T: Clone> Context<&'a T> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 55 - impl<'a, T: Clone> Context<&'a T> { [INFO] [stdout] 55 + impl Context<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> substudy/src/contexts.rs:128:6 [INFO] [stdout] | [INFO] [stdout] 128 | impl<'a, T> ItemsInContextExt for &'a [T] { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 128 - impl<'a, T> ItemsInContextExt for &'a [T] { [INFO] [stdout] 128 + impl ItemsInContextExt for &[T] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/contexts.rs:146:20 [INFO] [stdout] | [INFO] [stdout] 146 | slice: &self, [INFO] [stdout] | ^^^^^ help: change this to: `self` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> substudy/src/import/whisper.rs:579:14 [INFO] [stdout] | [INFO] [stdout] 579 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/merge.rs:18:37 [INFO] [stdout] | [INFO] [stdout] 18 | for word in space.split(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [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] --> substudy/src/merge.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | if 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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/merge.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | line.push_str(&word); [INFO] [stdout] | ^^^^^ help: change this to: `word` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> substudy/src/merge.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | line.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `line.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/merge.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | line.push_str(&word); [INFO] [stdout] | ^^^^^ help: change this to: `word` [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] --> substudy/src/merge.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | if 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] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> substudy/src/segment.rs:144:23 [INFO] [stdout] | [INFO] [stdout] 144 | let end_idx = bp.index as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `bp.index` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/services/oai/transcribe.rs:144:45 [INFO] [stdout] | [INFO] [stdout] 144 | let whisper_json = transcribe_subtitles(&ui, video, prompt, lang).await?; [INFO] [stdout] | ^^^ help: change this to: `ui` [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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/anki/mod.rs:107:19 [INFO] [stdout] | [INFO] [stdout] 107 | .filter(|&&(ref f, _)| f.is_some()) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 107 - .filter(|&&(ref f, _)| f.is_some()) [INFO] [stdout] 107 + .filter(|&(f, _)| f.is_some()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/anki/mod.rs:123:32 [INFO] [stdout] | [INFO] [stdout] 123 | let foreign = ctx.map(|&(ref f, _)| f).flatten(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 123 - let foreign = ctx.map(|&(ref f, _)| f).flatten(); [INFO] [stdout] 123 + let foreign = ctx.map(|(f, _)| f).flatten(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/anki/mod.rs:124:31 [INFO] [stdout] | [INFO] [stdout] 124 | let native = ctx.map(|&(_, ref n)| n).flatten(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 124 - let native = ctx.map(|&(_, ref n)| n).flatten(); [INFO] [stdout] 124 + let native = ctx.map(|(_, n)| n).flatten(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/services/oai/transcribe.rs:186:19 [INFO] [stdout] | [INFO] [stdout] 186 | video.extract(&ui, &extractions).await?; [INFO] [stdout] | ^^^ help: change this to: `ui` [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: redundant closure [INFO] [stdout] --> substudy/src/export/exporter.rs:178:43 [INFO] [stdout] | [INFO] [stdout] 178 | let native = native_subtitles.map(|subs| LanguageResources::new(subs)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `LanguageResources::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> substudy/src/services/oai/translate.rs:101:8 [INFO] [stdout] | [INFO] [stdout] 101 | if current_chunk.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_chunk.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] --> substudy/src/services/oai/translate.rs:109:59 [INFO] [stdout] | [INFO] [stdout] 109 | let translated = TranslationRequest::perform_requests(&ui, requests.clone()) [INFO] [stdout] | ^^^ help: change this to: `ui` [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: dereferencing a tuple pattern where every element takes a reference [INFO] [stdout] --> substudy/src/export/review/mod.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | let (i, &(ref foreign, ref native)) = sub; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] help: try removing the `&` and `ref` parts [INFO] [stdout] | [INFO] [stdout] 41 - let (i, &(ref foreign, ref native)) = sub; [INFO] [stdout] 41 + let (i, (foreign, native)) = sub; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_owned` [INFO] [stdout] --> substudy/src/export/review/mod.rs:69:51 [INFO] [stdout] | [INFO] [stdout] 69 | handlebars.register_template_string("review", template.to_owned())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `template` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> substudy/src/export/tracks.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | result.push_str("…"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('…')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> substudy/src/export/tracks.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | prev.text.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `prev.text.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `resp.choices.get(0)` [INFO] [stdout] --> substudy/src/services/oai/mod.rs:75:18 [INFO] [stdout] | [INFO] [stdout] 75 | let choice = resp.choices.get(0).ok_or_else(|| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `resp.choices.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tool_calls.get(0)` [INFO] [stdout] --> substudy/src/services/oai/mod.rs:82:21 [INFO] [stdout] | [INFO] [stdout] 82 | let tool_call = tool_calls [INFO] [stdout] | _____________________^ [INFO] [stdout] 83 | | .get(0) [INFO] [stdout] | |_______________^ help: try: `tool_calls.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/import/whisper.rs:102:43 [INFO] [stdout] | [INFO] [stdout] 102 | let normalized = NON_WORD.replace_all(&text, "").to_string(); [INFO] [stdout] | ^^^^^ help: change this to: `text` [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: implementation of inherent method `to_string(&self) -> String` for type `srt::Subtitle` [INFO] [stdout] --> substudy/src/srt.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / pub fn to_string(&self) -> String { [INFO] [stdout] 41 | | format!( [INFO] [stdout] 42 | | "{}\n{} --> {}\n{}\n", [INFO] [stdout] 43 | | self.index, [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `srt::Subtitle` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> substudy/src/srt.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] ... | [INFO] [stdout] 71 | | .context("could not parse subtitles")?) [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> substudy/src/srt.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | / Ok(grammar::subtitle_file(data.trim_start_matches("\u{FEFF}")) [INFO] [stdout] 71 | | .context("could not parse subtitles")?) [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 70 ~ grammar::subtitle_file(data.trim_start_matches("\u{FEFF}")) [INFO] [stdout] 71 ~ .context("could not parse subtitles") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> substudy/src/srt.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / Ok(SubtitleFile::from_str(&data) [INFO] [stdout] 84 | | .with_context(|| format!("could not parse {}", path.display()))?) [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 83 ~ SubtitleFile::from_str(&data) [INFO] [stdout] 84 ~ .with_context(|| format!("could not parse {}", path.display())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> substudy/src/import/whisper.rs:153:5 [INFO] [stdout] | [INFO] [stdout] 153 | / pub fn from_str(s: &str) -> Result { [INFO] [stdout] 154 | | serde_json::from_str(s) [INFO] [stdout] 155 | | .with_context(|| format!("Failed to parse Whisper JSON string: {:?}", s)) [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> substudy/src/srt.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | Ok(clean_subtitle_file(&raw)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 90 - Ok(clean_subtitle_file(&raw)?) [INFO] [stdout] 90 + clean_subtitle_file(&raw) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `srt::SubtitleFile` [INFO] [stdout] --> substudy/src/srt.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | / pub fn to_string(&self) -> String { [INFO] [stdout] 95 | | let subs: Vec = self.subtitles.iter().map(|s| s.to_string()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 101 | | format!("\u{FEFF}{}", subs.join("\n")) [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `srt::SubtitleFile` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> substudy/src/import/whisper.rs:217:36 [INFO] [stdout] | [INFO] [stdout] 217 | segment_indices.extend(repeat(segment_idx).take(diff_words.len())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(segment_idx, diff_words.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/srt.rs:222:43 [INFO] [stdout] | [INFO] [stdout] 222 | let srt = SubtitleFile::from_path(&path).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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] --> substudy/src/srt.rs:286:46 [INFO] [stdout] | [INFO] [stdout] 286 | let srt_es = SubtitleFile::from_path(&path_es).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `path_es` [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] --> substudy/src/srt.rs:290:46 [INFO] [stdout] | [INFO] [stdout] 290 | let srt_en = SubtitleFile::from_path(&path_en).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `path_en` [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: redundant closure [INFO] [stdout] --> substudy/src/import/whisper.rs:403:25 [INFO] [stdout] | [INFO] [stdout] 403 | .filter_map(|word| normalize_word_text_for_diff(word)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `normalize_word_text_for_diff` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/import/whisper.rs:402:20 [INFO] [stdout] | [INFO] [stdout] 402 | .split(&segment) [INFO] [stdout] | ^^^^^^^^ help: change this to: `segment` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> substudy/src/import/whisper.rs:579:14 [INFO] [stdout] | [INFO] [stdout] 579 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> substudy/src/video.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | / match self { [INFO] [stdout] 234 | | &ExtractionSpec::Image { time } => time, [INFO] [stdout] 235 | | &ExtractionSpec::Audio { period, .. } => period.begin(), [INFO] [stdout] 236 | | } [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: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 233 ~ match *self { [INFO] [stdout] 234 ~ ExtractionSpec::Image { time } => time, [INFO] [stdout] 235 ~ ExtractionSpec::Audio { period, .. } => period.begin(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/merge.rs:18:37 [INFO] [stdout] | [INFO] [stdout] 18 | for word in space.split(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [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] --> substudy/src/merge.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | if 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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/merge.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | line.push_str(&word); [INFO] [stdout] | ^^^^^ help: change this to: `word` [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: calling `push_str()` using a single-character string literal [INFO] [stdout] --> substudy/src/merge.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | line.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `line.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/merge.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | line.push_str(&word); [INFO] [stdout] | ^^^^^ help: change this to: `word` [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] --> substudy/src/merge.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | if 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] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> substudy/src/segment.rs:144:23 [INFO] [stdout] | [INFO] [stdout] 144 | let end_idx = bp.index as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `bp.index` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/services/oai/transcribe.rs:144:45 [INFO] [stdout] | [INFO] [stdout] 144 | let whisper_json = transcribe_subtitles(&ui, video, prompt, lang).await?; [INFO] [stdout] | ^^^ help: change this to: `ui` [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] --> substudy/src/services/oai/transcribe.rs:186:19 [INFO] [stdout] | [INFO] [stdout] 186 | video.extract(&ui, &extractions).await?; [INFO] [stdout] | ^^^ help: change this to: `ui` [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] --> substudy/src/services/oai/translate.rs:101:8 [INFO] [stdout] | [INFO] [stdout] 101 | if current_chunk.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!current_chunk.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] --> substudy/src/services/oai/translate.rs:109:59 [INFO] [stdout] | [INFO] [stdout] 109 | let translated = TranslationRequest::perform_requests(&ui, requests.clone()) [INFO] [stdout] | ^^^ help: change this to: `ui` [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] --> substudy/src/main.rs:254:49 [INFO] [stdout] | [INFO] [stdout] 254 | ExportFormat::Anki { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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] --> substudy/src/main.rs:255:48 [INFO] [stdout] | [INFO] [stdout] 255 | ExportFormat::Csv { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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] --> substudy/src/main.rs:256:51 [INFO] [stdout] | [INFO] [stdout] 256 | ExportFormat::Review { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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] --> substudy/src/main.rs:257:51 [INFO] [stdout] | [INFO] [stdout] 257 | ExportFormat::Tracks { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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: accessing first element with `resp.choices.get(0)` [INFO] [stdout] --> substudy/src/services/oai/mod.rs:75:18 [INFO] [stdout] | [INFO] [stdout] 75 | let choice = resp.choices.get(0).ok_or_else(|| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `resp.choices.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `tool_calls.get(0)` [INFO] [stdout] --> substudy/src/services/oai/mod.rs:82:21 [INFO] [stdout] | [INFO] [stdout] 82 | let tool_call = tool_calls [INFO] [stdout] | _____________________^ [INFO] [stdout] 83 | | .get(0) [INFO] [stdout] | |_______________^ help: try: `tool_calls.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `srt::Subtitle` [INFO] [stdout] --> substudy/src/srt.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / pub fn to_string(&self) -> String { [INFO] [stdout] 41 | | format!( [INFO] [stdout] 42 | | "{}\n{} --> {}\n{}\n", [INFO] [stdout] 43 | | self.index, [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `srt::Subtitle` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> substudy/src/srt.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] ... | [INFO] [stdout] 71 | | .context("could not parse subtitles")?) [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> substudy/src/srt.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | / Ok(grammar::subtitle_file(data.trim_start_matches("\u{FEFF}")) [INFO] [stdout] 71 | | .context("could not parse subtitles")?) [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 70 ~ grammar::subtitle_file(data.trim_start_matches("\u{FEFF}")) [INFO] [stdout] 71 ~ .context("could not parse subtitles") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> substudy/src/srt.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / Ok(SubtitleFile::from_str(&data) [INFO] [stdout] 84 | | .with_context(|| format!("could not parse {}", path.display()))?) [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 83 ~ SubtitleFile::from_str(&data) [INFO] [stdout] 84 ~ .with_context(|| format!("could not parse {}", path.display())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> substudy/src/srt.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | Ok(clean_subtitle_file(&raw)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 90 - Ok(clean_subtitle_file(&raw)?) [INFO] [stdout] 90 + clean_subtitle_file(&raw) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `srt::SubtitleFile` [INFO] [stdout] --> substudy/src/srt.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 94 | / pub fn to_string(&self) -> String { [INFO] [stdout] 95 | | let subs: Vec = self.subtitles.iter().map(|s| s.to_string()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 101 | | format!("\u{FEFF}{}", subs.join("\n")) [INFO] [stdout] 102 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `srt::SubtitleFile` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> substudy/src/main.rs:478:41 [INFO] [stdout] | [INFO] [stdout] 478 | let foreign_lang = foreign_lang.map(|f| Lang::iso639(f)).transpose()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Lang::iso639` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/clean.rs:16:31 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn strip_formatting(line: &str) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 16 | pub fn strip_formatting(line: &str) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/contexts.rs:125:25 [INFO] [stdout] | [INFO] [stdout] 125 | fn items_in_context(&self) -> ItemsInContext; [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 125 | fn items_in_context(&self) -> ItemsInContext<'_, Self::Item>; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/contexts.rs:131:25 [INFO] [stdout] | [INFO] [stdout] 131 | fn items_in_context(&self) -> ItemsInContext { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 131 | fn items_in_context(&self) -> ItemsInContext<'_, Self::Item> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/contexts.rs:144:25 [INFO] [stdout] | [INFO] [stdout] 144 | fn items_in_context(&self) -> ItemsInContext { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 144 | fn items_in_context(&self) -> ItemsInContext<'_, Self::Item> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/segment.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | fn new(word: &str) -> WordInfo { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 43 | fn new(word: &str) -> WordInfo<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> substudy/src/video.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | / match self { [INFO] [stdout] 234 | | &ExtractionSpec::Image { time } => time, [INFO] [stdout] 235 | | &ExtractionSpec::Audio { period, .. } => period.begin(), [INFO] [stdout] 236 | | } [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: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 233 ~ match *self { [INFO] [stdout] 234 ~ ExtractionSpec::Image { time } => time, [INFO] [stdout] 235 ~ ExtractionSpec::Audio { period, .. } => period.begin(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> substudy/src/main.rs:254:49 [INFO] [stdout] | [INFO] [stdout] 254 | ExportFormat::Anki { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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] --> substudy/src/main.rs:255:48 [INFO] [stdout] | [INFO] [stdout] 255 | ExportFormat::Csv { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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] --> substudy/src/main.rs:256:51 [INFO] [stdout] | [INFO] [stdout] 256 | ExportFormat::Review { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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] --> substudy/src/main.rs:257:51 [INFO] [stdout] | [INFO] [stdout] 257 | ExportFormat::Tracks { video, .. } => &video, [INFO] [stdout] | ^^^^^^ help: change this to: `video` [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: redundant closure [INFO] [stdout] --> substudy/src/main.rs:478:41 [INFO] [stdout] | [INFO] [stdout] 478 | let foreign_lang = foreign_lang.map(|f| Lang::iso639(f)).transpose()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Lang::iso639` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/clean.rs:16:31 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn strip_formatting(line: &str) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 16 | pub fn strip_formatting(line: &str) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/contexts.rs:125:25 [INFO] [stdout] | [INFO] [stdout] 125 | fn items_in_context(&self) -> ItemsInContext; [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 125 | fn items_in_context(&self) -> ItemsInContext<'_, Self::Item>; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/contexts.rs:131:25 [INFO] [stdout] | [INFO] [stdout] 131 | fn items_in_context(&self) -> ItemsInContext { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 131 | fn items_in_context(&self) -> ItemsInContext<'_, Self::Item> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/contexts.rs:144:25 [INFO] [stdout] | [INFO] [stdout] 144 | fn items_in_context(&self) -> ItemsInContext { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 144 | fn items_in_context(&self) -> ItemsInContext<'_, Self::Item> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> substudy/src/segment.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | fn new(word: &str) -> WordInfo { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 43 | fn new(word: &str) -> WordInfo<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 11s [INFO] running `Command { std: "docker" "inspect" "ecf6b78b05b3bf3c65fb7624f055305168d1935cd3eded9e09eb811e3a68be5d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ecf6b78b05b3bf3c65fb7624f055305168d1935cd3eded9e09eb811e3a68be5d", kill_on_drop: false }` [INFO] [stdout] ecf6b78b05b3bf3c65fb7624f055305168d1935cd3eded9e09eb811e3a68be5d