[INFO] cloning repository https://github.com/vlzcrz/lexo_corpus [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/vlzcrz/lexo_corpus" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvlzcrz%2Flexo_corpus", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvlzcrz%2Flexo_corpus'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 04094c4fd79eff92c87b04b7312d26e74cf938f1 [INFO] linting vlzcrz/lexo_corpus against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvlzcrz%2Flexo_corpus" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/vlzcrz/lexo_corpus [INFO] finished tweaking git repo https://github.com/vlzcrz/lexo_corpus [INFO] tweaked toml for git repo https://github.com/vlzcrz/lexo_corpus written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/vlzcrz/lexo_corpus 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/vlzcrz/lexo_corpus 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 pyo3-build-config v0.23.4 [INFO] [stderr] Downloaded unindent v0.2.3 [INFO] [stderr] Downloaded pyo3-macros v0.23.4 [INFO] [stderr] Downloaded symspell v0.4.3 [INFO] [stderr] Downloaded jiff-tzdb-platform v0.1.2 [INFO] [stderr] Downloaded cli-table-derive v0.4.6 [INFO] [stderr] Downloaded linregress v0.5.4 [INFO] [stderr] Downloaded cli-table v0.4.9 [INFO] [stderr] Downloaded owo-colors v4.2.0 [INFO] [stderr] Downloaded rusty-tesseract v1.1.10 [INFO] [stderr] Downloaded pdf-extract v0.8.2 [INFO] [stderr] Downloaded pyo3-ffi v0.23.4 [INFO] [stderr] Downloaded pyo3-macros-backend v0.23.4 [INFO] [stderr] Downloaded unidecode v0.3.0 [INFO] [stderr] Downloaded jiff-tzdb v0.1.2 [INFO] [stderr] Downloaded jiff v0.2.1 [INFO] [stderr] Downloaded pyo3 v0.23.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 73cf83984b8a031b17dcceba4ff6049819922eb69109a7b5c5fccf68114eee82 [INFO] running `Command { std: "docker" "start" "-a" "73cf83984b8a031b17dcceba4ff6049819922eb69109a7b5c5fccf68114eee82", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "73cf83984b8a031b17dcceba4ff6049819922eb69109a7b5c5fccf68114eee82", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "73cf83984b8a031b17dcceba4ff6049819922eb69109a7b5c5fccf68114eee82", kill_on_drop: false }` [INFO] [stdout] 73cf83984b8a031b17dcceba4ff6049819922eb69109a7b5c5fccf68114eee82 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 66f43fe5776f5f1c066bd4eb2a43d2ebc4af8a7deb3dc62a9e371f0974a7f049 [INFO] running `Command { std: "docker" "start" "-a" "66f43fe5776f5f1c066bd4eb2a43d2ebc4af8a7deb3dc62a9e371f0974a7f049", kill_on_drop: false }` [INFO] [stderr] Compiling once_cell v1.20.3 [INFO] [stderr] Checking miniz_oxide v0.8.3 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Compiling strsim v0.10.0 [INFO] [stderr] Compiling pyo3-build-config v0.23.4 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Compiling anyhow v1.0.97 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking smallvec v1.14.0 [INFO] [stderr] Checking v_frame v0.3.8 [INFO] [stderr] Checking bitflags v2.8.0 [INFO] [stderr] Compiling rav1e v0.7.1 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Compiling matrixmultiply v0.3.9 [INFO] [stderr] Checking imgref v1.11.0 [INFO] [stderr] Compiling rustix v1.0.1 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Checking itertools v0.12.1 [INFO] [stderr] Checking bitstream-io v2.6.0 [INFO] [stderr] Checking avif-serialize v0.8.3 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking loop9 v0.1.5 [INFO] [stderr] Compiling substring v1.4.5 [INFO] [stderr] Checking linux-raw-sys v0.9.2 [INFO] [stderr] Checking pom v1.1.0 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking wide v0.7.32 [INFO] [stderr] Checking rayon-core v1.12.1 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Checking rgb v0.8.50 [INFO] [stderr] Checking zune-jpeg v0.4.14 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking time v0.3.37 [INFO] [stderr] Checking image-webp v0.2.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking tinyvec v1.8.1 [INFO] [stderr] Checking signal-hook v0.3.17 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking exr v1.73.0 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking csv-core v0.1.11 [INFO] [stderr] Compiling owo-colors v4.2.0 [INFO] [stderr] Checking av1-grain v0.2.3 [INFO] [stderr] Checking rangemap v1.5.1 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking console v0.15.10 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking type1-encoding-parser v0.1.0 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Checking adobe-cmap-parser v0.4.1 [INFO] [stderr] Checking simba v0.9.0 [INFO] [stderr] Checking subprocess v0.2.9 [INFO] [stderr] Checking euclid v0.20.14 [INFO] [stderr] Checking unindent v0.2.3 [INFO] [stderr] Checking postscript v0.14.1 [INFO] [stderr] Compiling pyo3-ffi v0.23.4 [INFO] [stderr] Compiling pyo3-macros-backend v0.23.4 [INFO] [stderr] Compiling pyo3 v0.23.4 [INFO] [stderr] Checking unidecode v0.3.0 [INFO] [stderr] Compiling indoc v2.0.5 [INFO] [stderr] Checking cff-parser v0.1.0 [INFO] [stderr] Checking lopdf v0.34.0 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking jiff v0.2.1 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Compiling darling_core v0.12.4 [INFO] [stderr] Checking tempfile v3.18.0 [INFO] [stderr] Compiling cli-table-derive v0.4.6 [INFO] [stderr] Checking pdf-extract v0.8.2 [INFO] [stderr] Checking cli-table v0.4.9 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Compiling profiling-procmacros v1.0.16 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Compiling darling_macro v0.12.4 [INFO] [stderr] Checking profiling v1.0.16 [INFO] [stderr] Compiling darling v0.12.4 [INFO] [stderr] Compiling derive_builder_core v0.10.2 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling derive_builder_macro v0.10.2 [INFO] [stderr] Checking derive_builder v0.10.2 [INFO] [stderr] Checking symspell v0.4.3 [INFO] [stderr] Checking nalgebra v0.33.2 [INFO] [stderr] Compiling pyo3-macros v0.23.4 [INFO] [stderr] Checking ravif v0.11.11 [INFO] [stderr] Checking image v0.25.5 [INFO] [stderr] Checking rusty-tesseract v1.1.10 [INFO] [stderr] Checking linregress v0.5.4 [INFO] [stderr] Checking lexo_corpus v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 47 - "[DEBUG FUNCTION read_document_txt: \nEstado: {}", [INFO] [stdout] 48 - "Completado!" [INFO] [stdout] 47 + "[DEBUG FUNCTION read_document_txt: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 55 - "[DEBUG FUNCTION read_document_pdf: \nEstado: {}", [INFO] [stdout] 56 - "Completado!" [INFO] [stdout] 55 + "[DEBUG FUNCTION read_document_pdf: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:64:17 [INFO] [stdout] | [INFO] [stdout] 64 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 63 - "[DEBUG FUNCTION read_tet_document_pdf: \nEstado: {}", [INFO] [stdout] 64 - "Completado!" [INFO] [stdout] 63 + "[DEBUG FUNCTION read_tet_document_pdf: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:72:17 [INFO] [stdout] | [INFO] [stdout] 72 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 - "[DEBUG FUNCTION read_pdf_tesseract: \nEstado: {}", [INFO] [stdout] 72 - "Completado!" [INFO] [stdout] 71 + "[DEBUG FUNCTION read_pdf_tesseract: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | "Completed!" [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 - "[DEBUG FUNCTION read_pdf_RapidOCR: \nExtract: {}", [INFO] [stdout] 80 - "Completed!" [INFO] [stdout] 79 + "[DEBUG FUNCTION read_pdf_RapidOCR: \nExtract: Completed!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modules/debug/debug_text_extracts.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | return text; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 129 - return text; [INFO] [stdout] 129 + text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/modules/debug/debug_text_extracts.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | let _ = page_snapshots_by_pdf_page(&input_file_name, page).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 211 - let _ = page_snapshots_by_pdf_page(&input_file_name, page).unwrap(); [INFO] [stdout] 211 + page_snapshots_by_pdf_page(&input_file_name, page).unwrap(); [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/modules/file_handlers.rs:71:11 [INFO] [stdout] | [INFO] [stdout] 71 | keys: &Vec, [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] 71 - keys: &Vec, [INFO] [stdout] 71 + keys: &[String], [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/modules/file_handlers.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | values: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - values: &Vec, [INFO] [stdout] 72 + values: &[u32], [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/modules/file_handlers.rs:114:11 [INFO] [stdout] | [INFO] [stdout] 114 | keys: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 114 - keys: &Vec, [INFO] [stdout] 114 + keys: &[String], [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/modules/file_handlers.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | values: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 115 - values: &Vec, [INFO] [stdout] 115 + values: &[u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modules/file_handlers.rs:159:6 [INFO] [stdout] | [INFO] [stdout] 159 | ) -> Result<(Vec>, Vec>), Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/file_handlers.rs:156:27 [INFO] [stdout] | [INFO] [stdout] 156 | inter_words_hashmaps: &Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 156 - inter_words_hashmaps: &Vec>, [INFO] [stdout] 156 + inter_words_hashmaps: &[HashMap], [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/modules/file_handlers.rs:157:26 [INFO] [stdout] | [INFO] [stdout] 157 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 157 - inter_words_strings: &Vec, [INFO] [stdout] 157 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modules/file_handlers.rs:309:9 [INFO] [stdout] | [INFO] [stdout] 309 | return text; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 309 - return text; [INFO] [stdout] 309 + text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:48:17 [INFO] [stdout] | [INFO] [stdout] 48 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] = note: `#[warn(clippy::print_literal)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 47 - "[DEBUG FUNCTION read_document_txt: \nEstado: {}", [INFO] [stdout] 48 - "Completado!" [INFO] [stdout] 47 + "[DEBUG FUNCTION read_document_txt: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 55 - "[DEBUG FUNCTION read_document_pdf: \nEstado: {}", [INFO] [stdout] 56 - "Completado!" [INFO] [stdout] 55 + "[DEBUG FUNCTION read_document_pdf: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:64:17 [INFO] [stdout] | [INFO] [stdout] 64 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 63 - "[DEBUG FUNCTION read_tet_document_pdf: \nEstado: {}", [INFO] [stdout] 64 - "Completado!" [INFO] [stdout] 63 + "[DEBUG FUNCTION read_tet_document_pdf: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:72:17 [INFO] [stdout] | [INFO] [stdout] 72 | "Completado!" [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 - "[DEBUG FUNCTION read_pdf_tesseract: \nEstado: {}", [INFO] [stdout] 72 - "Completado!" [INFO] [stdout] 71 + "[DEBUG FUNCTION read_pdf_tesseract: \nEstado: Completado!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: literal with an empty format string [INFO] [stdout] --> src/modules/debug/debug_menu.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | "Completed!" [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 - "[DEBUG FUNCTION read_pdf_RapidOCR: \nExtract: {}", [INFO] [stdout] 80 - "Completed!" [INFO] [stdout] 79 + "[DEBUG FUNCTION read_pdf_RapidOCR: \nExtract: Completed!" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modules/debug/debug_text_extracts.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | return text; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 129 - return text; [INFO] [stdout] 129 + text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/modules/debug/debug_text_extracts.rs:211:5 [INFO] [stdout] | [INFO] [stdout] 211 | let _ = page_snapshots_by_pdf_page(&input_file_name, page).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 211 - let _ = page_snapshots_by_pdf_page(&input_file_name, page).unwrap(); [INFO] [stdout] 211 + page_snapshots_by_pdf_page(&input_file_name, page).unwrap(); [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/modules/lexical_analisis.rs:29:51 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn is_ascii_valid(word: &str, ascii_interest: &Vec) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 29 - pub fn is_ascii_valid(word: &str, ascii_interest: &Vec) -> Result { [INFO] [stdout] 29 + pub fn is_ascii_valid(word: &str, ascii_interest: &[u8]) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexical_analisis.rs:62:22 [INFO] [stdout] | [INFO] [stdout] 62 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modules/lexical_analisis.rs:87:32 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn create_inter_words() -> Result<(Vec>, Vec, Vec), AnalysisError> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modules/lexical_analisis.rs:124:6 [INFO] [stdout] | [INFO] [stdout] 124 | ) -> Result<(Vec>, Vec), AnalysisError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:123:26 [INFO] [stdout] | [INFO] [stdout] 123 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 123 - inter_words_strings: &Vec, [INFO] [stdout] 123 + inter_words_strings: &[String], [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/modules/file_handlers.rs:71:11 [INFO] [stdout] | [INFO] [stdout] 71 | keys: &Vec, [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] 71 - keys: &Vec, [INFO] [stdout] 71 + keys: &[String], [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/modules/file_handlers.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | values: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - values: &Vec, [INFO] [stdout] 72 + values: &[u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | if !words[word_idx].parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `words[word_idx].parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:198:16 [INFO] [stdout] | [INFO] [stdout] 198 | if !s.parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is only used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:164:25 [INFO] [stdout] | [INFO] [stdout] 164 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 164 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 164 + for in words.iter().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:175:25 [INFO] [stdout] | [INFO] [stdout] 175 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 175 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 175 + for (word_idx, ) in words.iter().enumerate().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | sentence_from_ocr.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_from_ocr.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/modules/lexical_analisis.rs:180:20 [INFO] [stdout] | [INFO] [stdout] 180 | if sentence != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sentence.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | sentence.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/file_handlers.rs:114:11 [INFO] [stdout] | [INFO] [stdout] 114 | keys: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 114 - keys: &Vec, [INFO] [stdout] 114 + keys: &[String], [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/modules/file_handlers.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | values: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 115 - values: &Vec, [INFO] [stdout] 115 + values: &[u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modules/file_handlers.rs:159:6 [INFO] [stdout] | [INFO] [stdout] 159 | ) -> Result<(Vec>, Vec>), Error> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:208:17 [INFO] [stdout] | [INFO] [stdout] 208 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/file_handlers.rs:156:27 [INFO] [stdout] | [INFO] [stdout] 156 | inter_words_hashmaps: &Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 156 - inter_words_hashmaps: &Vec>, [INFO] [stdout] 156 + inter_words_hashmaps: &[HashMap], [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/modules/file_handlers.rs:157:26 [INFO] [stdout] | [INFO] [stdout] 157 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 157 - inter_words_strings: &Vec, [INFO] [stdout] 157 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:218:9 [INFO] [stdout] | [INFO] [stdout] 218 | processed_content.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `processed_content.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:264:16 [INFO] [stdout] | [INFO] [stdout] 264 | if !words[word_idx].parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `words[word_idx].parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:283:16 [INFO] [stdout] | [INFO] [stdout] 283 | if !s.parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is only used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:249:25 [INFO] [stdout] | [INFO] [stdout] 249 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 249 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 249 + for in words.iter().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:260:25 [INFO] [stdout] | [INFO] [stdout] 260 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 260 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 260 + for (word_idx, ) in words.iter().enumerate().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | sentence_from_ocr.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_from_ocr.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/modules/lexical_analisis.rs:265:20 [INFO] [stdout] | [INFO] [stdout] 265 | if sentence != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sentence.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:273:13 [INFO] [stdout] | [INFO] [stdout] 273 | sentence.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:289:17 [INFO] [stdout] | [INFO] [stdout] 289 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | processed_content.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `processed_content.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexical_analisis.rs:323:62 [INFO] [stdout] | [INFO] [stdout] 323 | let sentence_restructured_vec = symspell.lookup_compound(&sentence, 2); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `sentence` [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: unneeded `return` statement [INFO] [stdout] --> src/modules/file_handlers.rs:309:9 [INFO] [stdout] | [INFO] [stdout] 309 | return text; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 309 - return text; [INFO] [stdout] 309 + text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/modules/lexical_analisis.rs:350:5 [INFO] [stdout] | [INFO] [stdout] 350 | let word_restructured: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 351 | let suggestion_word = symspell.word_segmentation(word, 2); [INFO] [stdout] 352 | word_restructured = suggestion_word.segmented_string; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `word_restructured` here [INFO] [stdout] | [INFO] [stdout] 350 ~ [INFO] [stdout] 351 | let suggestion_word = symspell.word_segmentation(word, 2); [INFO] [stdout] 352 ~ let word_restructured: String = suggestion_word.segmented_string; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:384:27 [INFO] [stdout] | [INFO] [stdout] 384 | inter_words_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 384 - inter_words_hashmaps: &mut Vec>, [INFO] [stdout] 384 + inter_words_hashmaps: &mut [HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:385:21 [INFO] [stdout] | [INFO] [stdout] 385 | last_positions: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 385 - last_positions: &mut Vec, [INFO] [stdout] 385 + last_positions: &mut [u32], [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/modules/lexical_analisis.rs:386:26 [INFO] [stdout] | [INFO] [stdout] 386 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 386 - inter_words_strings: &Vec, [INFO] [stdout] 386 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/modules/lexical_analisis.rs:448:1 [INFO] [stdout] | [INFO] [stdout] 448 | / pub fn analyzer_content_dataset_opt( [INFO] [stdout] 449 | | content: String, [INFO] [stdout] 450 | | words: &mut HashMap, [INFO] [stdout] 451 | | words_unique_hashmap: &mut HashMap, [INFO] [stdout] ... | [INFO] [stdout] 459 | | n_words_unique_vec: &mut Vec, [INFO] [stdout] 460 | | ) -> Result<(Vec, Vec), AnalysisError> { [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:453:27 [INFO] [stdout] | [INFO] [stdout] 453 | inter_words_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 453 - inter_words_hashmaps: &mut Vec>, [INFO] [stdout] 453 + inter_words_hashmaps: &mut [HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:454:21 [INFO] [stdout] | [INFO] [stdout] 454 | last_positions: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 454 - last_positions: &mut Vec, [INFO] [stdout] 454 + last_positions: &mut [u32], [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/modules/lexical_analisis.rs:455:26 [INFO] [stdout] | [INFO] [stdout] 455 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 455 - inter_words_strings: &Vec, [INFO] [stdout] 455 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:545:30 [INFO] [stdout] | [INFO] [stdout] 545 | main_interword_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 545 - main_interword_hashmaps: &mut Vec>, [INFO] [stdout] 545 + main_interword_hashmaps: &mut [HashMap], [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/modules/lexical_analisis.rs:546:29 [INFO] [stdout] | [INFO] [stdout] 546 | sub_interword_hashmaps: &Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 546 - sub_interword_hashmaps: &Vec>, [INFO] [stdout] 546 + sub_interword_hashmaps: &[HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/modules/lexical_analisis.rs:568:1 [INFO] [stdout] | [INFO] [stdout] 568 | / pub fn analyzer_content_opt3( [INFO] [stdout] 569 | | content: String, [INFO] [stdout] 570 | | words: &mut HashMap, [INFO] [stdout] 571 | | words_per_doc: &mut HashMap, [INFO] [stdout] ... | [INFO] [stdout] 579 | | n_words_unique_vec: &mut Vec, [INFO] [stdout] 580 | | ) { [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:573:27 [INFO] [stdout] | [INFO] [stdout] 573 | inter_words_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 573 - inter_words_hashmaps: &mut Vec>, [INFO] [stdout] 573 + inter_words_hashmaps: &mut [HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:574:21 [INFO] [stdout] | [INFO] [stdout] 574 | last_positions: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 574 - last_positions: &mut Vec, [INFO] [stdout] 574 + last_positions: &mut [u32], [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/modules/lexical_analisis.rs:575:26 [INFO] [stdout] | [INFO] [stdout] 575 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 575 - inter_words_strings: &Vec, [INFO] [stdout] 575 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexo_corpus.rs:95:22 [INFO] [stdout] | [INFO] [stdout] 95 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:29:51 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn is_ascii_valid(word: &str, ascii_interest: &Vec) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 29 - pub fn is_ascii_valid(word: &str, ascii_interest: &Vec) -> Result { [INFO] [stdout] 29 + pub fn is_ascii_valid(word: &str, ascii_interest: &[u8]) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexical_analisis.rs:62:22 [INFO] [stdout] | [INFO] [stdout] 62 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | format!("\n[Completado] Contenido analizado correctamente."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Contenido analizado correctamente.".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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modules/lexical_analisis.rs:87:32 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn create_inter_words() -> Result<(Vec>, Vec, Vec), AnalysisError> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/modules/lexical_analisis.rs:124:6 [INFO] [stdout] | [INFO] [stdout] 124 | ) -> Result<(Vec>, Vec), AnalysisError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:123:26 [INFO] [stdout] | [INFO] [stdout] 123 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 123 - inter_words_strings: &Vec, [INFO] [stdout] 123 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | format!("\n[Completado] Graficos heatmap y heap's law completado."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Graficos heatmap y heap's law completado.".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 boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:179:16 [INFO] [stdout] | [INFO] [stdout] 179 | if !words[word_idx].parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `words[word_idx].parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:198:16 [INFO] [stdout] | [INFO] [stdout] 198 | if !s.parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is only used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:164:25 [INFO] [stdout] | [INFO] [stdout] 164 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 164 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 164 + for in words.iter().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:175:25 [INFO] [stdout] | [INFO] [stdout] 175 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 175 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 175 + for (word_idx, ) in words.iter().enumerate().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:177:13 [INFO] [stdout] | [INFO] [stdout] 177 | sentence_from_ocr.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_from_ocr.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/modules/lexical_analisis.rs:180:20 [INFO] [stdout] | [INFO] [stdout] 180 | if sentence != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sentence.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:188:13 [INFO] [stdout] | [INFO] [stdout] 188 | sentence.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:200:17 [INFO] [stdout] | [INFO] [stdout] 200 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:208:17 [INFO] [stdout] | [INFO] [stdout] 208 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:212:17 [INFO] [stdout] | [INFO] [stdout] 212 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:218:9 [INFO] [stdout] | [INFO] [stdout] 218 | processed_content.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `processed_content.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/modules/lexo_corpus.rs:337:12 [INFO] [stdout] | [INFO] [stdout] 337 | if labeled_data_files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `labeled_data_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 boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:264:16 [INFO] [stdout] | [INFO] [stdout] 264 | if !words[word_idx].parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `words[word_idx].parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/modules/lexical_analisis.rs:283:16 [INFO] [stdout] | [INFO] [stdout] 283 | if !s.parse::().is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.parse::().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexo_corpus.rs:346:22 [INFO] [stdout] | [INFO] [stdout] 346 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is only used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:249:25 [INFO] [stdout] | [INFO] [stdout] 249 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 249 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 249 + for in words.iter().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `word_idx` is used to index `words` [INFO] [stdout] --> src/modules/lexical_analisis.rs:260:25 [INFO] [stdout] | [INFO] [stdout] 260 | for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 260 - for word_idx in batch_idx..(batch_idx + batch_size) { [INFO] [stdout] 260 + for (word_idx, ) in words.iter().enumerate().skip(batch_idx).take(batch_size) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | sentence_from_ocr.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_from_ocr.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/modules/lexical_analisis.rs:265:20 [INFO] [stdout] | [INFO] [stdout] 265 | if sentence != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sentence.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:273:13 [INFO] [stdout] | [INFO] [stdout] 273 | sentence.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:285:17 [INFO] [stdout] | [INFO] [stdout] 285 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:289:17 [INFO] [stdout] | [INFO] [stdout] 289 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:297:17 [INFO] [stdout] | [INFO] [stdout] 297 | sentence_restructured.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `sentence_restructured.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/modules/lexical_analisis.rs:303:9 [INFO] [stdout] | [INFO] [stdout] 303 | processed_content.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `processed_content.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexical_analisis.rs:323:62 [INFO] [stdout] | [INFO] [stdout] 323 | let sentence_restructured_vec = symspell.lookup_compound(&sentence, 2); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `sentence` [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: unneeded late initialization [INFO] [stdout] --> src/modules/lexical_analisis.rs:350:5 [INFO] [stdout] | [INFO] [stdout] 350 | let word_restructured: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 351 | let suggestion_word = symspell.word_segmentation(word, 2); [INFO] [stdout] 352 | word_restructured = suggestion_word.segmented_string; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `word_restructured` here [INFO] [stdout] | [INFO] [stdout] 350 ~ [INFO] [stdout] 351 | let suggestion_word = symspell.word_segmentation(word, 2); [INFO] [stdout] 352 ~ let word_restructured: String = suggestion_word.segmented_string; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:384:27 [INFO] [stdout] | [INFO] [stdout] 384 | inter_words_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 384 - inter_words_hashmaps: &mut Vec>, [INFO] [stdout] 384 + inter_words_hashmaps: &mut [HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:385:21 [INFO] [stdout] | [INFO] [stdout] 385 | last_positions: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 385 - last_positions: &mut Vec, [INFO] [stdout] 385 + last_positions: &mut [u32], [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/modules/lexical_analisis.rs:386:26 [INFO] [stdout] | [INFO] [stdout] 386 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 386 - inter_words_strings: &Vec, [INFO] [stdout] 386 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:471:17 [INFO] [stdout] | [INFO] [stdout] 471 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 472 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 473 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` 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/modules/lexo_corpus.rs:489:49 [INFO] [stdout] | [INFO] [stdout] 489 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:489:61 [INFO] [stdout] | [INFO] [stdout] 489 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:491:13 [INFO] [stdout] | [INFO] [stdout] 491 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 492 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 493 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:511:83 [INFO] [stdout] | [INFO] [stdout] 511 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:511:95 [INFO] [stdout] | [INFO] [stdout] 511 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/modules/lexical_analisis.rs:448:1 [INFO] [stdout] | [INFO] [stdout] 448 | / pub fn analyzer_content_dataset_opt( [INFO] [stdout] 449 | | content: String, [INFO] [stdout] 450 | | words: &mut HashMap, [INFO] [stdout] 451 | | words_unique_hashmap: &mut HashMap, [INFO] [stdout] ... | [INFO] [stdout] 459 | | n_words_unique_vec: &mut Vec, [INFO] [stdout] 460 | | ) -> Result<(Vec, Vec), AnalysisError> { [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:453:27 [INFO] [stdout] | [INFO] [stdout] 453 | inter_words_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 453 - inter_words_hashmaps: &mut Vec>, [INFO] [stdout] 453 + inter_words_hashmaps: &mut [HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:454:21 [INFO] [stdout] | [INFO] [stdout] 454 | last_positions: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 454 - last_positions: &mut Vec, [INFO] [stdout] 454 + last_positions: &mut [u32], [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/modules/lexical_analisis.rs:455:26 [INFO] [stdout] | [INFO] [stdout] 455 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 455 - inter_words_strings: &Vec, [INFO] [stdout] 455 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:535:21 [INFO] [stdout] | [INFO] [stdout] 535 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 536 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 537 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:542:66 [INFO] [stdout] | [INFO] [stdout] 542 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:542:78 [INFO] [stdout] | [INFO] [stdout] 542 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:566:21 [INFO] [stdout] | [INFO] [stdout] 566 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 567 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 568 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:572:83 [INFO] [stdout] | [INFO] [stdout] 572 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:572:95 [INFO] [stdout] | [INFO] [stdout] 572 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:545:30 [INFO] [stdout] | [INFO] [stdout] 545 | main_interword_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 545 - main_interword_hashmaps: &mut Vec>, [INFO] [stdout] 545 + main_interword_hashmaps: &mut [HashMap], [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/modules/lexical_analisis.rs:546:29 [INFO] [stdout] | [INFO] [stdout] 546 | sub_interword_hashmaps: &Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 546 - sub_interword_hashmaps: &Vec>, [INFO] [stdout] 546 + sub_interword_hashmaps: &[HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:596:21 [INFO] [stdout] | [INFO] [stdout] 596 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 597 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 598 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (11/7) [INFO] [stdout] --> src/modules/lexical_analisis.rs:568:1 [INFO] [stdout] | [INFO] [stdout] 568 | / pub fn analyzer_content_opt3( [INFO] [stdout] 569 | | content: String, [INFO] [stdout] 570 | | words: &mut HashMap, [INFO] [stdout] 571 | | words_per_doc: &mut HashMap, [INFO] [stdout] ... | [INFO] [stdout] 579 | | n_words_unique_vec: &mut Vec, [INFO] [stdout] 580 | | ) { [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:573:27 [INFO] [stdout] | [INFO] [stdout] 573 | inter_words_hashmaps: &mut Vec>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 573 - inter_words_hashmaps: &mut Vec>, [INFO] [stdout] 573 + inter_words_hashmaps: &mut [HashMap], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/lexical_analisis.rs:574:21 [INFO] [stdout] | [INFO] [stdout] 574 | last_positions: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 574 - last_positions: &mut Vec, [INFO] [stdout] 574 + last_positions: &mut [u32], [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/modules/lexical_analisis.rs:575:26 [INFO] [stdout] | [INFO] [stdout] 575 | inter_words_strings: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 575 - inter_words_strings: &Vec, [INFO] [stdout] 575 + inter_words_strings: &[String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:604:18 [INFO] [stdout] | [INFO] [stdout] 604 | let re = Regex::new(r"[^A-Za-z0-9'\s]").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:450:5 [INFO] [stdout] | [INFO] [stdout] 450 | for (file, year) in csv_content.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:629:13 [INFO] [stdout] | [INFO] [stdout] 629 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 630 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 631 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:638:13 [INFO] [stdout] | [INFO] [stdout] 638 | format!("\n[Completado] Se ha analizado el contenido completo del documento."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Se ha analizado el contenido completo del documento.".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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:644:13 [INFO] [stdout] | [INFO] [stdout] 644 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 645 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 646 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:658:44 [INFO] [stdout] | [INFO] [stdout] 658 | create_csv_ordered(&keys, &values, &file_name, &folder_warehouse_data); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:660:13 [INFO] [stdout] | [INFO] [stdout] 660 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:666:13 [INFO] [stdout] | [INFO] [stdout] 666 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 667 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 668 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexo_corpus.rs:95:22 [INFO] [stdout] | [INFO] [stdout] 95 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:700:13 [INFO] [stdout] | [INFO] [stdout] 700 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:701:13 [INFO] [stdout] | [INFO] [stdout] 701 | &file_extension, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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/modules/lexo_corpus.rs:709:13 [INFO] [stdout] | [INFO] [stdout] 709 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:716:13 [INFO] [stdout] | [INFO] [stdout] 716 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:729:9 [INFO] [stdout] | [INFO] [stdout] 729 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 730 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 731 | | processed_file_status.push(" Completed ".on_green().cell().justify(Justify::Right)); [INFO] [stdout] | |____________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | format!("\n[Completado] Contenido analizado correctamente."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Contenido analizado correctamente.".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/modules/lexo_corpus.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | format!("\n[Completado] Graficos heatmap y heap's law completado."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Graficos heatmap y heap's law completado.".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: length comparison to zero [INFO] [stdout] --> src/modules/lexo_corpus.rs:886:12 [INFO] [stdout] | [INFO] [stdout] 886 | if labeled_data_files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `labeled_data_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] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexo_corpus.rs:895:22 [INFO] [stdout] | [INFO] [stdout] 895 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/modules/lexo_corpus.rs:337:12 [INFO] [stdout] | [INFO] [stdout] 337 | if labeled_data_files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `labeled_data_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: redundant closure [INFO] [stdout] --> src/modules/lexo_corpus.rs:346:22 [INFO] [stdout] | [INFO] [stdout] 346 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1020:17 [INFO] [stdout] | [INFO] [stdout] 1020 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1021 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1022 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1038:49 [INFO] [stdout] | [INFO] [stdout] 1038 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1038:61 [INFO] [stdout] | [INFO] [stdout] 1038 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1040:13 [INFO] [stdout] | [INFO] [stdout] 1040 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1041 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1042 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:471:17 [INFO] [stdout] | [INFO] [stdout] 471 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 472 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 473 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` 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/modules/lexo_corpus.rs:1058:83 [INFO] [stdout] | [INFO] [stdout] 1058 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1058:95 [INFO] [stdout] | [INFO] [stdout] 1058 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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/modules/lexo_corpus.rs:489:49 [INFO] [stdout] | [INFO] [stdout] 489 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:489:61 [INFO] [stdout] | [INFO] [stdout] 489 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:491:13 [INFO] [stdout] | [INFO] [stdout] 491 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 492 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 493 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1082:21 [INFO] [stdout] | [INFO] [stdout] 1082 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1083 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1084 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1089:66 [INFO] [stdout] | [INFO] [stdout] 1089 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1089:78 [INFO] [stdout] | [INFO] [stdout] 1089 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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/modules/lexo_corpus.rs:511:83 [INFO] [stdout] | [INFO] [stdout] 511 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:511:95 [INFO] [stdout] | [INFO] [stdout] 511 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1113:21 [INFO] [stdout] | [INFO] [stdout] 1113 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1114 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1115 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1120:82 [INFO] [stdout] | [INFO] [stdout] 1120 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1120:94 [INFO] [stdout] | [INFO] [stdout] 1120 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:535:21 [INFO] [stdout] | [INFO] [stdout] 535 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 536 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 537 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:542:66 [INFO] [stdout] | [INFO] [stdout] 542 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:542:78 [INFO] [stdout] | [INFO] [stdout] 542 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1143:21 [INFO] [stdout] | [INFO] [stdout] 1143 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1144 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1145 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:566:21 [INFO] [stdout] | [INFO] [stdout] 566 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 567 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 568 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:572:83 [INFO] [stdout] | [INFO] [stdout] 572 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:572:95 [INFO] [stdout] | [INFO] [stdout] 572 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: compiling a regex in a loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:1151:18 [INFO] [stdout] | [INFO] [stdout] 1151 | let re = Regex::new(r"[^A-Za-z0-9'\s]").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:999:5 [INFO] [stdout] | [INFO] [stdout] 999 | for (file, year, _) in csv_content.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1176:13 [INFO] [stdout] | [INFO] [stdout] 1176 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1177 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1178 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:596:21 [INFO] [stdout] | [INFO] [stdout] 596 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 597 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 598 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:1185:13 [INFO] [stdout] | [INFO] [stdout] 1185 | format!("\n[Completado] Se ha analizado el contenido completo del documento."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Se ha analizado el contenido completo del documento.".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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1191:13 [INFO] [stdout] | [INFO] [stdout] 1191 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1192 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1193 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1205:44 [INFO] [stdout] | [INFO] [stdout] 1205 | create_csv_ordered(&keys, &values, &file_name, &folder_warehouse_data); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1207:13 [INFO] [stdout] | [INFO] [stdout] 1207 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1213:13 [INFO] [stdout] | [INFO] [stdout] 1213 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1214 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1215 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:604:18 [INFO] [stdout] | [INFO] [stdout] 604 | let re = Regex::new(r"[^A-Za-z0-9'\s]").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:450:5 [INFO] [stdout] | [INFO] [stdout] 450 | for (file, year) in csv_content.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:629:13 [INFO] [stdout] | [INFO] [stdout] 629 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 630 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 631 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:638:13 [INFO] [stdout] | [INFO] [stdout] 638 | format!("\n[Completado] Se ha analizado el contenido completo del documento."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Se ha analizado el contenido completo del documento.".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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:644:13 [INFO] [stdout] | [INFO] [stdout] 644 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 645 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 646 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:658:44 [INFO] [stdout] | [INFO] [stdout] 658 | create_csv_ordered(&keys, &values, &file_name, &folder_warehouse_data); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:660:13 [INFO] [stdout] | [INFO] [stdout] 660 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1247:13 [INFO] [stdout] | [INFO] [stdout] 1247 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1248:13 [INFO] [stdout] | [INFO] [stdout] 1248 | &file_extension, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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/modules/lexo_corpus.rs:1256:13 [INFO] [stdout] | [INFO] [stdout] 1256 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:666:13 [INFO] [stdout] | [INFO] [stdout] 666 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 667 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 668 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1263:13 [INFO] [stdout] | [INFO] [stdout] 1263 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1276:9 [INFO] [stdout] | [INFO] [stdout] 1276 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1277 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1278 | | processed_file_status.push(" Completed ".on_green().cell().justify(Justify::Right)); [INFO] [stdout] | |____________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:700:13 [INFO] [stdout] | [INFO] [stdout] 700 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:701:13 [INFO] [stdout] | [INFO] [stdout] 701 | &file_extension, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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/modules/lexo_corpus.rs:709:13 [INFO] [stdout] | [INFO] [stdout] 709 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:716:13 [INFO] [stdout] | [INFO] [stdout] 716 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:729:9 [INFO] [stdout] | [INFO] [stdout] 729 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 730 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 731 | | processed_file_status.push(" Completed ".on_green().cell().justify(Justify::Right)); [INFO] [stdout] | |____________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/modules/lexo_corpus.rs:886:12 [INFO] [stdout] | [INFO] [stdout] 886 | if labeled_data_files.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `labeled_data_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] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/modules/lexo_corpus.rs:895:22 [INFO] [stdout] | [INFO] [stdout] 895 | .map_err(|e| AnalysisError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `AnalysisError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modules/merge_sort_utils.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 94 - } [INFO] [stdout] 95 - return; [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/merge_sort_utils.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | vector_pointer_values: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - vector_pointer_values: &mut Vec, [INFO] [stdout] 24 + vector_pointer_values: &mut [u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/merge_sort_utils.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | vector_pointer_keys: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - vector_pointer_keys: &mut Vec, [INFO] [stdout] 25 + vector_pointer_keys: &mut [String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1020:17 [INFO] [stdout] | [INFO] [stdout] 1020 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1021 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1022 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1038:49 [INFO] [stdout] | [INFO] [stdout] 1038 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1038:61 [INFO] [stdout] | [INFO] [stdout] 1038 | let checked_file = file_exists_silenced(&file_name, &file_extension)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1040:13 [INFO] [stdout] | [INFO] [stdout] 1040 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1041 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1042 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |______________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/modules/plot_handlers.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [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] 22 - tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 22 + tmp_tuple.sort_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1058:83 [INFO] [stdout] | [INFO] [stdout] 1058 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1058:95 [INFO] [stdout] | [INFO] [stdout] 1058 | OcrOptions::Tesseract => match document_extract_content_tesseract_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: unnecessary map of the identity function [INFO] [stdout] --> src/modules/plot_handlers.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | .into_iter() [INFO] [stdout] | _____________________^ [INFO] [stdout] 32 | | .map(|(year, president_name)| (year, president_name)) [INFO] [stdout] | |_____________________________________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/modules/plot_handlers.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 35 - tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 35 + tmp_tuple.sort_by_key(|a| a.0); [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/modules/plot_handlers.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | csv_content: &Vec<(String, i32, String)>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 41 - csv_content: &Vec<(String, i32, String)>, [INFO] [stdout] 41 + csv_content: &[(String, i32, String)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1082:21 [INFO] [stdout] | [INFO] [stdout] 1082 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1083 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1084 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1089:66 [INFO] [stdout] | [INFO] [stdout] 1089 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/modules/plot_handlers.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .or_insert_with(HashMap::new); [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1089:78 [INFO] [stdout] | [INFO] [stdout] 1089 | OcrOptions::TETlib => match document_extract_content(&file_name, &file_extension) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1113:21 [INFO] [stdout] | [INFO] [stdout] 1113 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1114 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1115 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1120:82 [INFO] [stdout] | [INFO] [stdout] 1120 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1120:94 [INFO] [stdout] | [INFO] [stdout] 1120 | OcrOptions::RapidOCR => match document_extract_content_rapid_ocr_opt(&file_name, &file_extension, symspell) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/plot_handlers.rs:110:20 [INFO] [stdout] | [INFO] [stdout] 110 | lr_parameters: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 110 - lr_parameters: &Vec, [INFO] [stdout] 110 + lr_parameters: &[f64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1143:21 [INFO] [stdout] | [INFO] [stdout] 1143 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1144 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1145 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:1151:18 [INFO] [stdout] | [INFO] [stdout] 1151 | let re = Regex::new(r"[^A-Za-z0-9'\s]").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/modules/lexo_corpus.rs:999:5 [INFO] [stdout] | [INFO] [stdout] 999 | for (file, year, _) in csv_content.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/modules/plot_handlers.rs:170:1 [INFO] [stdout] | [INFO] [stdout] 170 | / pub fn lineplot_alpha_year_president( [INFO] [stdout] 171 | | title: &str, [INFO] [stdout] 172 | | x_label: &str, [INFO] [stdout] 173 | | y_label: &str, [INFO] [stdout] ... | [INFO] [stdout] 178 | | file_name: &str, [INFO] [stdout] 179 | | ) { [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1176:13 [INFO] [stdout] | [INFO] [stdout] 1176 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1177 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1178 | | processed_file_status.push(" Error ".on_red().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/modules/lexo_corpus.rs:1185:13 [INFO] [stdout] | [INFO] [stdout] 1185 | format!("\n[Completado] Se ha analizado el contenido completo del documento."), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"\n[Completado] Se ha analizado el contenido completo del documento.".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 function has too many arguments (9/7) [INFO] [stdout] --> src/modules/plot_handlers.rs:205:1 [INFO] [stdout] | [INFO] [stdout] 205 | / pub fn plot_heat_map( [INFO] [stdout] 206 | | title: &str, [INFO] [stdout] 207 | | x_label: &str, [INFO] [stdout] 208 | | y_label: &str, [INFO] [stdout] ... | [INFO] [stdout] 214 | | file_extension: &str, [INFO] [stdout] 215 | | ) { [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1191:13 [INFO] [stdout] | [INFO] [stdout] 1191 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1192 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1193 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1205:44 [INFO] [stdout] | [INFO] [stdout] 1205 | create_csv_ordered(&keys, &values, &file_name, &folder_warehouse_data); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1207:13 [INFO] [stdout] | [INFO] [stdout] 1207 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1213:13 [INFO] [stdout] | [INFO] [stdout] 1213 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1214 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1215 | | processed_file_status.push(" Incomplete ".on_yellow().cell().justify(Justify::Right)); [INFO] [stdout] | |__________________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/modules/lexo_corpus.rs:1247:13 [INFO] [stdout] | [INFO] [stdout] 1247 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1248:13 [INFO] [stdout] | [INFO] [stdout] 1248 | &file_extension, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `file_extension` [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/modules/lexo_corpus.rs:1256:13 [INFO] [stdout] | [INFO] [stdout] 1256 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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/modules/lexo_corpus.rs:1263:13 [INFO] [stdout] | [INFO] [stdout] 1263 | &file_name, [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_name` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/modules/lexo_corpus.rs:1276:9 [INFO] [stdout] | [INFO] [stdout] 1276 | / let mut processed_file_status: Vec = Vec::new(); [INFO] [stdout] 1277 | | processed_file_status.push(file.clone().cell()); [INFO] [stdout] 1278 | | processed_file_status.push(" Completed ".on_green().cell().justify(Justify::Right)); [INFO] [stdout] | |____________________________________________________________________________________________^ help: consider using the `vec![]` macro: `let processed_file_status: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/zipfs_handlers.rs:30:42 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn vec_apply_to_log10(values_vector: &Vec) -> Result, Error> { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - pub fn vec_apply_to_log10(values_vector: &Vec) -> Result, Error> { [INFO] [stdout] 30 + pub fn vec_apply_to_log10(values_vector: &[u32]) -> Result, Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/modules/merge_sort_utils.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 94 - } [INFO] [stdout] 95 - return; [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/merge_sort_utils.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | vector_pointer_values: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - vector_pointer_values: &mut Vec, [INFO] [stdout] 24 + vector_pointer_values: &mut [u32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/merge_sort_utils.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | vector_pointer_keys: &mut Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - vector_pointer_keys: &mut Vec, [INFO] [stdout] 25 + vector_pointer_keys: &mut [String], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/modules/plot_handlers.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [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] 22 - tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 22 + tmp_tuple.sort_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/modules/plot_handlers.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | .into_iter() [INFO] [stdout] | _____________________^ [INFO] [stdout] 32 | | .map(|(year, president_name)| (year, president_name)) [INFO] [stdout] | |_____________________________________________________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/modules/plot_handlers.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [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] help: try [INFO] [stdout] | [INFO] [stdout] 35 - tmp_tuple.sort_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 35 + tmp_tuple.sort_by_key(|a| a.0); [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/modules/plot_handlers.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | csv_content: &Vec<(String, i32, String)>, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 41 - csv_content: &Vec<(String, i32, String)>, [INFO] [stdout] 41 + csv_content: &[(String, i32, String)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/modules/plot_handlers.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .or_insert_with(HashMap::new); [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/plot_handlers.rs:110:20 [INFO] [stdout] | [INFO] [stdout] 110 | lr_parameters: &Vec, [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 110 - lr_parameters: &Vec, [INFO] [stdout] 110 + lr_parameters: &[f64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/modules/plot_handlers.rs:170:1 [INFO] [stdout] | [INFO] [stdout] 170 | / pub fn lineplot_alpha_year_president( [INFO] [stdout] 171 | | title: &str, [INFO] [stdout] 172 | | x_label: &str, [INFO] [stdout] 173 | | y_label: &str, [INFO] [stdout] ... | [INFO] [stdout] 178 | | file_name: &str, [INFO] [stdout] 179 | | ) { [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: this function has too many arguments (9/7) [INFO] [stdout] --> src/modules/plot_handlers.rs:205:1 [INFO] [stdout] | [INFO] [stdout] 205 | / pub fn plot_heat_map( [INFO] [stdout] 206 | | title: &str, [INFO] [stdout] 207 | | x_label: &str, [INFO] [stdout] 208 | | y_label: &str, [INFO] [stdout] ... | [INFO] [stdout] 214 | | file_extension: &str, [INFO] [stdout] 215 | | ) { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/modules/zipfs_handlers.rs:30:42 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn vec_apply_to_log10(values_vector: &Vec) -> Result, Error> { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - pub fn vec_apply_to_log10(values_vector: &Vec) -> Result, Error> { [INFO] [stdout] 30 + pub fn vec_apply_to_log10(values_vector: &[u32]) -> Result, Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 37.57s [INFO] running `Command { std: "docker" "inspect" "66f43fe5776f5f1c066bd4eb2a43d2ebc4af8a7deb3dc62a9e371f0974a7f049", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "66f43fe5776f5f1c066bd4eb2a43d2ebc4af8a7deb3dc62a9e371f0974a7f049", kill_on_drop: false }` [INFO] [stdout] 66f43fe5776f5f1c066bd4eb2a43d2ebc4af8a7deb3dc62a9e371f0974a7f049