[INFO] cloning repository https://github.com/bolorundurowb/media-organizer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bolorundurowb/media-organizer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbolorundurowb%2Fmedia-organizer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbolorundurowb%2Fmedia-organizer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] aa37b76c2af3378064f219e4891685480a73eef6 [INFO] linting bolorundurowb/media-organizer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbolorundurowb%2Fmedia-organizer" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/bolorundurowb/media-organizer [INFO] finished tweaking git repo https://github.com/bolorundurowb/media-organizer [INFO] tweaked toml for git repo https://github.com/bolorundurowb/media-organizer written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/bolorundurowb/media-organizer 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/bolorundurowb/media-organizer already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded selectors v0.31.0 [INFO] [stderr] Downloaded inline_colorization v0.1.6 [INFO] [stderr] Downloaded scraper v0.24.0 [INFO] [stderr] Downloaded rustls v0.23.21 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] b359feb62c49dc04e0883c563a29a0a9ee68552bb985c435f128fbcb6337f714 [INFO] running `Command { std: "docker" "start" "-a" "b359feb62c49dc04e0883c563a29a0a9ee68552bb985c435f128fbcb6337f714", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b359feb62c49dc04e0883c563a29a0a9ee68552bb985c435f128fbcb6337f714", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b359feb62c49dc04e0883c563a29a0a9ee68552bb985c435f128fbcb6337f714", kill_on_drop: false }` [INFO] [stdout] b359feb62c49dc04e0883c563a29a0a9ee68552bb985c435f128fbcb6337f714 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 5a6a096db8aabcaa0ad6eae7c85f33f24c1abe3a72c03921a9af93c35cd06e1e [INFO] running `Command { std: "docker" "start" "-a" "5a6a096db8aabcaa0ad6eae7c85f33f24c1abe3a72c03921a9af93c35cd06e1e", kill_on_drop: false }` [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Compiling siphasher v1.0.1 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Checking bytes v1.9.0 [INFO] [stderr] Compiling proc-macro2 v1.0.93 [INFO] [stderr] Compiling cc v1.2.9 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling pkg-config v0.3.31 [INFO] [stderr] Checking litemap v0.7.4 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Checking icu_locid_transform_data v1.5.0 [INFO] [stderr] Checking bitflags v2.7.0 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling httparse v1.9.5 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Compiling openssl v0.10.68 [INFO] [stderr] Checking precomputed-hash v0.1.1 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking icu_properties_data v1.5.0 [INFO] [stderr] Checking icu_normalizer_data v1.5.0 [INFO] [stderr] Compiling native-tls v0.2.12 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking mac v0.1.1 [INFO] [stderr] Checking dtoa v1.0.9 [INFO] [stderr] Compiling serde_json v1.0.135 [INFO] [stderr] Checking dtoa-short v0.3.5 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking servo_arc v0.4.0 [INFO] [stderr] Checking futf v0.1.5 [INFO] [stderr] Checking rustls-pki-types v1.10.1 [INFO] [stderr] Checking getopts v0.2.24 [INFO] [stderr] Checking ipnet v2.10.1 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Checking http v1.2.0 [INFO] [stderr] Checking ego-tree v0.10.0 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking tendril v0.4.3 [INFO] [stderr] Checking inline_colorization v0.1.6 [INFO] [stderr] Compiling syn v2.0.96 [INFO] [stderr] Compiling phf_codegen v0.11.3 [INFO] [stderr] Compiling string_cache_codegen v0.5.4 [INFO] [stderr] Compiling selectors v0.31.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Compiling web_atoms v0.1.3 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Checking http-body-util v0.1.2 [INFO] [stderr] Compiling openssl-sys v0.9.104 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.5 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Compiling match_token v0.35.0 [INFO] [stderr] Checking tokio v1.43.0 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking cssparser v0.35.0 [INFO] [stderr] Checking zerofrom v0.1.5 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking tokio-util v0.7.13 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking h2 v0.4.7 [INFO] [stderr] Checking markup5ever v0.35.0 [INFO] [stderr] Checking html5ever v0.35.0 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking scraper v0.24.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking hyper v1.5.2 [INFO] [stderr] Checking hyper-util v0.1.10 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.12 [INFO] [stderr] Checking media-organizer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/utils.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use hex; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `write` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs::{write, DirEntry}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/utils.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use hex; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `write` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs::{write, DirEntry}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `search_subtitles_by_imdb_id` is never used [INFO] [stdout] --> src/subtitles.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn search_subtitles_by_imdb_id(file_name: &str, imdb_id: &str) -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_subtitle_download_page_url_by_imdb_id` is never used [INFO] [stdout] --> src/subtitles.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | async fn get_subtitle_download_page_url_by_imdb_id(imdb_id: &str) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_subtitle_download_url` is never used [INFO] [stdout] --> src/subtitles.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | async fn get_subtitle_download_url(subtitle_download_page_url: &str) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `download_subtitle` is never used [INFO] [stdout] --> src/subtitles.rs:52:10 [INFO] [stdout] | [INFO] [stdout] 52 | async fn download_subtitle(file_name: &str, url: &str) -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normalize_url` is never used [INFO] [stdout] --> src/subtitles.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | fn normalize_url(url: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `search_subtitles_by_imdb_id` is never used [INFO] [stdout] --> src/subtitles.rs:4:14 [INFO] [stdout] | [INFO] [stdout] 4 | pub async fn search_subtitles_by_imdb_id(file_name: &str, imdb_id: &str) -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_subtitle_download_page_url_by_imdb_id` is never used [INFO] [stdout] --> src/subtitles.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | async fn get_subtitle_download_page_url_by_imdb_id(imdb_id: &str) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_subtitle_download_url` is never used [INFO] [stdout] --> src/subtitles.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | async fn get_subtitle_download_url(subtitle_download_page_url: &str) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `download_subtitle` is never used [INFO] [stdout] --> src/subtitles.rs:52:10 [INFO] [stdout] | [INFO] [stdout] 52 | async fn download_subtitle(file_name: &str, url: &str) -> Result<(), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normalize_url` is never used [INFO] [stdout] --> src/subtitles.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | fn normalize_url(url: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/movie_processors/files.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | / entry [INFO] [stdout] 77 | | .path() [INFO] [stdout] 78 | | .file_stem() [INFO] [stdout] 79 | | .and_then(|stem| stem.to_str()) [INFO] [stdout] 80 | | .map_or(false, |stem_str| { [INFO] [stdout] 81 | | stem_str.starts_with(raw_file_name) && stem_str != raw_file_name [INFO] [stdout] 82 | | }) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 80 - .map_or(false, |stem_str| { [INFO] [stdout] 80 + .is_some_and(|stem_str| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/movie_processors/files.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | / entry [INFO] [stdout] 92 | | .path() [INFO] [stdout] 93 | | .extension() [INFO] [stdout] 94 | | .and_then(|ext| ext.to_str()) [INFO] [stdout] 95 | | .map_or(false, |ext| VIDEO_FILE_EXTENSIONS.contains(&ext)) [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 95 - .map_or(false, |ext| VIDEO_FILE_EXTENSIONS.contains(&ext)) [INFO] [stdout] 95 + .is_some_and(|ext| VIDEO_FILE_EXTENSIONS.contains(&ext)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/movie_processors/files.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | / entry [INFO] [stdout] 77 | | .path() [INFO] [stdout] 78 | | .file_stem() [INFO] [stdout] 79 | | .and_then(|stem| stem.to_str()) [INFO] [stdout] 80 | | .map_or(false, |stem_str| { [INFO] [stdout] 81 | | stem_str.starts_with(raw_file_name) && stem_str != raw_file_name [INFO] [stdout] 82 | | }) [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 80 - .map_or(false, |stem_str| { [INFO] [stdout] 80 + .is_some_and(|stem_str| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/movie_processors/files.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | / entry [INFO] [stdout] 92 | | .path() [INFO] [stdout] 93 | | .extension() [INFO] [stdout] 94 | | .and_then(|ext| ext.to_str()) [INFO] [stdout] 95 | | .map_or(false, |ext| VIDEO_FILE_EXTENSIONS.contains(&ext)) [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 95 - .map_or(false, |ext| VIDEO_FILE_EXTENSIONS.contains(&ext)) [INFO] [stdout] 95 + .is_some_and(|ext| VIDEO_FILE_EXTENSIONS.contains(&ext)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/movie_processors/directories.rs:41:44 [INFO] [stdout] | [INFO] [stdout] 41 | let subtitle_exists_in_movie_dir = fs::read_dir(directory_path.path()) [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 42 | | .ok() [INFO] [stdout] 43 | | .and_then(|entries| { [INFO] [stdout] 44 | | Some( [INFO] [stdout] ... | [INFO] [stdout] 49 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ let subtitle_exists_in_movie_dir = fs::read_dir(directory_path.path()) [INFO] [stdout] 42 + .ok().map(|entries| entries [INFO] [stdout] 43 + .filter_map(Result::ok) [INFO] [stdout] 44 + .any(|entry| entry.path() == sub_file_entry.path())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/movie_processors/directories.rs:41:44 [INFO] [stdout] | [INFO] [stdout] 41 | let subtitle_exists_in_movie_dir = fs::read_dir(directory_path.path()) [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 42 | | .ok() [INFO] [stdout] 43 | | .and_then(|entries| { [INFO] [stdout] 44 | | Some( [INFO] [stdout] ... | [INFO] [stdout] 49 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ let subtitle_exists_in_movie_dir = fs::read_dir(directory_path.path()) [INFO] [stdout] 42 + .ok().map(|entries| entries [INFO] [stdout] 43 + .filter_map(Result::ok) [INFO] [stdout] 44 + .any(|entry| entry.path() == sub_file_entry.path())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/movie_processors/directories.rs:157:65 [INFO] [stdout] | [INFO] [stdout] 157 | fs::rename(directory_path.path(), &movie_dir_dest_path).expect( [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 158 | | format!( [INFO] [stdout] 159 | | "Failed to rename the movie directory {:?}", [INFO] [stdout] 160 | | movie_dir_dest_path [INFO] [stdout] 161 | | ) [INFO] [stdout] 162 | | .as_str(), [INFO] [stdout] 163 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 157 ~ fs::rename(directory_path.path(), &movie_dir_dest_path).unwrap_or_else(|_| panic!("Failed to rename the movie directory {:?}", [INFO] [stdout] 158 ~ movie_dir_dest_path)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/movie_processors/directories.rs:157:65 [INFO] [stdout] | [INFO] [stdout] 157 | fs::rename(directory_path.path(), &movie_dir_dest_path).expect( [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 158 | | format!( [INFO] [stdout] 159 | | "Failed to rename the movie directory {:?}", [INFO] [stdout] 160 | | movie_dir_dest_path [INFO] [stdout] 161 | | ) [INFO] [stdout] 162 | | .as_str(), [INFO] [stdout] 163 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 157 ~ fs::rename(directory_path.path(), &movie_dir_dest_path).unwrap_or_else(|_| panic!("Failed to rename the movie directory {:?}", [INFO] [stdout] 158 ~ movie_dir_dest_path)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/movie_processors/directories.rs:203:12 [INFO] [stdout] | [INFO] [stdout] 203 | if !deserialization_result.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `deserialization_result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/movie_processors/directories.rs:203:12 [INFO] [stdout] | [INFO] [stdout] 203 | if !deserialization_result.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `deserialization_result.is_err()` [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] --> src/movie_processors/directories.rs:231:42 [INFO] [stdout] | [INFO] [stdout] 231 | let file_path = merge_base_with_file(&directory_path, METADATA_FILE_NAME); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/movie_processors/directories.rs:233:22 [INFO] [stdout] | [INFO] [stdout] 233 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 233 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] 233 + .map_err(|e| io::Error::other(format!("Serialization error: {}", e)))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/movie_processors/directories.rs:259:35 [INFO] [stdout] | [INFO] [stdout] 259 | if path == keep.path() || optional_keep.as_ref().map_or(false, |e| e.path() == path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 259 - if path == keep.path() || optional_keep.as_ref().map_or(false, |e| e.path() == path) { [INFO] [stdout] 259 + if path == keep.path() || optional_keep.as_ref().is_some_and(|e| e.path() == path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movie_processors/directories.rs:231:42 [INFO] [stdout] | [INFO] [stdout] 231 | let file_path = merge_base_with_file(&directory_path, METADATA_FILE_NAME); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/movie_processors/directories.rs:233:22 [INFO] [stdout] | [INFO] [stdout] 233 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 233 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] 233 + .map_err(|e| io::Error::other(format!("Serialization error: {}", e)))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/movie_processors/directories.rs:259:35 [INFO] [stdout] | [INFO] [stdout] 259 | if path == keep.path() || optional_keep.as_ref().map_or(false, |e| e.path() == path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 259 - if path == keep.path() || optional_keep.as_ref().map_or(false, |e| e.path() == path) { [INFO] [stdout] 259 + if path == keep.path() || optional_keep.as_ref().is_some_and(|e| e.path() == path) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/subtitles.rs:25:52 [INFO] [stdout] | [INFO] [stdout] 25 | let download_page_link = normalize_url(&subtitle_download_page_link); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `subtitle_download_page_link` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/subtitles.rs:44:47 [INFO] [stdout] | [INFO] [stdout] 44 | let download_link = normalize_url(&subtitle_download_link); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `subtitle_download_link` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/subtitles.rs:25:52 [INFO] [stdout] | [INFO] [stdout] 25 | let download_page_link = normalize_url(&subtitle_download_page_link); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `subtitle_download_page_link` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/subtitles.rs:44:47 [INFO] [stdout] | [INFO] [stdout] 44 | let download_link = normalize_url(&subtitle_download_link); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `subtitle_download_link` [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] --> src/movies.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | if files.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movies.rs:15:48 [INFO] [stdout] | [INFO] [stdout] 15 | movie_processors::files::process_files(&directory_path, files); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 28.78s [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/movies.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | let directories = fs::read_dir(&directory_path) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: function call inside of `expect` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | .expect(format!("Failed to process directory {:?}", directory.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to process directory {:?}", directory.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/movies.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | if files.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/movies.rs:15:48 [INFO] [stdout] | [INFO] [stdout] 15 | movie_processors::files::process_files(&directory_path, files); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: function call inside of `expect` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:39:57 [INFO] [stdout] | [INFO] [stdout] 39 | fs::rename(&dir_path, &updated_series_dir_path).expect( [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 40 | | format!( [INFO] [stdout] 41 | | "Failed to rename directory {:?} to {:?}", [INFO] [stdout] 42 | | dir_path, updated_series_dir_path [INFO] [stdout] 43 | | ) [INFO] [stdout] 44 | | .as_str(), [INFO] [stdout] 45 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 ~ fs::rename(&dir_path, &updated_series_dir_path).unwrap_or_else(|_| panic!("Failed to rename directory {:?} to {:?}", [INFO] [stdout] 40 + dir_path, updated_series_dir_path)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/movies.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | let directories = fs::read_dir(&directory_path) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tv_shows_processors/directories.rs:70:42 [INFO] [stdout] | [INFO] [stdout] 70 | let file_path = merge_base_with_file(&dir_path, METADATA_FILE_NAME); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `dir_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 can be `std::io::Error::other(_)` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:72:22 [INFO] [stdout] | [INFO] [stdout] 72 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 72 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] 72 + .map_err(|e| io::Error::other(format!("Serialization error: {}", e)))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | .expect(format!("Failed to process directory {:?}", directory.path()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to process directory {:?}", directory.path()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tv_shows.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if directories.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `directories.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: function call inside of `expect` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:39:57 [INFO] [stdout] | [INFO] [stdout] 39 | fs::rename(&dir_path, &updated_series_dir_path).expect( [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 40 | | format!( [INFO] [stdout] 41 | | "Failed to rename directory {:?} to {:?}", [INFO] [stdout] 42 | | dir_path, updated_series_dir_path [INFO] [stdout] 43 | | ) [INFO] [stdout] 44 | | .as_str(), [INFO] [stdout] 45 | | ) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 ~ fs::rename(&dir_path, &updated_series_dir_path).unwrap_or_else(|_| panic!("Failed to rename directory {:?} to {:?}", [INFO] [stdout] 40 + dir_path, updated_series_dir_path)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tv_shows.rs:23:61 [INFO] [stdout] | [INFO] [stdout] 23 | fn delete_excluded_files(dir_path: &Path, included_entries: &Vec) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - fn delete_excluded_files(dir_path: &Path, included_entries: &Vec) -> std::io::Result<()> { [INFO] [stdout] 23 + fn delete_excluded_files(dir_path: &Path, included_entries: &[DirEntry]) -> std::io::Result<()> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tv_shows_processors/directories.rs:70:42 [INFO] [stdout] | [INFO] [stdout] 70 | let file_path = merge_base_with_file(&dir_path, METADATA_FILE_NAME); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `dir_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 can be `std::io::Error::other(_)` [INFO] [stdout] --> src/tv_shows_processors/directories.rs:72:22 [INFO] [stdout] | [INFO] [stdout] 72 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 72 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Serialization error: {}", e)))?; [INFO] [stdout] 72 + .map_err(|e| io::Error::other(format!("Serialization error: {}", e)))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tv_shows.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if directories.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `directories.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tv_shows.rs:23:61 [INFO] [stdout] | [INFO] [stdout] 23 | fn delete_excluded_files(dir_path: &Path, included_entries: &Vec) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - fn delete_excluded_files(dir_path: &Path, included_entries: &Vec) -> std::io::Result<()> { [INFO] [stdout] 23 + fn delete_excluded_files(dir_path: &Path, included_entries: &[DirEntry]) -> std::io::Result<()> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:35:34 [INFO] [stdout] | [INFO] [stdout] 35 | let directory = directory_opt.map(String::from).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | let dir_entries = fs::read_dir(&directory_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | handle_movies(&directory_path, dir_entries).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:35:34 [INFO] [stdout] | [INFO] [stdout] 35 | let directory = directory_opt.map(String::from).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | handle_tv_shows(&directory_path, dir_entries).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | let dir_entries = fs::read_dir(&directory_path).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:50:27 [INFO] [stdout] | [INFO] [stdout] 50 | handle_movies(&directory_path, dir_entries).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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] --> src/main.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | handle_tv_shows(&directory_path, dir_entries).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `directory_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] running `Command { std: "docker" "inspect" "5a6a096db8aabcaa0ad6eae7c85f33f24c1abe3a72c03921a9af93c35cd06e1e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5a6a096db8aabcaa0ad6eae7c85f33f24c1abe3a72c03921a9af93c35cd06e1e", kill_on_drop: false }` [INFO] [stdout] 5a6a096db8aabcaa0ad6eae7c85f33f24c1abe3a72c03921a9af93c35cd06e1e