[INFO] cloning repository https://github.com/dl-alexandre/bible [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dl-alexandre/bible" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdl-alexandre%2Fbible", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdl-alexandre%2Fbible'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 55f287d2b20b57d6cecee7220687fa3eed7b63cc [INFO] linting dl-alexandre/bible against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdl-alexandre%2Fbible" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/dl-alexandre/bible [INFO] finished tweaking git repo https://github.com/dl-alexandre/bible [INFO] tweaked toml for git repo https://github.com/dl-alexandre/bible written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/dl-alexandre/bible 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/dl-alexandre/bible 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 iso8601 v0.6.3 [INFO] [stderr] Downloaded fraction v0.13.1 [INFO] [stderr] Downloaded jsonschema v0.17.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 0304a3596a5a06e38fcfc0ddae49380436cb1ab200d73c7537c20458a96e8176 [INFO] running `Command { std: "docker" "start" "-a" "0304a3596a5a06e38fcfc0ddae49380436cb1ab200d73c7537c20458a96e8176", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0304a3596a5a06e38fcfc0ddae49380436cb1ab200d73c7537c20458a96e8176", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0304a3596a5a06e38fcfc0ddae49380436cb1ab200d73c7537c20458a96e8176", kill_on_drop: false }` [INFO] [stdout] 0304a3596a5a06e38fcfc0ddae49380436cb1ab200d73c7537c20458a96e8176 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] fecdcd0e4562b760e2e8ed20cb8e107311898029feb9d27e1656a9b595b1c040 [INFO] running `Command { std: "docker" "start" "-a" "fecdcd0e4562b760e2e8ed20cb8e107311898029feb9d27e1656a9b595b1c040", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.108 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking mio v1.1.0 [INFO] [stderr] Compiling generic-array v0.14.9 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking indexmap v2.12.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking globset v0.4.18 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Checking bit-vec v0.6.3 [INFO] [stderr] Compiling time-macros v0.2.24 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking ignore v0.4.25 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking bit-set v0.5.3 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Compiling schemars v0.8.22 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking globwalk v0.9.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking fancy-regex v0.11.0 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking fraction v0.13.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking time v0.3.44 [INFO] [stderr] Checking uuid v1.18.1 [INFO] [stderr] Checking num-cmp v0.1.0 [INFO] [stderr] Checking bytecount v0.6.9 [INFO] [stderr] Checking rusty-fork v0.3.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking proptest v1.9.0 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking iso8601 v0.6.3 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Compiling pest_generator v2.8.3 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Compiling schemars_derive v0.8.22 [INFO] [stderr] Compiling pest_derive v2.8.3 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking clap v4.5.51 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.1 [INFO] [stderr] Checking chrono-tz v0.9.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking jsonschema v0.17.1 [INFO] [stderr] Checking tera v1.20.1 [INFO] [stderr] Checking bible-static-generator v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/mapper.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use serde_json; [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: empty line after doc comment [INFO] [stdout] --> src/models.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / /// Generated output structures [INFO] [stdout] 42 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub struct Verse { [INFO] [stdout] | ---------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 42 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/models.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | / /// JSON output structures [INFO] [stdout] 104 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub struct ChapterJson { [INFO] [stdout] | ---------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 104 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/mapper.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | use serde_json; [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: this import is redundant [INFO] [stdout] --> src/mapper.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | use tempfile; [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] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/mapper.rs:638:5 [INFO] [stdout] | [INFO] [stdout] 638 | use serde_json; [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] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/models.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / /// Generated output structures [INFO] [stdout] 42 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub struct Verse { [INFO] [stdout] | ---------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 42 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/models.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | / /// JSON output structures [INFO] [stdout] 104 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 107 | pub struct ChapterJson { [INFO] [stdout] | ---------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 104 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/models.rs:265:5 [INFO] [stdout] | [INFO] [stdout] 265 | use serde_json; [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] [INFO] [stdout] [INFO] [stdout] warning: method `build_id` is never used [INFO] [stdout] --> src/logger.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 60 | impl DiagnosticLogger { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 177 | pub fn build_id(&self) -> &str { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `with_timestamp` is never used [INFO] [stdout] --> src/manifest_generator.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl ManifestGenerator { [INFO] [stdout] | ---------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn with_timestamp(output_dir: &Path, logger: DiagnosticLogger, timestamp: DateTime) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_versification` and `validate_mappings` are never used [INFO] [stdout] --> src/mapper.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 76 | impl CrossVersionMapper { [INFO] [stdout] | ----------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 97 | pub fn set_versification(&mut self, version: &str, scheme: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 535 | pub fn validate_mappings(&self, mappings: &CrossReferenceMap) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ValidationSummary` is never constructed [INFO] [stdout] --> src/mapper.rs:615:12 [INFO] [stdout] | [INFO] [stdout] 615 | pub struct ValidationSummary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/pipeline.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 22 | impl ProcessingPipeline { [INFO] [stdout] | ----------------------- associated function in this implementation [INFO] [stdout] 23 | pub fn new(log_dir: &Path) -> Result { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DuplicateReport` is never constructed [INFO] [stdout] --> src/validation.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | pub struct DuplicateReport { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DuplicateEntry` is never constructed [INFO] [stdout] --> src/validation.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | pub struct DuplicateEntry { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `detect_duplicates` is never used [INFO] [stdout] --> src/validation.rs:227:12 [INFO] [stdout] | [INFO] [stdout] 67 | impl InputValidator { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 227 | pub fn detect_duplicates(&self, verses: &[VerseData]) -> DuplicateReport { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/html_generator.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn generate_chapter_html( [INFO] [stdout] 39 | | &self, [INFO] [stdout] 40 | | chapter: &Chapter, [INFO] [stdout] 41 | | version_code: &str, [INFO] [stdout] ... | [INFO] [stdout] 46 | | _crossrefs: Option<&CrossReferenceMap>, [INFO] [stdout] 47 | | ) -> Result { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/html_generator.rs:200:24 [INFO] [stdout] | [INFO] [stdout] 200 | html.push_str(&format!(" \n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" \n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/html_generator.rs:260:24 [INFO] [stdout] | [INFO] [stdout] 260 | html.push_str(&format!(" \n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" \n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/logger.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | build_files.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 - build_files.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] 165 + build_files.sort_by_key(|a| a.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapper.rs:151:44 [INFO] [stdout] | [INFO] [stdout] 151 | self.detect_enhanced_conflicts(&canonical_ref_str, &version_map, &mut conflicts, versions); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `canonical_ref_str` [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: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/mapper.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | if let Some((book, chapter, _)) = parse_canonical_ref(canonical_ref_str).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok((book, chapter, _))` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 295 - if let Some((book, chapter, _)) = parse_canonical_ref(canonical_ref_str).ok() { [INFO] [stdout] 295 + if let Ok((book, chapter, _)) = parse_canonical_ref(canonical_ref_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:305:21 [INFO] [stdout] | [INFO] [stdout] 305 | / if verses.contains(&canonical_num) && verses.contains(&(canonical_num + 1)) { [INFO] [stdout] 306 | | if verses.contains(&ref_num) && !verses.contains(&(ref_num + 1)) { [INFO] [stdout] 307 | | return ConflictType::Merge; [INFO] [stdout] 308 | | } [INFO] [stdout] 309 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 305 ~ if verses.contains(&canonical_num) && verses.contains(&(canonical_num + 1)) [INFO] [stdout] 306 ~ && verses.contains(&ref_num) && !verses.contains(&(ref_num + 1)) { [INFO] [stdout] 307 | return ConflictType::Merge; [INFO] [stdout] 308 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:311:21 [INFO] [stdout] | [INFO] [stdout] 311 | / if verses.contains(&ref_num) && verses.contains(&(ref_num + 1)) { [INFO] [stdout] 312 | | if verses.contains(&canonical_num) && !verses.contains(&(canonical_num + 1)) { [INFO] [stdout] 313 | | return ConflictType::Split; [INFO] [stdout] 314 | | } [INFO] [stdout] 315 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 311 ~ if verses.contains(&ref_num) && verses.contains(&(ref_num + 1)) [INFO] [stdout] 312 ~ && verses.contains(&canonical_num) && !verses.contains(&(canonical_num + 1)) { [INFO] [stdout] 313 | return ConflictType::Split; [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:354:29 [INFO] [stdout] | [INFO] [stdout] 354 | / ... if ref_str == canonical_ref_str { [INFO] [stdout] 355 | | ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 356 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 357 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] ... | [INFO] [stdout] 369 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 354 ~ if ref_str == canonical_ref_str [INFO] [stdout] 355 ~ && chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 356 | if !conflicts.iter().any(|c| [INFO] [stdout] ... [INFO] [stdout] 367 | } [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:355:33 [INFO] [stdout] | [INFO] [stdout] 355 | / ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 356 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 357 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] 358 | | ... c.version == *version_code && [INFO] [stdout] ... | [INFO] [stdout] 368 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 355 ~ if chapter_data.verses.contains_key(&merged_verse) [INFO] [stdout] 356 ~ && !conflicts.iter().any(|c| [INFO] [stdout] 357 | c.canonical == canonical_ref_str && [INFO] [stdout] ... [INFO] [stdout] 366 | }); [INFO] [stdout] 367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:371:29 [INFO] [stdout] | [INFO] [stdout] 371 | / ... if canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref { [INFO] [stdout] 372 | | ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 373 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 374 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] ... | [INFO] [stdout] 386 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 371 ~ if (canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref) { [INFO] [stdout] 372 ~ && chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 373 | if !conflicts.iter().any(|c| [INFO] [stdout] ... [INFO] [stdout] 384 | } [INFO] [stdout] 385 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/mapper.rs:371:32 [INFO] [stdout] | [INFO] [stdout] 371 | ... if canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^--------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `curr_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/mapper.rs:371:66 [INFO] [stdout] | [INFO] [stdout] 371 | ... if canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^--------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `next_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | / ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 373 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 374 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] 375 | | ... c.version == *version_code && [INFO] [stdout] ... | [INFO] [stdout] 385 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 372 ~ if chapter_data.verses.contains_key(&merged_verse) [INFO] [stdout] 373 ~ && !conflicts.iter().any(|c| [INFO] [stdout] 374 | c.canonical == canonical_ref_str && [INFO] [stdout] ... [INFO] [stdout] 383 | }); [INFO] [stdout] 384 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapper.rs:437:75 [INFO] [stdout] | [INFO] [stdout] 437 | let best_canonical = crate::mapper::canonical_ref(&best_verse.canonical_ref.split('.').next().unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `best_verse.canonical_ref.split('.').next().unwrap_or("")` [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: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/mapper.rs:571:25 [INFO] [stdout] | [INFO] [stdout] 571 | / if let Some((book, chapter, _verse)) = [INFO] [stdout] 572 | | parse_canonical_ref(canonical_ref_str).ok() [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] help: consider matching on `Ok((book, chapter, _verse))` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 571 - if let Some((book, chapter, _verse)) = [INFO] [stdout] 572 - parse_canonical_ref(canonical_ref_str).ok() [INFO] [stdout] 571 + if let Ok((book, chapter, _verse)) = parse_canonical_ref(canonical_ref_str) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `models::VerseReference` [INFO] [stdout] --> src/models.rs:218:5 [INFO] [stdout] | [INFO] [stdout] 218 | / pub fn to_string(&self) -> String { [INFO] [stdout] 219 | | format!("{}.{}.{}", self.book, self.chapter, self.verse) [INFO] [stdout] 220 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `models::VerseReference` 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: name `KJV` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | KJV, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Kjv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ASV` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | ASV, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Asv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WEB` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | WEB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Web` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OEB` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | OEB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Oeb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BSB` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | BSB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bsb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:152:51 [INFO] [stdout] | [INFO] [stdout] 152 | ...s_empty() && !self.extract_chapter_number(line).is_some() && self.extract_book_name(line).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.extract_chapter_number(line).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser.rs:74:44 [INFO] [stdout] | [INFO] [stdout] 74 | let current_has_chapters = current_book.as_ref().map_or(false, |b| !b.chapters.is_empty()); [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] 74 - let current_has_chapters = current_book.as_ref().map_or(false, |b| !b.chapters.is_empty()); [INFO] [stdout] 74 + let current_has_chapters = current_book.as_ref().is_some_and(|b| !b.chapters.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser.rs:237:57 [INFO] [stdout] | [INFO] [stdout] 237 | if parts.len() <= 4 && parts.iter().all(|p| p.chars().next().map_or(false, |c| c.is_uppercase() || c.is_ascii_digit())) { [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] 237 - if parts.len() <= 4 && parts.iter().all(|p| p.chars().next().map_or(false, |c| c.is_uppercase() || c.is_ascii_digit())) { [INFO] [stdout] 237 + if parts.len() <= 4 && parts.iter().all(|p| p.chars().next().is_some_and(|c| c.is_uppercase() || c.is_ascii_digit())) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:301:60 [INFO] [stdout] | [INFO] [stdout] 301 | footnotes: self.extract_footnotes(&verse_text, &format)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `format` [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 `map_or` can be simplified [INFO] [stdout] --> src/parser.rs:363:44 [INFO] [stdout] | [INFO] [stdout] 363 | if !trimmed.is_empty() && !trimmed.chars().next().map_or(false, |c| c.is_ascii_digit()) { [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] 363 - if !trimmed.is_empty() && !trimmed.chars().next().map_or(false, |c| c.is_ascii_digit()) { [INFO] [stdout] 363 + if !trimmed.is_empty() && !trimmed.chars().next().is_some_and(|c| c.is_ascii_digit()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/pipeline.rs:203:5 [INFO] [stdout] | [INFO] [stdout] 203 | / pub fn generate_html( [INFO] [stdout] 204 | | &self, [INFO] [stdout] 205 | | chapters: &HashMap, [INFO] [stdout] 206 | | version_code: &str, [INFO] [stdout] ... | [INFO] [stdout] 212 | | base_url: &str, [INFO] [stdout] 213 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/pipeline.rs:226:51 [INFO] [stdout] | [INFO] [stdout] 226 | books_map.entry(chapter.book.clone()).or_insert_with(Vec::new).push(chapter.chapter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/pipeline.rs:329:5 [INFO] [stdout] | [INFO] [stdout] 329 | / pub fn generate_manifest_and_site( [INFO] [stdout] 330 | | &self, [INFO] [stdout] 331 | | all_versions: &HashMap>, [INFO] [stdout] 332 | | source_files: &[PathBuf], [INFO] [stdout] ... | [INFO] [stdout] 339 | | base_url: &str, [INFO] [stdout] 340 | | ) -> Result { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/site_generator.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | html.push_str(&format!(" \n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" \n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/validator.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / if versions_path.exists() { [INFO] [stdout] 40 | | if !self.validate_json_file(&versions_path, "versions-1.0.json") { [INFO] [stdout] 41 | | all_valid = false; [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 39 ~ if versions_path.exists() [INFO] [stdout] 40 ~ && !self.validate_json_file(&versions_path, "versions-1.0.json") { [INFO] [stdout] 41 | all_valid = false; [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/validator.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / if books_path.exists() { [INFO] [stdout] 47 | | if !self.validate_json_file(&books_path, "books-1.0.json") { [INFO] [stdout] 48 | | all_valid = false; [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 46 ~ if books_path.exists() [INFO] [stdout] 47 ~ && !self.validate_json_file(&books_path, "books-1.0.json") { [INFO] [stdout] 48 | all_valid = false; [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/validator.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if crossrefs_path.exists() { [INFO] [stdout] 54 | | if !self.validate_json_file(&crossrefs_path, "crossrefs-1.0.json") { [INFO] [stdout] 55 | | all_valid = false; [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if crossrefs_path.exists() [INFO] [stdout] 54 ~ && !self.validate_json_file(&crossrefs_path, "crossrefs-1.0.json") { [INFO] [stdout] 55 | all_valid = false; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/validator.rs:204:34 [INFO] [stdout] | [INFO] [stdout] 204 | let anchor = link[1..].to_string(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/validator.rs:203:17 [INFO] [stdout] | [INFO] [stdout] 203 | if link.starts_with('#') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 203 ~ if let Some() = link.strip_prefix('#') { [INFO] [stdout] 204 ~ let anchor = .to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:145:51 [INFO] [stdout] | [INFO] [stdout] 145 | books_map.entry(chapter.book.clone()).or_insert_with(Vec::new).push(chapter.chapter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:248:83 [INFO] [stdout] | [INFO] [stdout] 248 | } else if content.contains("Chapter") && content.contains("In the beginning") { [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 249 | | BibleFormat::KJV [INFO] [stdout] 250 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:250:12 [INFO] [stdout] | [INFO] [stdout] 250 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 251 | | BibleFormat::KJV [INFO] [stdout] 252 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/html_generator.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn generate_chapter_html( [INFO] [stdout] 39 | | &self, [INFO] [stdout] 40 | | chapter: &Chapter, [INFO] [stdout] 41 | | version_code: &str, [INFO] [stdout] ... | [INFO] [stdout] 46 | | _crossrefs: Option<&CrossReferenceMap>, [INFO] [stdout] 47 | | ) -> Result { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/html_generator.rs:200:24 [INFO] [stdout] | [INFO] [stdout] 200 | html.push_str(&format!(" \n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" \n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/html_generator.rs:260:24 [INFO] [stdout] | [INFO] [stdout] 260 | html.push_str(&format!(" \n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" \n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/logger.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | build_files.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 - build_files.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] 165 + build_files.sort_by_key(|a| a.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapper.rs:151:44 [INFO] [stdout] | [INFO] [stdout] 151 | self.detect_enhanced_conflicts(&canonical_ref_str, &version_map, &mut conflicts, versions); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `canonical_ref_str` [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: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/mapper.rs:295:9 [INFO] [stdout] | [INFO] [stdout] 295 | if let Some((book, chapter, _)) = parse_canonical_ref(canonical_ref_str).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok((book, chapter, _))` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 295 - if let Some((book, chapter, _)) = parse_canonical_ref(canonical_ref_str).ok() { [INFO] [stdout] 295 + if let Ok((book, chapter, _)) = parse_canonical_ref(canonical_ref_str) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:305:21 [INFO] [stdout] | [INFO] [stdout] 305 | / if verses.contains(&canonical_num) && verses.contains(&(canonical_num + 1)) { [INFO] [stdout] 306 | | if verses.contains(&ref_num) && !verses.contains(&(ref_num + 1)) { [INFO] [stdout] 307 | | return ConflictType::Merge; [INFO] [stdout] 308 | | } [INFO] [stdout] 309 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 305 ~ if verses.contains(&canonical_num) && verses.contains(&(canonical_num + 1)) [INFO] [stdout] 306 ~ && verses.contains(&ref_num) && !verses.contains(&(ref_num + 1)) { [INFO] [stdout] 307 | return ConflictType::Merge; [INFO] [stdout] 308 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:311:21 [INFO] [stdout] | [INFO] [stdout] 311 | / if verses.contains(&ref_num) && verses.contains(&(ref_num + 1)) { [INFO] [stdout] 312 | | if verses.contains(&canonical_num) && !verses.contains(&(canonical_num + 1)) { [INFO] [stdout] 313 | | return ConflictType::Split; [INFO] [stdout] 314 | | } [INFO] [stdout] 315 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 311 ~ if verses.contains(&ref_num) && verses.contains(&(ref_num + 1)) [INFO] [stdout] 312 ~ && verses.contains(&canonical_num) && !verses.contains(&(canonical_num + 1)) { [INFO] [stdout] 313 | return ConflictType::Split; [INFO] [stdout] 314 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:354:29 [INFO] [stdout] | [INFO] [stdout] 354 | / ... if ref_str == canonical_ref_str { [INFO] [stdout] 355 | | ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 356 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 357 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] ... | [INFO] [stdout] 369 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 354 ~ if ref_str == canonical_ref_str [INFO] [stdout] 355 ~ && chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 356 | if !conflicts.iter().any(|c| [INFO] [stdout] ... [INFO] [stdout] 367 | } [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:355:33 [INFO] [stdout] | [INFO] [stdout] 355 | / ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 356 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 357 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] 358 | | ... c.version == *version_code && [INFO] [stdout] ... | [INFO] [stdout] 368 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 355 ~ if chapter_data.verses.contains_key(&merged_verse) [INFO] [stdout] 356 ~ && !conflicts.iter().any(|c| [INFO] [stdout] 357 | c.canonical == canonical_ref_str && [INFO] [stdout] ... [INFO] [stdout] 366 | }); [INFO] [stdout] 367 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:371:29 [INFO] [stdout] | [INFO] [stdout] 371 | / ... if canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref { [INFO] [stdout] 372 | | ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 373 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 374 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] ... | [INFO] [stdout] 386 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 371 ~ if (canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref) { [INFO] [stdout] 372 ~ && chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 373 | if !conflicts.iter().any(|c| [INFO] [stdout] ... [INFO] [stdout] 384 | } [INFO] [stdout] 385 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/mapper.rs:371:32 [INFO] [stdout] | [INFO] [stdout] 371 | ... if canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^--------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `curr_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/mapper.rs:371:66 [INFO] [stdout] | [INFO] [stdout] 371 | ... if canonical_ref_str == &curr_ref || canonical_ref_str == &next_ref { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^--------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `next_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mapper.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | / ... if chapter_data.verses.contains_key(&merged_verse) { [INFO] [stdout] 373 | | ... if !conflicts.iter().any(|c| [INFO] [stdout] 374 | | ... c.canonical == canonical_ref_str && [INFO] [stdout] 375 | | ... c.version == *version_code && [INFO] [stdout] ... | [INFO] [stdout] 385 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 372 ~ if chapter_data.verses.contains_key(&merged_verse) [INFO] [stdout] 373 ~ && !conflicts.iter().any(|c| [INFO] [stdout] 374 | c.canonical == canonical_ref_str && [INFO] [stdout] ... [INFO] [stdout] 383 | }); [INFO] [stdout] 384 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mapper.rs:437:75 [INFO] [stdout] | [INFO] [stdout] 437 | let best_canonical = crate::mapper::canonical_ref(&best_verse.canonical_ref.split('.').next().unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `best_verse.canonical_ref.split('.').next().unwrap_or("")` [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: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/mapper.rs:571:25 [INFO] [stdout] | [INFO] [stdout] 571 | / if let Some((book, chapter, _verse)) = [INFO] [stdout] 572 | | parse_canonical_ref(canonical_ref_str).ok() [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] help: consider matching on `Ok((book, chapter, _verse))` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 571 - if let Some((book, chapter, _verse)) = [INFO] [stdout] 572 - parse_canonical_ref(canonical_ref_str).ok() [INFO] [stdout] 571 + if let Ok((book, chapter, _verse)) = parse_canonical_ref(canonical_ref_str) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/mapper.rs:1038:25 [INFO] [stdout] | [INFO] [stdout] 1038 | assert!(conflict.details.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!conflict.details.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] --> src/mapper.rs:1107:17 [INFO] [stdout] | [INFO] [stdout] 1107 | assert!(mappings.mappings.len() > 0, "Should have some mappings"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!mappings.mappings.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] --> src/mapper.rs:1413:39 [INFO] [stdout] | [INFO] [stdout] 1413 | assert_eq!(metrics.conflicts, sum as usize, [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `sum` [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: you seem to want to iterate on a map's values [INFO] [stdout] --> src/mapper.rs:1453:50 [INFO] [stdout] | [INFO] [stdout] 1453 | for (_canonical_ref_str, version_map) in &mappings.mappings { [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] 1453 - for (_canonical_ref_str, version_map) in &mappings.mappings { [INFO] [stdout] 1453 + for version_map in mappings.mappings.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `models::VerseReference` [INFO] [stdout] --> src/models.rs:218:5 [INFO] [stdout] | [INFO] [stdout] 218 | / pub fn to_string(&self) -> String { [INFO] [stdout] 219 | | format!("{}.{}.{}", self.book, self.chapter, self.verse) [INFO] [stdout] 220 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `models::VerseReference` 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: name `KJV` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | KJV, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Kjv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ASV` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | ASV, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Asv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WEB` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | WEB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Web` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OEB` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | OEB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Oeb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BSB` contains a capitalized acronym [INFO] [stdout] --> src/parser.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | BSB, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bsb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:152:51 [INFO] [stdout] | [INFO] [stdout] 152 | ...s_empty() && !self.extract_chapter_number(line).is_some() && self.extract_book_name(line).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.extract_chapter_number(line).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser.rs:74:44 [INFO] [stdout] | [INFO] [stdout] 74 | let current_has_chapters = current_book.as_ref().map_or(false, |b| !b.chapters.is_empty()); [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] 74 - let current_has_chapters = current_book.as_ref().map_or(false, |b| !b.chapters.is_empty()); [INFO] [stdout] 74 + let current_has_chapters = current_book.as_ref().is_some_and(|b| !b.chapters.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser.rs:237:57 [INFO] [stdout] | [INFO] [stdout] 237 | if parts.len() <= 4 && parts.iter().all(|p| p.chars().next().map_or(false, |c| c.is_uppercase() || c.is_ascii_digit())) { [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] 237 - if parts.len() <= 4 && parts.iter().all(|p| p.chars().next().map_or(false, |c| c.is_uppercase() || c.is_ascii_digit())) { [INFO] [stdout] 237 + if parts.len() <= 4 && parts.iter().all(|p| p.chars().next().is_some_and(|c| c.is_uppercase() || c.is_ascii_digit())) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:301:60 [INFO] [stdout] | [INFO] [stdout] 301 | footnotes: self.extract_footnotes(&verse_text, &format)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `format` [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 `map_or` can be simplified [INFO] [stdout] --> src/parser.rs:363:44 [INFO] [stdout] | [INFO] [stdout] 363 | if !trimmed.is_empty() && !trimmed.chars().next().map_or(false, |c| c.is_ascii_digit()) { [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] 363 - if !trimmed.is_empty() && !trimmed.chars().next().map_or(false, |c| c.is_ascii_digit()) { [INFO] [stdout] 363 + if !trimmed.is_empty() && !trimmed.chars().next().is_some_and(|c| c.is_ascii_digit()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/pipeline.rs:203:5 [INFO] [stdout] | [INFO] [stdout] 203 | / pub fn generate_html( [INFO] [stdout] 204 | | &self, [INFO] [stdout] 205 | | chapters: &HashMap, [INFO] [stdout] 206 | | version_code: &str, [INFO] [stdout] ... | [INFO] [stdout] 212 | | base_url: &str, [INFO] [stdout] 213 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/pipeline.rs:226:51 [INFO] [stdout] | [INFO] [stdout] 226 | books_map.entry(chapter.book.clone()).or_insert_with(Vec::new).push(chapter.chapter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> src/pipeline.rs:329:5 [INFO] [stdout] | [INFO] [stdout] 329 | / pub fn generate_manifest_and_site( [INFO] [stdout] 330 | | &self, [INFO] [stdout] 331 | | all_versions: &HashMap>, [INFO] [stdout] 332 | | source_files: &[PathBuf], [INFO] [stdout] ... | [INFO] [stdout] 339 | | base_url: &str, [INFO] [stdout] 340 | | ) -> Result { [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/site_generator.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | html.push_str(&format!(" \n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" \n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/text_normalizer.rs:97:34 [INFO] [stdout] | [INFO] [stdout] 97 | assert!(!tokens.contains(&"the".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `"the"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/text_normalizer.rs:98:34 [INFO] [stdout] | [INFO] [stdout] 98 | assert!(!tokens.contains(&"in".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `"in"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/text_normalizer.rs:99:33 [INFO] [stdout] | [INFO] [stdout] 99 | assert!(tokens.contains(&"beginning".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `"beginning"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/text_normalizer.rs:100:33 [INFO] [stdout] | [INFO] [stdout] 100 | assert!(tokens.contains(&"god".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `"god"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/validator.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / if versions_path.exists() { [INFO] [stdout] 40 | | if !self.validate_json_file(&versions_path, "versions-1.0.json") { [INFO] [stdout] 41 | | all_valid = false; [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 39 ~ if versions_path.exists() [INFO] [stdout] 40 ~ && !self.validate_json_file(&versions_path, "versions-1.0.json") { [INFO] [stdout] 41 | all_valid = false; [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/validator.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / if books_path.exists() { [INFO] [stdout] 47 | | if !self.validate_json_file(&books_path, "books-1.0.json") { [INFO] [stdout] 48 | | all_valid = false; [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 46 ~ if books_path.exists() [INFO] [stdout] 47 ~ && !self.validate_json_file(&books_path, "books-1.0.json") { [INFO] [stdout] 48 | all_valid = false; [INFO] [stdout] 49 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/validator.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if crossrefs_path.exists() { [INFO] [stdout] 54 | | if !self.validate_json_file(&crossrefs_path, "crossrefs-1.0.json") { [INFO] [stdout] 55 | | all_valid = false; [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if crossrefs_path.exists() [INFO] [stdout] 54 ~ && !self.validate_json_file(&crossrefs_path, "crossrefs-1.0.json") { [INFO] [stdout] 55 | all_valid = false; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/validator.rs:204:34 [INFO] [stdout] | [INFO] [stdout] 204 | let anchor = link[1..].to_string(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/validator.rs:203:17 [INFO] [stdout] | [INFO] [stdout] 203 | if link.starts_with('#') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 203 ~ if let Some() = link.strip_prefix('#') { [INFO] [stdout] 204 ~ let anchor = .to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/main.rs:145:51 [INFO] [stdout] | [INFO] [stdout] 145 | books_map.entry(chapter.book.clone()).or_insert_with(Vec::new).push(chapter.chapter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:248:83 [INFO] [stdout] | [INFO] [stdout] 248 | } else if content.contains("Chapter") && content.contains("In the beginning") { [INFO] [stdout] | ___________________________________________________________________________________^ [INFO] [stdout] 249 | | BibleFormat::KJV [INFO] [stdout] 250 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:250:12 [INFO] [stdout] | [INFO] [stdout] 250 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 251 | | BibleFormat::KJV [INFO] [stdout] 252 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 09s [INFO] running `Command { std: "docker" "inspect" "fecdcd0e4562b760e2e8ed20cb8e107311898029feb9d27e1656a9b595b1c040", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fecdcd0e4562b760e2e8ed20cb8e107311898029feb9d27e1656a9b595b1c040", kill_on_drop: false }` [INFO] [stdout] fecdcd0e4562b760e2e8ed20cb8e107311898029feb9d27e1656a9b595b1c040