[INFO] cloning repository https://github.com/steve-canham/dl_isrctn [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/steve-canham/dl_isrctn" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsteve-canham%2Fdl_isrctn", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsteve-canham%2Fdl_isrctn'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] be75aeae61ce5d42cf352e997d641b294e5cf3fb [INFO] linting steve-canham/dl_isrctn against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsteve-canham%2Fdl_isrctn" "/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/steve-canham/dl_isrctn [INFO] finished tweaking git repo https://github.com/steve-canham/dl_isrctn [INFO] tweaked toml for git repo https://github.com/steve-canham/dl_isrctn written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/steve-canham/dl_isrctn 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/steve-canham/dl_isrctn 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tinyvec v1.11.0 [INFO] [stderr] Downloaded thread-id v5.1.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d9ff65b2a3c050ba337dc4922fb1cfa35947e438968e15114e2faa1f6634b770 [INFO] running `Command { std: "docker" "start" "-a" "d9ff65b2a3c050ba337dc4922fb1cfa35947e438968e15114e2faa1f6634b770", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d9ff65b2a3c050ba337dc4922fb1cfa35947e438968e15114e2faa1f6634b770", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d9ff65b2a3c050ba337dc4922fb1cfa35947e438968e15114e2faa1f6634b770", kill_on_drop: false }` [INFO] [stdout] d9ff65b2a3c050ba337dc4922fb1cfa35947e438968e15114e2faa1f6634b770 [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] 0d2839756cd4dbe0acf9194a00f49ee1676d0c5365dcc76b833cbcb89f1f20e9 [INFO] running `Command { std: "docker" "start" "-a" "0d2839756cd4dbe0acf9194a00f49ee1676d0c5365dcc76b833cbcb89f1f20e9", kill_on_drop: false }` [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking pin-project-lite v0.2.17 [INFO] [stderr] Compiling stable_deref_trait v1.2.1 [INFO] [stderr] Compiling libc v0.2.183 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling zerocopy v0.8.42 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Checking once_cell v1.21.4 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling litemap v0.8.1 [INFO] [stderr] Compiling writeable v0.6.2 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Compiling icu_properties_data v2.1.2 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Compiling futures-core v0.3.32 [INFO] [stderr] Checking futures-io v0.3.32 [INFO] [stderr] Compiling aws-lc-rs v1.16.1 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Compiling lock_api v0.4.14 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling futures-sink v0.3.32 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling percent-encoding v2.3.2 [INFO] [stderr] Compiling bytes v1.11.1 [INFO] [stderr] Compiling form_urlencoded v1.2.2 [INFO] [stderr] Compiling tinyvec v1.11.0 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Compiling zmij v1.0.21 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling itoa v1.0.17 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling mio v1.1.1 [INFO] [stderr] Compiling socket2 v0.6.3 [INFO] [stderr] Compiling getrandom v0.2.17 [INFO] [stderr] Compiling rustls v0.23.37 [INFO] [stderr] Compiling futures-task v0.3.32 [INFO] [stderr] Compiling iana-time-zone v0.1.65 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling cc v1.2.57 [INFO] [stderr] Compiling slab v0.4.12 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling crc v3.4.0 [INFO] [stderr] Compiling event-listener v5.4.1 [INFO] [stderr] Compiling chrono v0.4.44 [INFO] [stderr] Compiling tokio v1.50.0 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling unicode-normalization v0.1.25 [INFO] [stderr] Compiling unicode-bidi v0.3.18 [INFO] [stderr] Compiling unicode-properties v0.1.4 [INFO] [stderr] Compiling hkdf v0.12.4 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Compiling stringprep v0.1.5 [INFO] [stderr] Compiling md-5 v0.10.6 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Compiling futures-channel v0.3.32 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Compiling whoami v1.6.1 [INFO] [stderr] Compiling home v0.5.12 [INFO] [stderr] Checking anstyle-parse v1.0.0 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Compiling getrandom v0.4.2 [INFO] [stderr] Checking colorchoice v1.0.5 [INFO] [stderr] Checking ipnet v2.12.0 [INFO] [stderr] Checking anstyle v1.0.14 [INFO] [stderr] Checking ordered-float v2.10.1 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking winnow v0.7.15 [INFO] [stderr] Checking anstream v1.0.0 [INFO] [stderr] Checking cpufeatures v0.3.0 [INFO] [stderr] Compiling aws-lc-sys v0.38.0 [INFO] [stderr] Checking clap_lex v1.1.0 [INFO] [stderr] Checking ryu v1.0.23 [INFO] [stderr] Checking regex-syntax v0.8.10 [INFO] [stderr] Checking chacha20 v0.10.0 [INFO] [stderr] Checking arc-swap v1.8.2 [INFO] [stderr] Checking serde_spanned v1.0.4 [INFO] [stderr] Checking clap_builder v4.6.0 [INFO] [stderr] Checking toml_datetime v0.7.5+spec-1.1.0 [INFO] [stderr] Checking thread-id v5.1.0 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking mock_instant v0.6.0 [INFO] [stderr] Checking rand v0.10.0 [INFO] [stderr] Checking toml_parser v1.0.9+spec-1.1.0 [INFO] [stderr] Checking toml v0.9.12+spec-1.1.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling tokio-macros v2.6.1 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking clap v4.6.0 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling tokio-stream v0.1.18 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Compiling zerovec v0.11.5 [INFO] [stderr] Compiling zerotrie v0.2.3 [INFO] [stderr] Checking derive_more v2.1.1 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking serde-value v0.7.0 [INFO] [stderr] Checking quick-xml v0.39.2 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking futures-intrusive v0.5.0 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking log4rs v1.4.0 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Compiling url v2.5.8 [INFO] [stderr] Compiling sqlx-core v0.8.6 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Compiling sqlx-postgres v0.8.6 [INFO] [stderr] Checking hyper-util v0.1.20 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Compiling sqlx-macros-core v0.8.6 [INFO] [stderr] Compiling sqlx-macros v0.8.6 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking rustls-platform-verifier v0.6.2 [INFO] [stderr] Checking sqlx v0.8.6 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.13.2 [INFO] [stderr] Checking dl_isrctn v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | import_type: import_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `import_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | start_date: start_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:96:13 [INFO] [stdout] | [INFO] [stdout] 96 | end_date: end_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `end_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | start_date: start_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | end_date: end_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `end_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/config_reader.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | base_url: base_url, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `base_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/mod.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | base_url: base_url, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `base_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/mod.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | json_data_path: json_data_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `json_data_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/mod.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | log_folder_path: log_folder_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `log_folder_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:384:17 [INFO] [stdout] | [INFO] [stdout] 384 | contact_types: contact_types, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contact_types` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:385:17 [INFO] [stdout] | [INFO] [stdout] 385 | address: address, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:386:17 [INFO] [stdout] | [INFO] [stdout] 386 | city: city, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `city` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:387:17 [INFO] [stdout] | [INFO] [stdout] 387 | country: country, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `country` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:388:17 [INFO] [stdout] | [INFO] [stdout] 388 | email: email, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `email` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | address: address, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:420:17 [INFO] [stdout] | [INFO] [stdout] 420 | city: city, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `city` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:421:17 [INFO] [stdout] | [INFO] [stdout] 421 | country: country, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `country` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:422:17 [INFO] [stdout] | [INFO] [stdout] 422 | email: email, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `email` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:482:13 [INFO] [stdout] | [INFO] [stdout] 482 | l_age_limit: l_age_limit, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `l_age_limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:483:13 [INFO] [stdout] | [INFO] [stdout] 483 | l_age_limit_num: l_age_limit_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `l_age_limit_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:484:13 [INFO] [stdout] | [INFO] [stdout] 484 | l_age_limit_units: l_age_limit_units, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `l_age_limit_units` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:485:13 [INFO] [stdout] | [INFO] [stdout] 485 | u_age_limit: u_age_limit, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u_age_limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | u_age_limit_num: u_age_limit_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u_age_limit_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | u_age_limit_units: u_age_limit_units, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u_age_limit_units` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:651:21 [INFO] [stdout] | [INFO] [stdout] 651 | file_id: file_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `file_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:653:21 [INFO] [stdout] | [INFO] [stdout] 653 | download_filename: download_filename, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `download_filename` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:654:21 [INFO] [stdout] | [INFO] [stdout] 654 | version: version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:655:21 [INFO] [stdout] | [INFO] [stdout] 655 | length: length, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:656:21 [INFO] [stdout] | [INFO] [stdout] 656 | mime_type: mime_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mime_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:340:9 [INFO] [stdout] | [INFO] [stdout] 340 | display_title: display_title, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `display_title` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:342:9 [INFO] [stdout] | [INFO] [stdout] 342 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:348:9 [INFO] [stdout] | [INFO] [stdout] 348 | date_last_revised: date_last_revised, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `date_last_revised` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | dt_of_data_fetch: dt_of_data_fetch, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dt_of_data_fetch` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:360:9 [INFO] [stdout] | [INFO] [stdout] 360 | reg_year: reg_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `reg_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:361:9 [INFO] [stdout] | [INFO] [stdout] 361 | reg_month: reg_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reg_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:362:9 [INFO] [stdout] | [INFO] [stdout] 362 | reg_date_type: reg_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reg_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:363:9 [INFO] [stdout] | [INFO] [stdout] 363 | start_year: start_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:364:9 [INFO] [stdout] | [INFO] [stdout] 364 | start_month: start_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:365:9 [INFO] [stdout] | [INFO] [stdout] 365 | start_date_type: start_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | comp_year: comp_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `comp_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:367:9 [INFO] [stdout] | [INFO] [stdout] 367 | comp_month: comp_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `comp_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:368:9 [INFO] [stdout] | [INFO] [stdout] 368 | comp_date_type: comp_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `comp_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:369:9 [INFO] [stdout] | [INFO] [stdout] 369 | res_year: res_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `res_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:370:9 [INFO] [stdout] | [INFO] [stdout] 370 | res_month: res_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `res_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | res_date_type: res_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `res_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | enrolment: enrolment, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `enrolment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:449:9 [INFO] [stdout] | [INFO] [stdout] 449 | enrolment_type: enrolment_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `enrolment_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:451:9 [INFO] [stdout] | [INFO] [stdout] 451 | gender_flag: gender_flag, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gender_flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | min_age: min_age, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `min_age` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:456:9 [INFO] [stdout] | [INFO] [stdout] 456 | max_age: max_age, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `max_age` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:458:9 [INFO] [stdout] | [INFO] [stdout] 458 | age_group_flag: age_group_flag, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `age_group_flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:911:33 [INFO] [stdout] | [INFO] [stdout] 911 | ... source: source, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `source` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:912:33 [INFO] [stdout] | [INFO] [stdout] 912 | ... topic_type: topic_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `topic_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:919:33 [INFO] [stdout] | [INFO] [stdout] 919 | ... source: source, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `source` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:920:33 [INFO] [stdout] | [INFO] [stdout] 920 | ... topic_type: topic_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `topic_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1136:21 [INFO] [stdout] | [INFO] [stdout] 1136 | pub_id: pub_id, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `pub_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1137:21 [INFO] [stdout] | [INFO] [stdout] 1137 | pub_id_type: pub_id_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pub_id_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1193:21 [INFO] [stdout] | [INFO] [stdout] 1193 | access_url: access_url, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `access_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1195:21 [INFO] [stdout] | [INFO] [stdout] 1195 | instance_type: instance_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instance_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1390:17 [INFO] [stdout] | [INFO] [stdout] 1390 | object_id: object_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `object_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1391:17 [INFO] [stdout] | [INFO] [stdout] 1391 | object_id_type: object_id_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `object_id_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1393:17 [INFO] [stdout] | [INFO] [stdout] 1393 | display_name: display_name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `display_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1397:17 [INFO] [stdout] | [INFO] [stdout] 1397 | instance_notes: instance_notes, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instance_notes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1408:9 [INFO] [stdout] | [INFO] [stdout] 1408 | sd_sid: sd_sid, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `sd_sid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1409:9 [INFO] [stdout] | [INFO] [stdout] 1409 | summary: summary, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `summary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1410:9 [INFO] [stdout] | [INFO] [stdout] 1410 | dates: dates, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1411:9 [INFO] [stdout] | [INFO] [stdout] 1411 | participants: participants, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `participants` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_fns.rs:210:25 [INFO] [stdout] | [INFO] [stdout] 210 | tag: tag, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `tag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_fns.rs:718:17 [INFO] [stdout] | [INFO] [stdout] 718 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | import_type: import_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `import_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | start_date: start_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:96:13 [INFO] [stdout] | [INFO] [stdout] 96 | end_date: end_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `end_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_structs.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_structs.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | indent_seq_num: indent_seq_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `indent_seq_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_structs.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | sequence_string: sequence_string, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sequence_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | start_date: start_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/cli_reader.rs:128:13 [INFO] [stdout] | [INFO] [stdout] 128 | end_date: end_date, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `end_date` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/config_reader.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | base_url: base_url, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `base_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/mod.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | base_url: base_url, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `base_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/mod.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | json_data_path: json_data_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `json_data_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/setup/mod.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | log_folder_path: log_folder_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `log_folder_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/setup/mod.rs:140:1 [INFO] [stdout] | [INFO] [stdout] 140 | / #[cfg(test)] [INFO] [stdout] 141 | | [INFO] [stdout] | |_^ [INFO] [stdout] 142 | mod tests { [INFO] [stdout] | --------- the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:384:17 [INFO] [stdout] | [INFO] [stdout] 384 | contact_types: contact_types, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contact_types` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:385:17 [INFO] [stdout] | [INFO] [stdout] 385 | address: address, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:386:17 [INFO] [stdout] | [INFO] [stdout] 386 | city: city, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `city` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:387:17 [INFO] [stdout] | [INFO] [stdout] 387 | country: country, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `country` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:388:17 [INFO] [stdout] | [INFO] [stdout] 388 | email: email, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `email` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:419:17 [INFO] [stdout] | [INFO] [stdout] 419 | address: address, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:420:17 [INFO] [stdout] | [INFO] [stdout] 420 | city: city, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `city` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:421:17 [INFO] [stdout] | [INFO] [stdout] 421 | country: country, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `country` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:422:17 [INFO] [stdout] | [INFO] [stdout] 422 | email: email, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `email` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:482:13 [INFO] [stdout] | [INFO] [stdout] 482 | l_age_limit: l_age_limit, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `l_age_limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:483:13 [INFO] [stdout] | [INFO] [stdout] 483 | l_age_limit_num: l_age_limit_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `l_age_limit_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:484:13 [INFO] [stdout] | [INFO] [stdout] 484 | l_age_limit_units: l_age_limit_units, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `l_age_limit_units` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:485:13 [INFO] [stdout] | [INFO] [stdout] 485 | u_age_limit: u_age_limit, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u_age_limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:486:13 [INFO] [stdout] | [INFO] [stdout] 486 | u_age_limit_num: u_age_limit_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u_age_limit_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:487:13 [INFO] [stdout] | [INFO] [stdout] 487 | u_age_limit_units: u_age_limit_units, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u_age_limit_units` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:651:21 [INFO] [stdout] | [INFO] [stdout] 651 | file_id: file_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `file_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:653:21 [INFO] [stdout] | [INFO] [stdout] 653 | download_filename: download_filename, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `download_filename` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:654:21 [INFO] [stdout] | [INFO] [stdout] 654 | version: version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:655:21 [INFO] [stdout] | [INFO] [stdout] 655 | length: length, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `length` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/download/processor.rs:656:21 [INFO] [stdout] | [INFO] [stdout] 656 | mime_type: mime_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mime_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:340:9 [INFO] [stdout] | [INFO] [stdout] 340 | display_title: display_title, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `display_title` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:342:9 [INFO] [stdout] | [INFO] [stdout] 342 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:348:9 [INFO] [stdout] | [INFO] [stdout] 348 | date_last_revised: date_last_revised, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `date_last_revised` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | dt_of_data_fetch: dt_of_data_fetch, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dt_of_data_fetch` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:360:9 [INFO] [stdout] | [INFO] [stdout] 360 | reg_year: reg_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `reg_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:361:9 [INFO] [stdout] | [INFO] [stdout] 361 | reg_month: reg_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reg_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:362:9 [INFO] [stdout] | [INFO] [stdout] 362 | reg_date_type: reg_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reg_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:363:9 [INFO] [stdout] | [INFO] [stdout] 363 | start_year: start_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:364:9 [INFO] [stdout] | [INFO] [stdout] 364 | start_month: start_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:365:9 [INFO] [stdout] | [INFO] [stdout] 365 | start_date_type: start_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | comp_year: comp_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `comp_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:367:9 [INFO] [stdout] | [INFO] [stdout] 367 | comp_month: comp_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `comp_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:368:9 [INFO] [stdout] | [INFO] [stdout] 368 | comp_date_type: comp_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `comp_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:369:9 [INFO] [stdout] | [INFO] [stdout] 369 | res_year: res_year, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `res_year` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:370:9 [INFO] [stdout] | [INFO] [stdout] 370 | res_month: res_month, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `res_month` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | res_date_type: res_date_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `res_date_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | enrolment: enrolment, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `enrolment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:449:9 [INFO] [stdout] | [INFO] [stdout] 449 | enrolment_type: enrolment_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `enrolment_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:451:9 [INFO] [stdout] | [INFO] [stdout] 451 | gender_flag: gender_flag, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gender_flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | min_age: min_age, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `min_age` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:456:9 [INFO] [stdout] | [INFO] [stdout] 456 | max_age: max_age, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `max_age` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:458:9 [INFO] [stdout] | [INFO] [stdout] 458 | age_group_flag: age_group_flag, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `age_group_flag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:911:33 [INFO] [stdout] | [INFO] [stdout] 911 | ... source: source, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `source` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:912:33 [INFO] [stdout] | [INFO] [stdout] 912 | ... topic_type: topic_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `topic_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:919:33 [INFO] [stdout] | [INFO] [stdout] 919 | ... source: source, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `source` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:920:33 [INFO] [stdout] | [INFO] [stdout] 920 | ... topic_type: topic_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `topic_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1136:21 [INFO] [stdout] | [INFO] [stdout] 1136 | pub_id: pub_id, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `pub_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1137:21 [INFO] [stdout] | [INFO] [stdout] 1137 | pub_id_type: pub_id_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pub_id_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1193:21 [INFO] [stdout] | [INFO] [stdout] 1193 | access_url: access_url, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `access_url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1195:21 [INFO] [stdout] | [INFO] [stdout] 1195 | instance_type: instance_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instance_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1390:17 [INFO] [stdout] | [INFO] [stdout] 1390 | object_id: object_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `object_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1391:17 [INFO] [stdout] | [INFO] [stdout] 1391 | object_id_type: object_id_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `object_id_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1393:17 [INFO] [stdout] | [INFO] [stdout] 1393 | display_name: display_name, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `display_name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1397:17 [INFO] [stdout] | [INFO] [stdout] 1397 | instance_notes: instance_notes, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `instance_notes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1408:9 [INFO] [stdout] | [INFO] [stdout] 1408 | sd_sid: sd_sid, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `sd_sid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1409:9 [INFO] [stdout] | [INFO] [stdout] 1409 | summary: summary, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `summary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1410:9 [INFO] [stdout] | [INFO] [stdout] 1410 | dates: dates, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `dates` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/import/processor.rs:1411:9 [INFO] [stdout] | [INFO] [stdout] 1411 | participants: participants, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `participants` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data_models/xml_models.rs:1810:9 [INFO] [stdout] | [INFO] [stdout] 1810 | country_list: country_list, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `country_list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data_models/xml_models.rs:1811:9 [INFO] [stdout] | [INFO] [stdout] 1811 | centre_list: centre_list, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `centre_list` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data_models/xml_models.rs:1920:13 [INFO] [stdout] | [INFO] [stdout] 1920 | isrctn: isrctn, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `isrctn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data_models/xml_models.rs:1929:13 [INFO] [stdout] | [INFO] [stdout] 1929 | parties: parties, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `parties` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_fns.rs:210:25 [INFO] [stdout] | [INFO] [stdout] 210 | tag: tag, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `tag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_fns.rs:718:17 [INFO] [stdout] | [INFO] [stdout] 718 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_structs.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_structs.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | indent_seq_num: indent_seq_num, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `indent_seq_num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/iec/iec_structs.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | sequence_string: sequence_string, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sequence_string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/setup/cli_reader.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | return Result::Err(AppError::MissingProgramParameter("year for type w download".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 106 - return Result::Err(AppError::MissingProgramParameter("year for type w download".to_string())); [INFO] [stdout] 106 + Result::Err(AppError::MissingProgramParameter("year for type w download".to_string())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/setup/cli_reader.rs:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let year: i32 = year_as_string.parse().unwrap_or_else(|_| 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 103 - let year: i32 = year_as_string.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 103 + let year: i32 = year_as_string.parse().unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/setup/cli_reader.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 138 | / let res = match config_path.try_exists() { [INFO] [stdout] 139 | | Ok(true) => true, [INFO] [stdout] 140 | | Ok(false) => false, [INFO] [stdout] 141 | | Err(_e) => false, [INFO] [stdout] 142 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 143 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 138 ~ [INFO] [stdout] 139 ~ match config_path.try_exists() { [INFO] [stdout] 140 + Ok(true) => true, [INFO] [stdout] 141 + Ok(false) => false, [INFO] [stdout] 142 + Err(_e) => false, [INFO] [stdout] 143 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/setup/config_reader.rs:66:52 [INFO] [stdout] | [INFO] [stdout] 66 | let toml_config = toml::from_str::(&config_string) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `config_string` [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: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/setup/config_reader.rs:135:26 [INFO] [stdout] | [INFO] [stdout] 135 | let db_port: usize = db_port_as_string.parse().unwrap_or_else(|_| 5432); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 135 - let db_port: usize = db_port_as_string.parse().unwrap_or_else(|_| 5432); [INFO] [stdout] 135 + let db_port: usize = db_port_as_string.parse().unwrap_or(5432); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/setup/config_reader.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | / return Result::Err(AppError::ConfigurationError("Essential configuration value missing or misspelt.".to_string(), [INFO] [stdout] 161 | | format!("Cannot find a value for {} ({}).", value_name, config_name))) [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] 160 ~ Result::Err(AppError::ConfigurationError("Essential configuration value missing or misspelt.".to_string(), [INFO] [stdout] 161 + format!("Cannot find a value for {} ({}).", value_name, config_name))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"none"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:158:47 [INFO] [stdout] | [INFO] [stdout] 158 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"none"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:176:47 [INFO] [stdout] | [INFO] [stdout] 176 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/setup/mod.rs:32:67 [INFO] [stdout] | [INFO] [stdout] 32 | let config_file: Config = config_reader::populate_config_vars(&config_string)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `config_string` [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 `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/setup/mod.rs:59:31 [INFO] [stdout] | [INFO] [stdout] 59 | fn folder_exists(folder_name: &PathBuf) -> bool { [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] 59 - fn folder_exists(folder_name: &PathBuf) -> bool { [INFO] [stdout] 59 + fn folder_exists(folder_name: &Path) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/setup/mod.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 60 | / let res = match folder_name.try_exists() { [INFO] [stdout] 61 | | Ok(true) => true, [INFO] [stdout] 62 | | Ok(false) => false, [INFO] [stdout] 63 | | Err(_e) => false, [INFO] [stdout] 64 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 65 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 60 ~ [INFO] [stdout] 61 ~ match folder_name.try_exists() { [INFO] [stdout] 62 + Ok(true) => true, [INFO] [stdout] 63 + Ok(false) => false, [INFO] [stdout] 64 + Err(_e) => false, [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/setup/mod.rs:126:40 [INFO] [stdout] | [INFO] [stdout] 126 | log_helper::log_startup_params(¶ms); [INFO] [stdout] | ^^^^^^^ help: change this to: `params` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/setup/mod.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | / match LOG_RUNNING.get() { [INFO] [stdout] 133 | | Some(_) => true, [INFO] [stdout] 134 | | None => false, [INFO] [stdout] 135 | | } [INFO] [stdout] | |_____^ help: try: `LOG_RUNNING.get().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/err.rs:59:33 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn report_error(e: AppError) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` 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/err.rs:105:47 [INFO] [stdout] | [INFO] [stdout] 105 | let hdr_line = get_header_line (star_num, &header); [INFO] [stdout] | ^^^^^^^ help: change this to: `header` [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/err.rs:113:47 [INFO] [stdout] | [INFO] [stdout] 113 | let hdr_line = get_header_line (star_num, &header); [INFO] [stdout] | ^^^^^^^ help: change this to: `header` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/err.rs:122:8 [INFO] [stdout] | [INFO] [stdout] 122 | if hdr_len % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!hdr_len.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `base_types::DownloadType` [INFO] [stdout] --> src/base_types.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn to_string(&self) -> String { [INFO] [stdout] 26 | | match self { [INFO] [stdout] 27 | | DownloadType::Recent => "Recently updated".to_string(), [INFO] [stdout] 28 | | DownloadType::BetweenDates => "Updated between dates".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `base_types::DownloadType` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DownloadResult` [INFO] [stdout] --> src/base_types.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new() -> Self { [INFO] [stdout] 44 | | DownloadResult { [INFO] [stdout] 45 | | num_checked: 0, [INFO] [stdout] 46 | | num_downloaded: 0, [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for DownloadResult { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `base_types::ImportType` [INFO] [stdout] --> src/base_types.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / pub fn to_string(&self) -> String { [INFO] [stdout] 74 | | match self { [INFO] [stdout] 75 | | ImportType::None => "None".to_string(), [INFO] [stdout] 76 | | ImportType::Recent => "Recently downloaded".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `base_types::ImportType` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/download/processor.rs:96:53 [INFO] [stdout] | [INFO] [stdout] 96 | ... if RE_CPMS_NUM.is_match(&id) { // already a digit string [INFO] [stdout] | ^^^ help: change this to: `id` [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/download/processor.rs:106:53 [INFO] [stdout] | [INFO] [stdout] 106 | ... if RE_NIHR_NUM.is_match(&id) { // already a digit string [INFO] [stdout] | ^^^ help: change this to: `id` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/download/processor.rs:121:51 [INFO] [stdout] | [INFO] [stdout] 121 | ... if type_string == "???".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"???"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/download/processor.rs:147:55 [INFO] [stdout] | [INFO] [stdout] 147 | ... if type_string == "???".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"???"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/download/processor.rs:178:51 [INFO] [stdout] | [INFO] [stdout] 178 | ... if type_string == "???".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"???"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:225:8 [INFO] [stdout] | [INFO] [stdout] 225 | if d.primary_outcomes.outcome_measures.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.primary_outcomes.outcome_measures.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:237:8 [INFO] [stdout] | [INFO] [stdout] 237 | if d.secondary_outcomes.outcome_measures.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.secondary_outcomes.outcome_measures.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:256:8 [INFO] [stdout] | [INFO] [stdout] 256 | if d.ethics_committee_list.ethics_committees.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.ethics_committee_list.ethics_committees.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/download/processor.rs:283:5 [INFO] [stdout] | [INFO] [stdout] 283 | / if let Some(tts) = ds.trial_type_list { [INFO] [stdout] 284 | | if tts.trial_types.len() > 0 { [INFO] [stdout] 285 | | for tt in tts.trial_types { [INFO] [stdout] 286 | | if let Some(s) = tt.trial_type.as_text_opt(){ [INFO] [stdout] ... | [INFO] [stdout] 291 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 283 ~ if let Some(tts) = ds.trial_type_list [INFO] [stdout] 284 ~ && tts.trial_types.len() > 0 { [INFO] [stdout] 285 | for tt in tts.trial_types { [INFO] [stdout] ... [INFO] [stdout] 289 | } [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:284:12 [INFO] [stdout] | [INFO] [stdout] 284 | if tts.trial_types.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tts.trial_types.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/download/processor.rs:296:5 [INFO] [stdout] | [INFO] [stdout] 296 | / if let Some(tss) = ds.trial_setting_list { [INFO] [stdout] 297 | | if tss.trial_settings.len() > 0 { [INFO] [stdout] 298 | | for ts in tss.trial_settings { [INFO] [stdout] 299 | | if let Some(s) = ts.trial_setting.as_text_opt(){ [INFO] [stdout] ... | [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 296 ~ if let Some(tss) = ds.trial_setting_list [INFO] [stdout] 297 ~ && tss.trial_settings.len() > 0 { [INFO] [stdout] 298 | for ts in tss.trial_settings { [INFO] [stdout] ... [INFO] [stdout] 302 | } [INFO] [stdout] 303 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if tss.trial_settings.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tss.trial_settings.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:311:8 [INFO] [stdout] | [INFO] [stdout] 311 | if study.condition_list.conditions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!study.condition_list.conditions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:331:8 [INFO] [stdout] | [INFO] [stdout] 331 | if study.intervention_list.interventions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!study.intervention_list.interventions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:353:8 [INFO] [stdout] | [INFO] [stdout] 353 | if s.contacts.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.contacts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:357:16 [INFO] [stdout] | [INFO] [stdout] 357 | if c.contact_type_list.contact_types.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.contact_type_list.contact_types.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:398:8 [INFO] [stdout] | [INFO] [stdout] 398 | if s.sponsors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.sponsors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:433:8 [INFO] [stdout] | [INFO] [stdout] 433 | if s.funders.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.funders.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:448:8 [INFO] [stdout] | [INFO] [stdout] 448 | if p.participant_type_list.participant_types.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!p.participant_type_list.participant_types.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:507:8 [INFO] [stdout] | [INFO] [stdout] 507 | if p.centre_list.centres.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!p.centre_list.centres.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:522:8 [INFO] [stdout] | [INFO] [stdout] 522 | if p.country_list.countries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!p.country_list.countries.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:554:12 [INFO] [stdout] | [INFO] [stdout] 554 | if s_countries.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s_countries.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:579:8 [INFO] [stdout] | [INFO] [stdout] 579 | if r.data_policy_list.data_policies.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!r.data_policy_list.data_policies.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/download/processor.rs:708:5 [INFO] [stdout] | [INFO] [stdout] 708 | / if let Some(b) = study.miscellaneous.ipd_sharing_plan { [INFO] [stdout] 709 | | if b.to_ascii_lowercase() == "yes" { [INFO] [stdout] 710 | | has_sharing_plan = true; [INFO] [stdout] 711 | | } [INFO] [stdout] 712 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 708 ~ if let Some(b) = study.miscellaneous.ipd_sharing_plan [INFO] [stdout] 709 ~ && b.to_ascii_lowercase() == "yes" { [INFO] [stdout] 710 | has_sharing_plan = true; [INFO] [stdout] 711 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/download/processor.rs:709:12 [INFO] [stdout] | [INFO] [stdout] 709 | if b.to_ascii_lowercase() == "yes" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 709 - if b.to_ascii_lowercase() == "yes" { [INFO] [stdout] 709 + if b.eq_ignore_ascii_case("yes") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/download/monitoring.rs:10:63 [INFO] [stdout] | [INFO] [stdout] 10 | record_date: &Option, full_path: &PathBuf, src_pool: &Pool) -> 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] 10 - record_date: &Option, full_path: &PathBuf, src_pool: &Pool) -> Result { [INFO] [stdout] 10 + record_date: &Option, full_path: &Path, src_pool: &Pool) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/download/monitoring.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | sqlx::query(&sql).bind(sd_sid).bind(remote_url).bind(record_date) [INFO] [stdout] | ^^^^ help: change this to: `sql` [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/download/monitoring.rs:37:25 [INFO] [stdout] | [INFO] [stdout] 37 | sqlx::query(&sql).bind(sd_sid).bind(remote_url).bind(record_date) [INFO] [stdout] | ^^^^ help: change this to: `sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / match RE_IRASC.captures(&this_id) { [INFO] [stdout] 30 | | Some(s) => { [INFO] [stdout] 31 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 32 | | }, [INFO] [stdout] 33 | | None => {}, // no iras match at all [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 29 ~ if let Some(s) = RE_IRASC.captures(&this_id) { [INFO] [stdout] 30 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / match RE_CPMSC.captures(&this_id) { [INFO] [stdout] 37 | | Some(s) => { [INFO] [stdout] 38 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 39 | | }, [INFO] [stdout] 40 | | None => {}, // no cpms match at all [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 36 ~ if let Some(s) = RE_CPMSC.captures(&this_id) { [INFO] [stdout] 37 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / match RE_NIHRC.captures(&this_id) { [INFO] [stdout] 44 | | Some(s) => { [INFO] [stdout] 45 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 46 | | }, [INFO] [stdout] 47 | | None => {}, // no nihr match at all [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 43 ~ if let Some(s) = RE_NIHRC.captures(&this_id) { [INFO] [stdout] 44 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / match RE_HTAC.captures(&this_id) { [INFO] [stdout] 51 | | Some(s) => { [INFO] [stdout] 52 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 53 | | }, [INFO] [stdout] 54 | | None => {}, // no hta match at all [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(s) = RE_HTAC.captures(&this_id) { [INFO] [stdout] 51 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/download/mod.rs:131:31 [INFO] [stdout] | [INFO] [stdout] 131 | async fn get_study_count(url: &String) -> 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] 131 ~ async fn get_study_count(url: &str) -> Result { [INFO] [stdout] 132 | [INFO] [stdout] 133 ~ let response = reqwest::get(url.to_owned()).await [INFO] [stdout] 134 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 135 | [INFO] [stdout] ... [INFO] [stdout] 146 | let xml_content = response.text().await [INFO] [stdout] 147 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 148 | [INFO] [stdout] 149 | let trials_count: TrialsCount = de::from_str(&xml_content) [INFO] [stdout] 150 ~ .map_err(|e| AppError::QuickXMLError(url.to_owned(), e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/download/mod.rs:157:27 [INFO] [stdout] | [INFO] [stdout] 157 | async fn get_studies(url: &String) -> 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] 157 ~ async fn get_studies(url: &str) -> Result { [INFO] [stdout] 158 | [INFO] [stdout] 159 ~ let response = reqwest::get(url.to_owned()).await [INFO] [stdout] 160 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 161 | [INFO] [stdout] ... [INFO] [stdout] 172 | let xml_content = response.text().await [INFO] [stdout] 173 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 174 | [INFO] [stdout] 175 | de::from_str(&xml_content) [INFO] [stdout] 176 ~ .map_err(|e| AppError::QuickXMLError(url.to_owned(), e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/download/mod.rs:255:31 [INFO] [stdout] | [INFO] [stdout] 255 | fn folder_exists(folder_name: &PathBuf) -> bool { [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] 255 - fn folder_exists(folder_name: &PathBuf) -> bool { [INFO] [stdout] 255 + fn folder_exists(folder_name: &Path) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/download/mod.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 256 | / let res = match folder_name.try_exists() { [INFO] [stdout] 257 | | Ok(true) => true, [INFO] [stdout] 258 | | Ok(false) => false, [INFO] [stdout] 259 | | Err(_e) => false, [INFO] [stdout] 260 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 261 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 256 ~ [INFO] [stdout] 257 ~ match folder_name.try_exists() { [INFO] [stdout] 258 + Ok(true) => true, [INFO] [stdout] 259 + Ok(false) => false, [INFO] [stdout] 260 + Err(_e) => false, [INFO] [stdout] 261 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/import/monitoring.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | sqlx::query(&sql).bind(sd_sid).bind(imp_event_id).bind(now) [INFO] [stdout] | ^^^^ help: change this to: `sql` [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: called `unwrap` on `sci_title_db` after checking its variant with `is_some` [INFO] [stdout] --> src/import/processor.rs:127:48 [INFO] [stdout] | [INFO] [stdout] 127 | if sci_title_db.is_some() {db_ts.push (sci_title_db.unwrap());} [INFO] [stdout] | ------------------------- ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = sci_title_db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `acronym_db` after checking its variant with `is_some` [INFO] [stdout] --> src/import/processor.rs:128:46 [INFO] [stdout] | [INFO] [stdout] 128 | if acronym_db.is_some() {db_ts.push (acronym_db.unwrap());} [INFO] [stdout] | ----------------------- ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = acronym_db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `acronym_db` after checking its variant with `is_some` [INFO] [stdout] --> src/import/processor.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | if acronym_db.is_some() {db_ts.push (acronym_db.unwrap());} [INFO] [stdout] | ----------------------- ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = acronym_db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::filter` [INFO] [stdout] --> src/import/processor.rs:188:27 [INFO] [stdout] | [INFO] [stdout] 188 | let mut description = match s.summary.plain_english_summary.clone() { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 189 | | Some (s) => { [INFO] [stdout] 190 | | if s.to_lowercase().starts_with("not provided") { [INFO] [stdout] 191 | | None [INFO] [stdout] ... | [INFO] [stdout] 197 | | None => None, [INFO] [stdout] 198 | | }; [INFO] [stdout] | |_____^ help: try: `s.summary.plain_english_summary.clone().filter(|s| !s.to_lowercase().starts_with("not provided"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter [INFO] [stdout] = note: `#[warn(clippy::manual_filter)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/import/processor.rs:202:8 [INFO] [stdout] | [INFO] [stdout] 202 | if description == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `description.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:320:25 [INFO] [stdout] | [INFO] [stdout] 320 | let status_opt = if status_string == "" {None} else {Some(status_string.to_string())}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `status_string.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: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:326:17 [INFO] [stdout] | [INFO] [stdout] 326 | / match NaiveDate::parse_from_str(&ds[..10], "%Y-%m-%d") { [INFO] [stdout] 327 | | Ok(d) =>Some(d), [INFO] [stdout] 328 | | Err(_) => None, [INFO] [stdout] 329 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds[..10], "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:525:21 [INFO] [stdout] | [INFO] [stdout] 525 | / if let Some(true) = dbo.is_sponsor { [INFO] [stdout] 526 | | if dbo.org_name == fname { // Change contribution type and try to combine information [INFO] [stdout] 527 | | dbo.is_funder = Some(true); [INFO] [stdout] 528 | | dbo.org_cref_id = f.fund_ref.clone(); [INFO] [stdout] ... | [INFO] [stdout] 532 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 525 ~ if let Some(true) = dbo.is_sponsor [INFO] [stdout] 526 ~ && dbo.org_name == fname { // Change contribution type and try to combine information [INFO] [stdout] 527 | dbo.is_funder = Some(true); [INFO] [stdout] ... [INFO] [stdout] 530 | break; [INFO] [stdout] 531 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:563:13 [INFO] [stdout] | [INFO] [stdout] 563 | / if c.surname.appears_plausible_person_name() { [INFO] [stdout] 564 | | if let Some(cts) = &c.contact_types { [INFO] [stdout] 565 | | let mut role_list = "".to_string(); [INFO] [stdout] 566 | | for ct in cts { [INFO] [stdout] ... | [INFO] [stdout] 589 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 563 ~ if c.surname.appears_plausible_person_name() [INFO] [stdout] 564 ~ && let Some(cts) = &c.contact_types { [INFO] [stdout] 565 | let mut role_list = "".to_string(); [INFO] [stdout] ... [INFO] [stdout] 587 | } [INFO] [stdout] 588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:571:32 [INFO] [stdout] | [INFO] [stdout] 571 | ... if role_list == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `role_list.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: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:579:24 [INFO] [stdout] | [INFO] [stdout] 579 | if role_list != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!role_list.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: stripping a prefix manually [INFO] [stdout] --> src/import/processor.rs:643:39 [INFO] [stdout] | [INFO] [stdout] 643 | ... c2 = Some(c2_section[9..].trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/import/processor.rs:642:25 [INFO] [stdout] | [INFO] [stdout] 642 | if c2_section.starts_with("Subtopic:") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 642 ~ if let Some() = c2_section.strip_prefix("Subtopic:") { [INFO] [stdout] 643 ~ c2 = Some(.trim().to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/import/processor.rs:646:41 [INFO] [stdout] | [INFO] [stdout] 646 | ... desc = Some(desc_section[8..].trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/import/processor.rs:645:25 [INFO] [stdout] | [INFO] [stdout] 645 | if desc_section.starts_with("Disease:") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 645 ~ if let Some() = desc_section.strip_prefix("Disease:") { [INFO] [stdout] 646 ~ desc = Some(.trim().to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:688:5 [INFO] [stdout] | [INFO] [stdout] 688 | / if type_id == 11 { [INFO] [stdout] 689 | | if let Some(ints) = &s.interventions { [INFO] [stdout] 690 | | for int in ints { [INFO] [stdout] 691 | | if let Some(p) = &int.phase { [INFO] [stdout] ... | [INFO] [stdout] 714 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 688 ~ if type_id == 11 [INFO] [stdout] 689 ~ && let Some(ints) = &s.interventions { [INFO] [stdout] 690 | for int in ints { [INFO] [stdout] ... [INFO] [stdout] 712 | } [INFO] [stdout] 713 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:720:18 [INFO] [stdout] | [INFO] [stdout] 720 | if design != "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:852:13 [INFO] [stdout] | [INFO] [stdout] 852 | / if let Some(dn) = &int.drug_names.clean() { [INFO] [stdout] 853 | | if !dn.to_lowercase().starts_with("the sponsor has confirmed") [INFO] [stdout] 854 | | && !dn.to_lowercase().starts_with("the health research authority") [INFO] [stdout] 855 | | && !dn.to_lowercase().starts_with("not provided") [INFO] [stdout] ... | [INFO] [stdout] 925 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 852 ~ if let Some(dn) = &int.drug_names.clean() [INFO] [stdout] 853 ~ && !dn.to_lowercase().starts_with("the sponsor has confirmed") [INFO] [stdout] 854 | && !dn.to_lowercase().starts_with("the health research authority") [INFO] [stdout] ... [INFO] [stdout] 923 | } [INFO] [stdout] 924 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:937:5 [INFO] [stdout] | [INFO] [stdout] 937 | / if incs.is_not_a_place_holder() { [INFO] [stdout] 938 | | if let Some(inc_para) = incs { [INFO] [stdout] 939 | | let (inc_result_code, mut inc_criteria) = original_process_iec(&sd_sid, &inc_para, "inclusion"); [INFO] [stdout] 940 | | inc_result = inc_result_code; [INFO] [stdout] ... | [INFO] [stdout] 946 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 937 ~ if incs.is_not_a_place_holder() [INFO] [stdout] 938 ~ && let Some(inc_para) = incs { [INFO] [stdout] 939 | let (inc_result_code, mut inc_criteria) = original_process_iec(&sd_sid, &inc_para, "inclusion"); [INFO] [stdout] ... [INFO] [stdout] 944 | } [INFO] [stdout] 945 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/import/processor.rs:939:85 [INFO] [stdout] | [INFO] [stdout] 939 | let (inc_result_code, mut inc_criteria) = original_process_iec(&sd_sid, &inc_para, "inclusion"); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `inc_para` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/import/processor.rs:942:16 [INFO] [stdout] | [INFO] [stdout] 942 | if inc_criteria.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!inc_criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:949:5 [INFO] [stdout] | [INFO] [stdout] 949 | / if excs.is_not_a_place_holder() { [INFO] [stdout] 950 | | if let Some(exc_para) = excs { [INFO] [stdout] 951 | | let (exc_result_code, mut exc_criteria) = original_process_iec(&sd_sid , &exc_para, "exclusion"); [INFO] [stdout] 952 | | exc_result = exc_result_code; [INFO] [stdout] ... | [INFO] [stdout] 958 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 949 ~ if excs.is_not_a_place_holder() [INFO] [stdout] 950 ~ && let Some(exc_para) = excs { [INFO] [stdout] 951 | let (exc_result_code, mut exc_criteria) = original_process_iec(&sd_sid , &exc_para, "exclusion"); [INFO] [stdout] ... [INFO] [stdout] 956 | } [INFO] [stdout] 957 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/import/processor.rs:951:86 [INFO] [stdout] | [INFO] [stdout] 951 | let (exc_result_code, mut exc_criteria) = original_process_iec(&sd_sid , &exc_para, "exclusion"); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `exc_para` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/import/processor.rs:954:16 [INFO] [stdout] | [INFO] [stdout] 954 | if exc_criteria.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exc_criteria.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: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:973:29 [INFO] [stdout] | [INFO] [stdout] 973 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 974 | | Ok(d) => Some(d), [INFO] [stdout] 975 | | Err(_) => None, [INFO] [stdout] 976 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:981:29 [INFO] [stdout] | [INFO] [stdout] 981 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 982 | | Ok(d) => Some(d), [INFO] [stdout] 983 | | Err(_) => None, [INFO] [stdout] 984 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/import/processor.rs:1077:21 [INFO] [stdout] | [INFO] [stdout] 1077 | / match RE_PM.captures(&external_url.clone()) { [INFO] [stdout] 1078 | | Some(s) => { [INFO] [stdout] 1079 | | pmid_as_str = s[0].to_string(); [INFO] [stdout] 1080 | | external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmid_as_str); [INFO] [stdout] ... | [INFO] [stdout] 1085 | | None => {}, [INFO] [stdout] 1086 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1077 ~ if let Some(s) = RE_PM.captures(&external_url.clone()) { [INFO] [stdout] 1078 + pmid_as_str = s[0].to_string(); [INFO] [stdout] 1079 + external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmid_as_str); [INFO] [stdout] 1080 + pub_id = pmid_as_str.clone(); [INFO] [stdout] 1081 + pub_id_type = "PMID".to_string(); [INFO] [stdout] 1082 + categorised =true; [INFO] [stdout] 1083 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/import/processor.rs:1095:31 [INFO] [stdout] | [INFO] [stdout] 1095 | doi = (&low_url[19..]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `low_url[19..]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/import/processor.rs:1098:30 [INFO] [stdout] | [INFO] [stdout] 1098 | doi= (&low_url[16..]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `low_url[16..]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/import/processor.rs:1101:30 [INFO] [stdout] | [INFO] [stdout] 1101 | doi= (&low_url[20..]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `low_url[20..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/import/processor.rs:1116:21 [INFO] [stdout] | [INFO] [stdout] 1116 | / match RE_PMC.captures(&external_url.clone()) { [INFO] [stdout] 1117 | | Some(s) => { [INFO] [stdout] 1118 | | pmcid_as_str = s[0].to_string(); [INFO] [stdout] 1119 | | external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmcid_as_str); [INFO] [stdout] ... | [INFO] [stdout] 1124 | | None => {}, [INFO] [stdout] 1125 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1116 ~ if let Some(s) = RE_PMC.captures(&external_url.clone()) { [INFO] [stdout] 1117 + pmcid_as_str = s[0].to_string(); [INFO] [stdout] 1118 + external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmcid_as_str); [INFO] [stdout] 1119 + pub_id = pmcid_as_str.clone(); [INFO] [stdout] 1120 + pub_id_type = "PMC ID".to_string(); [INFO] [stdout] 1121 + categorised =true; [INFO] [stdout] 1122 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1140:43 [INFO] [stdout] | [INFO] [stdout] 1140 | doi: if doi_as_str == "".to_string() {None} else {Some(doi_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1141:45 [INFO] [stdout] | [INFO] [stdout] 1141 | pmid: if pmid_as_str == "".to_string() {None} else {Some(pmid_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1142:47 [INFO] [stdout] | [INFO] [stdout] 1142 | pmcid: if pmcid_as_str == "".to_string() {None} else {Some(pmcid_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1143:59 [INFO] [stdout] | [INFO] [stdout] 1143 | pubsite_url: if pubsite_url_as_str == "".to_string() {None} else {Some(pubsite_url_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:1209:29 [INFO] [stdout] | [INFO] [stdout] 1209 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 1210 | | Ok(d) => Some(d), [INFO] [stdout] 1211 | | Err(_) => None, [INFO] [stdout] 1212 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:1217:29 [INFO] [stdout] | [INFO] [stdout] 1217 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 1218 | | Ok(d) => Some(d), [INFO] [stdout] 1219 | | Err(_) => None, [INFO] [stdout] 1220 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:1292:28 [INFO] [stdout] | [INFO] [stdout] 1292 | if file_type != ""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!file_type.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: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:1348:24 [INFO] [stdout] | [INFO] [stdout] 1348 | if ending != "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ending.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: manual implementation of `Option::map` [INFO] [stdout] --> src/import/support_fns.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | / if let Some (dt) = NaiveDate::from_ymd_opt(y, m, d) [INFO] [stdout] 58 | | { [INFO] [stdout] 59 | | Some(dt) [INFO] [stdout] ... | [INFO] [stdout] 62 | | None [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________________^ help: try: `NaiveDate::from_ymd_opt(y, m, d).map(|dt| dt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/support_fns.rs:125:32 [INFO] [stdout] | [INFO] [stdout] 125 | let num: Option = match age_parts[0].trim().parse() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 126 | | Ok(num) => Some(num), [INFO] [stdout] 127 | | Err(_) => None [INFO] [stdout] 128 | | }; [INFO] [stdout] | |_________^ help: replace with: `age_parts[0].trim().parse().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/import/support_fns.rs:154:47 [INFO] [stdout] | [INFO] [stdout] 154 | let units_as_string: Option = match units { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 155 | | Some(u) => Some(u.to_string()), [INFO] [stdout] 156 | | None => None, [INFO] [stdout] 157 | | }; [INFO] [stdout] | |_________^ help: try: `units.map(|u| u.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/import/support_fns.rs:170:28 [INFO] [stdout] | [INFO] [stdout] 170 | let giv_n = given_name.unwrap_or_else(||"".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_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: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/import/support_fns.rs:171:29 [INFO] [stdout] | [INFO] [stdout] 171 | let fam_n = family_name.unwrap_or_else(||"".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/support_fns.rs:173:8 [INFO] [stdout] | [INFO] [stdout] 173 | if giv_n == "" && fam_n == "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `giv_n.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: comparison to empty slice [INFO] [stdout] --> src/import/support_fns.rs:173:23 [INFO] [stdout] | [INFO] [stdout] 173 | if giv_n == "" && fam_n == "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `fam_n.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/import/support_fns.rs:182:40 [INFO] [stdout] | [INFO] [stdout] 182 | pub fn get_cr_numbered_strings(input: &String) -> Option> { [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] 182 - pub fn get_cr_numbered_strings(input: &String) -> Option> { [INFO] [stdout] 182 + pub fn get_cr_numbered_strings(input: &str) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/import/support_fns.rs:191:8 [INFO] [stdout] | [INFO] [stdout] 191 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/import/support_fns.rs:205:37 [INFO] [stdout] | [INFO] [stdout] 205 | pub fn get_numbered_strings(input: &String) -> Option> { [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] 205 - pub fn get_numbered_strings(input: &String) -> Option> { [INFO] [stdout] 205 + pub fn get_numbered_strings(input: &str) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/support_fns.rs:211:38 [INFO] [stdout] | [INFO] [stdout] 211 | .filter(| t| *t != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.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: this boolean expression can be simplified [INFO] [stdout] --> src/import/support_fns.rs:283:20 [INFO] [stdout] | [INFO] [stdout] 283 | if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 283 - if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] 283 + if !(i == 1 && skip_res1 != false) { [INFO] [stdout] | [INFO] [stdout] 283 - if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] 283 + if i != 1 || skip_res1 == false { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/import/support_fns.rs:221:40 [INFO] [stdout] | [INFO] [stdout] 221 | pub fn get_comma_delim_strings(input: &String, min_width: usize) -> 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] 221 - pub fn get_comma_delim_strings(input: &String, min_width: usize) -> Vec { [INFO] [stdout] 221 + pub fn get_comma_delim_strings(input: &str, min_width: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/import/support_fns.rs:283:41 [INFO] [stdout] | [INFO] [stdout] 283 | if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `!skip_res1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IPD` contains a capitalized acronym [INFO] [stdout] --> src/data_models/json_models.rs:233:12 [INFO] [stdout] | [INFO] [stdout] 233 | pub struct IPD [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ipd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:39:34 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn add(&mut self, sd_sid:&String, r: &DBSummary) [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] 39 ~ pub fn add(&mut self, sd_sid:&str, r: &DBSummary) [INFO] [stdout] 40 | { [INFO] [stdout] 41 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:114:34 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn add(&mut self, sd_sid:&String, r: &DBStudyDates) [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 ~ pub fn add(&mut self, sd_sid:&str, r: &DBStudyDates) [INFO] [stdout] 115 | { [INFO] [stdout] 116 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:198:34 [INFO] [stdout] | [INFO] [stdout] 198 | pub fn add(&mut self, sd_sid:&String, r: &DBStudyPartics) [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] 198 ~ pub fn add(&mut self, sd_sid:&str, r: &DBStudyPartics) [INFO] [stdout] 199 | { [INFO] [stdout] 200 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:276:36 [INFO] [stdout] | [INFO] [stdout] 276 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:287:34 [INFO] [stdout] | [INFO] [stdout] 287 | pub fn add(&mut self, sd_sid:&String, v: &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] 287 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 288 | { [INFO] [stdout] 289 | for r in v { [INFO] [stdout] 290 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:336:34 [INFO] [stdout] | [INFO] [stdout] 336 | pub fn add(&mut self, sd_sid:&String, v: &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] 336 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 337 | { [INFO] [stdout] 338 | for r in v { [INFO] [stdout] 339 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:346:36 [INFO] [stdout] | [INFO] [stdout] 346 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:395:34 [INFO] [stdout] | [INFO] [stdout] 395 | pub fn add(&mut self, sd_sid:&String, v: &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] 395 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 396 | { [INFO] [stdout] 397 | for r in v { [INFO] [stdout] 398 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:409:36 [INFO] [stdout] | [INFO] [stdout] 409 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:463:34 [INFO] [stdout] | [INFO] [stdout] 463 | pub fn add(&mut self, sd_sid:&String, v: &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] 463 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 464 | { [INFO] [stdout] 465 | for r in v { [INFO] [stdout] 466 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:475:36 [INFO] [stdout] | [INFO] [stdout] 475 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:524:34 [INFO] [stdout] | [INFO] [stdout] 524 | pub fn add(&mut self, sd_sid:&String, v: &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] 524 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 525 | { [INFO] [stdout] 526 | for r in v { [INFO] [stdout] 527 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:536:36 [INFO] [stdout] | [INFO] [stdout] 536 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:576:34 [INFO] [stdout] | [INFO] [stdout] 576 | pub fn add(&mut self, sd_sid:&String, v: &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] 576 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 577 | { [INFO] [stdout] 578 | for r in v { [INFO] [stdout] 579 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:584:36 [INFO] [stdout] | [INFO] [stdout] 584 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:620:34 [INFO] [stdout] | [INFO] [stdout] 620 | pub fn add(&mut self, sd_sid:&String, v: &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] 620 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 621 | { [INFO] [stdout] 622 | for r in v { [INFO] [stdout] 623 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:630:36 [INFO] [stdout] | [INFO] [stdout] 630 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:669:34 [INFO] [stdout] | [INFO] [stdout] 669 | pub fn add(&mut self, sd_sid:&String, v: &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] 669 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 670 | { [INFO] [stdout] 671 | for r in v { [INFO] [stdout] 672 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:679:36 [INFO] [stdout] | [INFO] [stdout] 679 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:718:34 [INFO] [stdout] | [INFO] [stdout] 718 | pub fn add(&mut self, sd_sid:&String, v: &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] 718 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 719 | { [INFO] [stdout] 720 | for r in v { [INFO] [stdout] 721 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:728:36 [INFO] [stdout] | [INFO] [stdout] 728 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:777:34 [INFO] [stdout] | [INFO] [stdout] 777 | pub fn add(&mut self, sd_sid:&String, v: &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] 777 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 778 | { [INFO] [stdout] 779 | for r in v { [INFO] [stdout] 780 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:792:36 [INFO] [stdout] | [INFO] [stdout] 792 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:860:34 [INFO] [stdout] | [INFO] [stdout] 860 | pub fn add(&mut self, sd_sid:&String, v: &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] 860 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 861 | { [INFO] [stdout] 862 | for r in v { [INFO] [stdout] 863 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:873:37 [INFO] [stdout] | [INFO] [stdout] 873 | self.date_createds.push(r.date_created.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_created` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:874:38 [INFO] [stdout] | [INFO] [stdout] 874 | self.date_uploadeds.push(r.date_uploaded.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_uploaded` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:878:36 [INFO] [stdout] | [INFO] [stdout] 878 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:958:34 [INFO] [stdout] | [INFO] [stdout] 958 | pub fn add(&mut self, sd_sid:&String, v: &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] 958 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 959 | { [INFO] [stdout] 960 | for r in v { [INFO] [stdout] 961 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:971:37 [INFO] [stdout] | [INFO] [stdout] 971 | self.date_createds.push(r.date_created.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_created` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:972:38 [INFO] [stdout] | [INFO] [stdout] 972 | self.date_uploadeds.push(r.date_uploaded.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_uploaded` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:976:36 [INFO] [stdout] | [INFO] [stdout] 976 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:76:20 [INFO] [stdout] | [INFO] [stdout] 76 | || low_ref == "" [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_ref.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:81:58 [INFO] [stdout] | [INFO] [stdout] 81 | let trimmed = quoteless.trim_matches(&[' ', '-']); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[' ', '-']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:82:24 [INFO] [stdout] | [INFO] [stdout] 82 | if trimmed == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `trimmed.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | if st == "" || st.len() < 2 // 1 character ids not meaningful or useful [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:141:24 [INFO] [stdout] | [INFO] [stdout] 141 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:170:24 [INFO] [stdout] | [INFO] [stdout] 170 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:192:20 [INFO] [stdout] | [INFO] [stdout] 192 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: manual implementation of `ok` [INFO] [stdout] --> src/helpers/string_extensions.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 198 | / match st.parse::() [INFO] [stdout] 199 | | { [INFO] [stdout] 200 | | Ok(n) => Some(n), [INFO] [stdout] 201 | | Err(_e) => None [INFO] [stdout] 202 | | } [INFO] [stdout] | |_____________________^ help: replace with: `st.parse::().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:213:20 [INFO] [stdout] | [INFO] [stdout] 213 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: manual implementation of `ok` [INFO] [stdout] --> src/helpers/string_extensions.rs:219:21 [INFO] [stdout] | [INFO] [stdout] 219 | / match st.parse::() [INFO] [stdout] 220 | | { [INFO] [stdout] 221 | | Ok(n) => Some(n), [INFO] [stdout] 222 | | Err(_e) => None [INFO] [stdout] 223 | | } [INFO] [stdout] | |_____________________^ help: replace with: `st.parse::().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:234:20 [INFO] [stdout] | [INFO] [stdout] 234 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:267:26 [INFO] [stdout] | [INFO] [stdout] 267 | if st == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:293:26 [INFO] [stdout] | [INFO] [stdout] 293 | if st == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | if low_ref == "" || low_ref == "null" || low_ref == "n/a" [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_ref.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:333:52 [INFO] [stdout] | [INFO] [stdout] 333 | let t = quoteless.trim_matches(&[' ', '-']); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[' ', '-']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:334:24 [INFO] [stdout] | [INFO] [stdout] 334 | if t == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `t.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: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:342:33 [INFO] [stdout] | [INFO] [stdout] 342 | tr = tr.replace('\u{2000}', " ").replace('\u{2001}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2000}', '\u{2001}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:343:33 [INFO] [stdout] | [INFO] [stdout] 343 | tr = tr.replace('\u{2002}', " ").replace('\u{2003}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2002}', '\u{2003}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:344:33 [INFO] [stdout] | [INFO] [stdout] 344 | tr = tr.replace('\u{2007}', " ").replace('\u{2008}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2007}', '\u{2008}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:345:33 [INFO] [stdout] | [INFO] [stdout] 345 | tr = tr.replace('\u{2009}', " ").replace('\u{200A}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2009}', '\u{200A}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:347:33 [INFO] [stdout] | [INFO] [stdout] 347 | tr = tr.replace('\u{00AE}', " ").replace('\u{2122}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{00AE}', '\u{2122}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:377:50 [INFO] [stdout] | [INFO] [stdout] 377 | ... tr = tr.trim_matches(&[';', ' ']).to_string() [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[';', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:412:20 [INFO] [stdout] | [INFO] [stdout] 412 | if low_ref == "" || low_ref == "null" || low_ref == "n/a" [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_ref.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:418:52 [INFO] [stdout] | [INFO] [stdout] 418 | let t = quoteless.trim_matches(&[' ', '-']); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[' ', '-']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:419:24 [INFO] [stdout] | [INFO] [stdout] 419 | if t == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `t.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: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:429:33 [INFO] [stdout] | [INFO] [stdout] 429 | tr = tr.replace('\u{2000}', " ").replace('\u{2001}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2000}', '\u{2001}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:430:33 [INFO] [stdout] | [INFO] [stdout] 430 | tr = tr.replace('\u{2002}', " ").replace('\u{2003}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2002}', '\u{2003}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:431:33 [INFO] [stdout] | [INFO] [stdout] 431 | tr = tr.replace('\u{2007}', " ").replace('\u{2008}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2007}', '\u{2008}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:432:33 [INFO] [stdout] | [INFO] [stdout] 432 | tr = tr.replace('\u{2009}', " ").replace('\u{200A}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2009}', '\u{200A}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:434:33 [INFO] [stdout] | [INFO] [stdout] 434 | tr = tr.replace('\u{00AE}', " ").replace('\u{2122}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{00AE}', '\u{2122}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:464:50 [INFO] [stdout] | [INFO] [stdout] 464 | ... tr = tr.trim_matches(&[';', ' ']).to_string() [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[';', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:514:24 [INFO] [stdout] | [INFO] [stdout] 514 | if s == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/helpers/string_extensions.rs:573:45 [INFO] [stdout] | [INFO] [stdout] 573 | ... '>' => {if inside {inside = false; continue;}} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 573 - '>' => {if inside {inside = false; continue;}} [INFO] [stdout] 573 + '>'if inside => {inside = false; continue;} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:672:25 [INFO] [stdout] | [INFO] [stdout] 672 | if s == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:772:17 [INFO] [stdout] | [INFO] [stdout] 772 | / { [INFO] [stdout] 773 | | result = false; [INFO] [stdout] 774 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:777:17 [INFO] [stdout] | [INFO] [stdout] 777 | / { [INFO] [stdout] 778 | | result = false; [INFO] [stdout] 779 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:749:94 [INFO] [stdout] | [INFO] [stdout] 749 | || low_s == "no" || low_s == "nil" || low_s == "nill" || low_s == "non" { [INFO] [stdout] | ______________________________________________________________________________________________^ [INFO] [stdout] 750 | | result = false; [INFO] [stdout] 751 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:754:21 [INFO] [stdout] | [INFO] [stdout] 754 | / { [INFO] [stdout] 755 | | result = false; [INFO] [stdout] 756 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:754:21 [INFO] [stdout] | [INFO] [stdout] 754 | / { [INFO] [stdout] 755 | | result = false; [INFO] [stdout] 756 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:759:21 [INFO] [stdout] | [INFO] [stdout] 759 | / { [INFO] [stdout] 760 | | result = false; [INFO] [stdout] 761 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:759:21 [INFO] [stdout] | [INFO] [stdout] 759 | / { [INFO] [stdout] 760 | | result = false; [INFO] [stdout] 761 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:765:21 [INFO] [stdout] | [INFO] [stdout] 765 | / { [INFO] [stdout] 766 | | result = false; [INFO] [stdout] 767 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/helpers/string_extensions.rs:802:60 [INFO] [stdout] | [INFO] [stdout] 802 | if s.chars().nth(1).unwrap_or_default() == '.' || s.chars().nth(1).unwrap_or_default().is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.chars().nth(1).unwrap_or_default().is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/helpers/name_extensions.rs:16:37 [INFO] [stdout] | [INFO] [stdout] 16 | fn tidy_org_name(&self, sd_sid: &String) -> Option; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/helpers/name_extensions.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | / match sf.find('@') [INFO] [stdout] 66 | | { [INFO] [stdout] 67 | | Some(p) => { [INFO] [stdout] 68 | | Some((&sf[(p + 1)..]).to_string()) [INFO] [stdout] 69 | | }, [INFO] [stdout] 70 | | None => None, [INFO] [stdout] 71 | | } [INFO] [stdout] | |_________________^ help: try: `sf.find('@').map(|p| (&sf[(p + 1)..]).to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/helpers/name_extensions.rs:68:30 [INFO] [stdout] | [INFO] [stdout] 68 | Some((&sf[(p + 1)..]).to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sf[(p + 1)..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | / { [INFO] [stdout] 88 | | false [INFO] [stdout] 89 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:93:17 [INFO] [stdout] | [INFO] [stdout] 93 | / { [INFO] [stdout] 94 | | false [INFO] [stdout] 95 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:93:17 [INFO] [stdout] | [INFO] [stdout] 93 | / { [INFO] [stdout] 94 | | false [INFO] [stdout] 95 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:99:17 [INFO] [stdout] | [INFO] [stdout] 99 | / { [INFO] [stdout] 100 | | false [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:99:17 [INFO] [stdout] | [INFO] [stdout] 99 | / { [INFO] [stdout] 100 | | false [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | / { [INFO] [stdout] 107 | | false [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | / { [INFO] [stdout] 107 | | false [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | / { [INFO] [stdout] 111 | | false [INFO] [stdout] 112 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/helpers/name_extensions.rs:109:22 [INFO] [stdout] | [INFO] [stdout] 109 | else if low_s.starts_with("dr") && &sf[..2] == "DR" [INFO] [stdout] | ______________________^ [INFO] [stdout] 110 | | { [INFO] [stdout] 111 | | false [INFO] [stdout] ... | [INFO] [stdout] 114 | | true [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `{ !(low_s.starts_with("dr") && &sf[..2] == "DR") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/helpers/name_extensions.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | / if low_s == "" || low_s.contains("research") || low_s.contains("development") || [INFO] [stdout] 131 | | low_s.contains("trials") || low_s.contains("pharma") || [INFO] [stdout] 132 | | low_s.contains("ltd") || low_s.contains("inc.") { [INFO] [stdout] 133 | | false [INFO] [stdout] ... | [INFO] [stdout] 136 | | true [INFO] [stdout] 137 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 130 ~ !(low_s == "" || low_s.contains("research") || low_s.contains("development") || [INFO] [stdout] 131 + low_s.contains("trials") || low_s.contains("pharma") || [INFO] [stdout] 132 + low_s.contains("ltd") || low_s.contains("inc.")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/name_extensions.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | if low_s == "" || low_s.contains("research") || low_s.contains("development") || [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_s.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: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:153:17 [INFO] [stdout] | [INFO] [stdout] 153 | / { [INFO] [stdout] 154 | | false [INFO] [stdout] 155 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:158:17 [INFO] [stdout] | [INFO] [stdout] 158 | / { [INFO] [stdout] 159 | | false [INFO] [stdout] 160 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:158:17 [INFO] [stdout] | [INFO] [stdout] 158 | / { [INFO] [stdout] 159 | | false [INFO] [stdout] 160 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | / { [INFO] [stdout] 165 | | false [INFO] [stdout] 166 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/name_extensions.rs:152:20 [INFO] [stdout] | [INFO] [stdout] 152 | if low_s == "" || low_s == "n.a." || low_s == "na" || low_s == "n.a" || low_s == "n/a" [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_s.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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/helpers/name_extensions.rs:161:22 [INFO] [stdout] | [INFO] [stdout] 161 | else if low_s.starts_with("not applic") || low_s.starts_with("not aplic") || low_s.starts_with("non applic") [INFO] [stdout] | ______________________^ [INFO] [stdout] 162 | | || low_s.starts_with("non aplic") || low_s.starts_with("no applic") || low_s.starts_with("no aplic") [INFO] [stdout] 163 | | || low_s.starts_with("see ") || low_s.starts_with("not avail") || low_s.starts_with("non dispo") [INFO] [stdout] ... | [INFO] [stdout] 168 | | true [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 161 ~ else { !(low_s.starts_with("not applic") || low_s.starts_with("not aplic") || low_s.starts_with("non applic") [INFO] [stdout] 162 + || low_s.starts_with("non aplic") || low_s.starts_with("no applic") || low_s.starts_with("no aplic") [INFO] [stdout] 163 + || low_s.starts_with("see ") || low_s.starts_with("not avail") || low_s.starts_with("non dispo")) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/name_extensions.rs:201:36 [INFO] [stdout] | [INFO] [stdout] 201 | s = s.trim_matches(&[',', '-', '*', ';', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[',', '-', '*', ';', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/helpers/name_extensions.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | / if low_s.contains("newcastle") { [INFO] [stdout] 225 | | if low_s.contains("university") && !low_s.contains("hospital") { [INFO] [stdout] 226 | | if low_s.contains("nsw") || low_s.contains("australia") { [INFO] [stdout] 227 | | s = "University of Newcastle (Australia)".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 242 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 224 ~ if low_s.contains("newcastle") [INFO] [stdout] 225 ~ && low_s.contains("university") && !low_s.contains("hospital") { [INFO] [stdout] 226 | if low_s.contains("nsw") || low_s.contains("australia") { [INFO] [stdout] ... [INFO] [stdout] 240 | } [INFO] [stdout] 241 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:249:21 [INFO] [stdout] | [INFO] [stdout] 249 | / { [INFO] [stdout] 250 | | s = "China Medical University".to_string(); [INFO] [stdout] 251 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | / { [INFO] [stdout] 254 | | s = "China Medical University".to_string(); [INFO] [stdout] 255 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/name_extensions.rs:337:24 [INFO] [stdout] | [INFO] [stdout] 337 | && s[2..3].to_string() == low_s[2..3].to_string().to_uppercase() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `s[2..3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/name_extensions.rs:346:20 [INFO] [stdout] | [INFO] [stdout] 346 | if low_st == "" || low_st == "dr" || low_st == "mr" || low_st == "ms" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_st.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/name_extensions.rs:381:43 [INFO] [stdout] | [INFO] [stdout] 381 | Some(sts.trim_matches(&[' ', '-', ',']).to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `[' ', '-', ',']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/iec/iec_fns.rs:43:30 [INFO] [stdout] | [INFO] [stdout] 43 | .filter(| t| *t != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.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: length comparison to zero [INFO] [stdout] --> src/iec/iec_fns.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | if repaired_lines.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `repaired_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/iec/iec_fns.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let return_code; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [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 `return_code` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 ~ let return_code = if final_cr_lines.len() == 1 { [INFO] [stdout] 110 ~ if input_type == "inclusion" {4} else {16} [INFO] [stdout] 111 | } [INFO] [stdout] 112 | else { [INFO] [stdout] 113 ~ if input_type == "inclusion" {8} else {32} [INFO] [stdout] 114 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/iec/iec_fns.rs:138:34 [INFO] [stdout] | [INFO] [stdout] 138 | for (i, ln) in initial_lines.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_fns.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | / if previous_tag_type != "none".to_string() [INFO] [stdout] 151 | | && !previous_tag_type.starts_with("numdot"){ [INFO] [stdout] 152 | | [INFO] [stdout] 153 | | if let Some(rr) = test_re(&previous_tag_type,&ln) { [INFO] [stdout] ... | [INFO] [stdout] 162 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 151 ~ && !previous_tag_type.starts_with("numdot") [INFO] [stdout] 152 | [INFO] [stdout] 153 ~ && let Some(rr) = test_re(&previous_tag_type,&ln) { [INFO] [stdout] 154 | iec = Some(CLine { [INFO] [stdout] ... [INFO] [stdout] 160 | }); [INFO] [stdout] 161 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_fns.rs:150:33 [INFO] [stdout] | [INFO] [stdout] 150 | if previous_tag_type != "none".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"none"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:153:58 [INFO] [stdout] | [INFO] [stdout] 153 | if let Some(rr) = test_re(&previous_tag_type,&ln) { [INFO] [stdout] | ^^^ help: change this to: `ln` [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 `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:171:16 [INFO] [stdout] | [INFO] [stdout] 171 | if first_char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `first_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:179:44 [INFO] [stdout] | [INFO] [stdout] 179 | if *second_char == '.' || (second_char.is_digit(10) && *third_char == '.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `second_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/iec/iec_fns.rs:233:52 [INFO] [stdout] | [INFO] [stdout] 233 | ... .filter(|t| t.text != "") [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.text.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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_fns.rs:239:30 [INFO] [stdout] | [INFO] [stdout] 239 | fn repair_split_lines(plines:&mut Vec, tv: &TypePars) -> 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] 239 - fn repair_split_lines(plines:&mut Vec, tv: &TypePars) -> Vec{ [INFO] [stdout] 239 + fn repair_split_lines(plines:&mut [CLine], tv: &TypePars) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:292:77 [INFO] [stdout] | [INFO] [stdout] 292 | ... && (init_char.is_lowercase() || init_char.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `init_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:308:65 [INFO] [stdout] | [INFO] [stdout] 308 | ... && (init_char.is_lowercase() || init_char.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `init_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/iec/iec_fns.rs:318:80 [INFO] [stdout] | [INFO] [stdout] 318 | ... plines[i - 1].text = format!("{}. {}", prev_text[..(prev_text.len() - 1)].to_string(), this_text) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&prev_text[..(prev_text.len() - 1)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:396:64 [INFO] [stdout] | [INFO] [stdout] 396 | if let Some(c) = check_if_lines_all_start_with_same_bullet(&processed_lines) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:439:44 [INFO] [stdout] | [INFO] [stdout] 439 | if check_if_all_lines_end_consistently(&processed_lines, 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:440:57 [INFO] [stdout] | [INFO] [stdout] 440 | || check_if_all_lines_start_with_caps(&processed_lines, 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:441:63 [INFO] [stdout] | [INFO] [stdout] 441 | || check_if_all_lines_start_with_lower_case(&processed_lines, 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `processed_lines` [INFO] [stdout] --> src/iec/iec_fns.rs:445:18 [INFO] [stdout] | [INFO] [stdout] 445 | for i in 0..processed_lines.len() { [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] 445 - for i in 0..processed_lines.len() { [INFO] [stdout] 445 + for in &mut processed_lines { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:529:52 [INFO] [stdout] | [INFO] [stdout] 529 | if check_if_all_lines_end_consistently(&joined_lines, 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `joined_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:530:55 [INFO] [stdout] | [INFO] [stdout] 530 | || check_if_all_lines_start_with_caps(&joined_lines, 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `joined_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `joined_lines` [INFO] [stdout] --> src/iec/iec_fns.rs:609:18 [INFO] [stdout] | [INFO] [stdout] 609 | for i in 0..=max_i { [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] 609 - for i in 0..=max_i { [INFO] [stdout] 609 + for in joined_lines.iter().take(max_i + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_fns.rs:646:42 [INFO] [stdout] | [INFO] [stdout] 646 | type_id = if tag2 == "Spp".to_string() {tv.post_crit} else {tv.grp_hdr} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"Spp"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_helper.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn coalesce_very_short_lines(input_lines: &Vec<&str>) -> 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] 36 - pub fn coalesce_very_short_lines(input_lines: &Vec<&str>) -> Vec [INFO] [stdout] 36 + pub fn coalesce_very_short_lines(input_lines: &[&str]) -> Vec [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/setup/cli_reader.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | return Result::Err(AppError::MissingProgramParameter("year for type w download".to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 106 - return Result::Err(AppError::MissingProgramParameter("year for type w download".to_string())); [INFO] [stdout] 106 + Result::Err(AppError::MissingProgramParameter("year for type w download".to_string())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/setup/cli_reader.rs:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let year: i32 = year_as_string.parse().unwrap_or_else(|_| 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 103 - let year: i32 = year_as_string.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 103 + let year: i32 = year_as_string.parse().unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_helper.rs:169:31 [INFO] [stdout] | [INFO] [stdout] 169 | pub fn is_redundant_header(s: &String) -> bool { [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] 169 - pub fn is_redundant_header(s: &String) -> bool { [INFO] [stdout] 169 + pub fn is_redundant_header(s: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_helper.rs:188:36 [INFO] [stdout] | [INFO] [stdout] 188 | s_low = s_low.trim_matches(&[':', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[':', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/setup/cli_reader.rs:143:5 [INFO] [stdout] | [INFO] [stdout] 138 | / let res = match config_path.try_exists() { [INFO] [stdout] 139 | | Ok(true) => true, [INFO] [stdout] 140 | | Ok(false) => false, [INFO] [stdout] 141 | | Err(_e) => false, [INFO] [stdout] 142 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 143 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 138 ~ [INFO] [stdout] 139 ~ match config_path.try_exists() { [INFO] [stdout] 140 + Ok(true) => true, [INFO] [stdout] 141 + Ok(false) => false, [INFO] [stdout] 142 + Err(_e) => false, [INFO] [stdout] 143 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/iec/iec_helper.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | / if s_low.is_empty() { [INFO] [stdout] 190 | | true [INFO] [stdout] 191 | | } [INFO] [stdout] 192 | | else { [INFO] [stdout] 193 | | false [INFO] [stdout] 194 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `s_low.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/iec/iec_helper.rs:206:47 [INFO] [stdout] | [INFO] [stdout] 206 | let num_lines_without_tags = in_lines.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/iec/iec_helper.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / if (num_lines > 4 && num_lines_without_tags >= num_lines - 1) || [INFO] [stdout] 211 | | (num_lines > 2 && num_lines_without_tags == num_lines) { [INFO] [stdout] 212 | | true [INFO] [stdout] ... | [INFO] [stdout] 215 | | false [INFO] [stdout] 216 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `(num_lines > 4 && num_lines_without_tags >= num_lines - 1) || (num_lines > 2 && num_lines_without_tags == num_lines)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_helper.rs:221:60 [INFO] [stdout] | [INFO] [stdout] 221 | pub fn check_if_lines_all_start_with_same_bullet(in_lines: &Vec) -> Option { [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] 221 - pub fn check_if_lines_all_start_with_same_bullet(in_lines: &Vec) -> Option { [INFO] [stdout] 221 + pub fn check_if_lines_all_start_with_same_bullet(in_lines: &[CLine]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `in_lines` [INFO] [stdout] --> src/iec/iec_helper.rs:234:18 [INFO] [stdout] | [INFO] [stdout] 234 | for k in 2..in_lines.len() [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] 234 - for k in 2..in_lines.len() [INFO] [stdout] 234 + for in in_lines.iter().skip(2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_res.rs:79:43 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn test_re(tag_type: &str, this_line: &String) -> Option { [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] 79 - pub fn test_re(tag_type: &str, this_line: &String) -> Option { [INFO] [stdout] 79 + pub fn test_re(tag_type: &str, this_line: &str) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:93:17 [INFO] [stdout] | [INFO] [stdout] 88 | / let init_rr = Some (RegexResults { [INFO] [stdout] 89 | | tag: tag.to_string(), [INFO] [stdout] 90 | | tag_type: tag_type.to_string(), [INFO] [stdout] 91 | | text: this_line[tag.len()..].trim().to_string(), [INFO] [stdout] 92 | | }); [INFO] [stdout] | |___________________- unnecessary `let` binding [INFO] [stdout] 93 | init_rr [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 88 ~ [INFO] [stdout] 89 ~ Some (RegexResults { [INFO] [stdout] 90 + tag: tag.to_string(), [INFO] [stdout] 91 + tag_type: tag_type.to_string(), [INFO] [stdout] 92 + text: this_line[tag.len()..].trim().to_string(), [INFO] [stdout] 93 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:256:5 [INFO] [stdout] | [INFO] [stdout] 151 | / let processed_result = match raw_result { [INFO] [stdout] 152 | | [INFO] [stdout] 153 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 253 | | None => None, [INFO] [stdout] 254 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 255 | [INFO] [stdout] 256 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 151 ~ [INFO] [stdout] 152 | [INFO] [stdout] 153 ~ match raw_result { [INFO] [stdout] 154 + [INFO] [stdout] 155 + Some (r) => { [INFO] [stdout] 156 + [INFO] [stdout] 157 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 158 + [INFO] [stdout] 159 + let (level, new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 160 + [INFO] [stdout] 161 + let mut genuine = true; // as the starting point [INFO] [stdout] 162 + let mut proc_tag_type = r.tag_type.clone(); [INFO] [stdout] 163 + let mut proc_tag = r.tag.clone(); [INFO] [stdout] 164 + let mut proc_text = r.text.clone(); [INFO] [stdout] 165 + [INFO] [stdout] 166 + if &r.tag_type == "numdotnumalcap" { [INFO] [stdout] 167 + [INFO] [stdout] 168 + // number-dot-number cap letter - Cap is usually from text (no space) [INFO] [stdout] 169 + // Change the tag name, tag and text details accordingly [INFO] [stdout] 170 + [INFO] [stdout] 171 + proc_tag_type = "numdot2".to_string(); [INFO] [stdout] 172 + [INFO] [stdout] 173 + let proc_tag2 = proc_tag.clone(); [INFO] [stdout] 174 + let tag_letter = proc_tag2.last_char(); [INFO] [stdout] 175 + proc_tag.pop(); [INFO] [stdout] 176 + proc_text = format!("{}{}", tag_letter, proc_text); [INFO] [stdout] 177 + [INFO] [stdout] 178 + } [INFO] [stdout] 179 + [INFO] [stdout] 180 + // The n.n tag type may be a genuine number in front of a quantity [INFO] [stdout] 181 + [INFO] [stdout] 182 + if &r.tag_type == "numdot2" { [INFO] [stdout] 183 + [INFO] [stdout] 184 + if prev_tag_type == "numdot2" [INFO] [stdout] 185 + || (prev_tag_type == "numdot" && proc_tag.ends_with(".1")) [INFO] [stdout] 186 + || (prev_tag_type == "none" && proc_tag.ends_with(".1")) [INFO] [stdout] 187 + { [INFO] [stdout] 188 + genuine = true; // continuation of numdot2 or the first in a numdot2 sequence [INFO] [stdout] 189 + } [INFO] [stdout] 190 + else { [INFO] [stdout] 191 + genuine = false; [INFO] [stdout] 192 + } [INFO] [stdout] 193 + [INFO] [stdout] 194 + // if genuine appears false what is this line? [INFO] [stdout] 195 + // Could be a number, X.Y, followed by a quantity (in which case a header type line) [INFO] [stdout] 196 + // Or could be a n. tag, follwe by a number Y... as the first character in the string [INFO] [stdout] 197 + [INFO] [stdout] 198 + if !genuine [INFO] [stdout] 199 + { [INFO] [stdout] 200 + let low_text = r.text.trim().to_lowercase(); [INFO] [stdout] 201 + if low_text.starts_with("secs") [INFO] [stdout] 202 + || low_text.starts_with("second") [INFO] [stdout] 203 + || low_text.starts_with("mins") [INFO] [stdout] 204 + || low_text.starts_with("minute") [INFO] [stdout] 205 + || low_text.starts_with("hour") [INFO] [stdout] 206 + || low_text.starts_with("day") [INFO] [stdout] 207 + || low_text.starts_with("week") [INFO] [stdout] 208 + || low_text.starts_with("month") [INFO] [stdout] 209 + || low_text.starts_with("year") [INFO] [stdout] 210 + || low_text.starts_with("mg") [INFO] [stdout] 211 + || low_text.starts_with("ml") [INFO] [stdout] 212 + || low_text.starts_with("kg") [INFO] [stdout] 213 + || low_text.starts_with("g/") [INFO] [stdout] 214 + || low_text.starts_with("cm") [INFO] [stdout] 215 + || low_text.starts_with("patient") [INFO] [stdout] 216 + || low_text.starts_with("subject") [INFO] [stdout] 217 + { [INFO] [stdout] 218 + // appears to be a header or (more likely) a split line part [INFO] [stdout] 219 + } [INFO] [stdout] 220 + else [INFO] [stdout] 221 + { [INFO] [stdout] 222 + // change the tag namne, tag and text to refflect a numdot type [INFO] [stdout] 223 + [INFO] [stdout] 224 + proc_tag_type = "numdot".to_string(); [INFO] [stdout] 225 + let proc_tag2 = proc_tag.clone(); [INFO] [stdout] 226 + let tag_parts: Vec<&str> = proc_tag2.split('.').collect(); [INFO] [stdout] 227 + [INFO] [stdout] 228 + proc_tag = tag_parts[0].to_string(); [INFO] [stdout] 229 + proc_text = format!("{} {}", tag_parts[1], proc_text); [INFO] [stdout] 230 + } [INFO] [stdout] 231 + [INFO] [stdout] 232 + } [INFO] [stdout] 233 + [INFO] [stdout] 234 + } [INFO] [stdout] 235 + [INFO] [stdout] 236 + [INFO] [stdout] 237 + if !genuine { [INFO] [stdout] 238 + [INFO] [stdout] 239 + // remove the level if one has just been added to the levels vector [INFO] [stdout] 240 + if new_level { [INFO] [stdout] 241 + levels.pop(); [INFO] [stdout] 242 + } [INFO] [stdout] 243 + None [INFO] [stdout] 244 + } [INFO] [stdout] 245 + else { [INFO] [stdout] 246 + Some(CLine { [INFO] [stdout] 247 + seq_num: (index + 1) as i32, [INFO] [stdout] 248 + tag: proc_tag, [INFO] [stdout] 249 + tag_type: proc_tag_type, [INFO] [stdout] 250 + indent_level: level, [INFO] [stdout] 251 + text: proc_text, [INFO] [stdout] 252 + }) [INFO] [stdout] 253 + } [INFO] [stdout] 254 + }, [INFO] [stdout] 255 + None => None, [INFO] [stdout] 256 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:123:50 [INFO] [stdout] | [INFO] [stdout] 123 | s4.text = s4.text.trim_start_matches(&['.', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:130:50 [INFO] [stdout] | [INFO] [stdout] 130 | s3.text = s3.text.trim_start_matches(&['.', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:136:50 [INFO] [stdout] | [INFO] [stdout] 136 | s2.text = s2.text.trim_start_matches(&['.', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:145:10 [INFO] [stdout] | [INFO] [stdout] 145 | else if let Some(s8) = test_re("numdot", this_line,) { Some(s8) } // number period only - can give false positives [INFO] [stdout] | __________^ [INFO] [stdout] 146 | | else { [INFO] [stdout] 147 | | None [INFO] [stdout] 148 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("numdot", this_line,).map(|s8| s8) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/setup/config_reader.rs:66:52 [INFO] [stdout] | [INFO] [stdout] 66 | let toml_config = toml::from_str::(&config_string) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `config_string` [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: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/setup/config_reader.rs:135:26 [INFO] [stdout] | [INFO] [stdout] 135 | let db_port: usize = db_port_as_string.parse().unwrap_or_else(|_| 5432); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 135 - let db_port: usize = db_port_as_string.parse().unwrap_or_else(|_| 5432); [INFO] [stdout] 135 + let db_port: usize = db_port_as_string.parse().unwrap_or(5432); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/setup/config_reader.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | / return Result::Err(AppError::ConfigurationError("Essential configuration value missing or misspelt.".to_string(), [INFO] [stdout] 161 | | format!("Cannot find a value for {} ({}).", value_name, config_name))) [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] 160 ~ Result::Err(AppError::ConfigurationError("Essential configuration value missing or misspelt.".to_string(), [INFO] [stdout] 161 + format!("Cannot find a value for {} ({}).", value_name, config_name))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"none"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:158:47 [INFO] [stdout] | [INFO] [stdout] 158 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"none"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/setup/config_reader.rs:176:47 [INFO] [stdout] | [INFO] [stdout] 176 | if s == "none".to_string() || s.trim() == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:443:5 [INFO] [stdout] | [INFO] [stdout] 311 | / let processed_result = match raw_result { [INFO] [stdout] 312 | | [INFO] [stdout] 313 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 440 | | None => None, [INFO] [stdout] 441 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 442 | [INFO] [stdout] 443 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 311 ~ [INFO] [stdout] 312 | [INFO] [stdout] 313 ~ match raw_result { [INFO] [stdout] 314 + [INFO] [stdout] 315 + Some (r) => { [INFO] [stdout] 316 + [INFO] [stdout] 317 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 318 + [INFO] [stdout] 319 + let (level, new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 320 + [INFO] [stdout] 321 + let mut genuine = true; // as the starting point [INFO] [stdout] 322 + let proc_tag_type = r.tag_type.clone(); [INFO] [stdout] 323 + let proc_tag = r.tag.clone().trim().to_string(); [INFO] [stdout] 324 + let this_tag_num: i32 = proc_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 325 + [INFO] [stdout] 326 + if &r.tag_type == "numspc" { [INFO] [stdout] 327 + [INFO] [stdout] 328 + // May need to be ignored if a number appears out of sequence [INFO] [stdout] 329 + // Also the case if number is followed by a time period or unit [INFO] [stdout] 330 + // - in which case almost always part of the line above [INFO] [stdout] 331 + [INFO] [stdout] 332 + if (index == 0 || (index == 1 && prev_level == 1)) && this_tag_num != 1 [INFO] [stdout] 333 + { [INFO] [stdout] 334 + genuine = false; // probably, but the converse may not be true [INFO] [stdout] 335 + } [INFO] [stdout] 336 + [INFO] [stdout] 337 + let low_text = r.text.trim().to_lowercase(); [INFO] [stdout] 338 + if low_text.starts_with("secs") [INFO] [stdout] 339 + || low_text.starts_with("second") [INFO] [stdout] 340 + || low_text.starts_with("mins") [INFO] [stdout] 341 + || low_text.starts_with("minute") [INFO] [stdout] 342 + || low_text.starts_with("hour") [INFO] [stdout] 343 + || low_text.starts_with("day") [INFO] [stdout] 344 + || low_text.starts_with("week") [INFO] [stdout] 345 + || low_text.starts_with("month") [INFO] [stdout] 346 + || low_text.starts_with("year") [INFO] [stdout] 347 + || low_text.starts_with("mg") [INFO] [stdout] 348 + || low_text.starts_with("ml") [INFO] [stdout] 349 + || low_text.starts_with("kg") [INFO] [stdout] 350 + || low_text.starts_with("g/") [INFO] [stdout] 351 + || low_text.starts_with("cm") [INFO] [stdout] 352 + || low_text.starts_with("patient") [INFO] [stdout] 353 + || low_text.starts_with("subject") [INFO] [stdout] 354 + { [INFO] [stdout] 355 + // appears to be a header or (more likely) a split line part [INFO] [stdout] 356 + [INFO] [stdout] 357 + genuine = false; [INFO] [stdout] 358 + } [INFO] [stdout] 359 + [INFO] [stdout] 360 + if this_tag_num > 1 { [INFO] [stdout] 361 + if tag_in_numeric_sequence(this_tag_num, tagged_lines, level) { [INFO] [stdout] 362 + genuine = true; // continuation of numdot2 or the first in a numdot2 sequence [INFO] [stdout] 363 + } [INFO] [stdout] 364 + else { [INFO] [stdout] 365 + genuine = false; [INFO] [stdout] 366 + } [INFO] [stdout] 367 + } [INFO] [stdout] 368 + [INFO] [stdout] 369 + if this_tag_num == 1 { [INFO] [stdout] 370 + [INFO] [stdout] 371 + // presumed genuine unless made false above [INFO] [stdout] 372 + [INFO] [stdout] 373 + } [INFO] [stdout] 374 + } [INFO] [stdout] 375 + [INFO] [stdout] 376 + if r.tag_type == "num3spc".to_string() { [INFO] [stdout] 377 + [INFO] [stdout] 378 + // Regex is @"^(1|2)\d{1,2}\.?\s?" - tag type will be ^(1|2)\d{1,2} [INFO] [stdout] 379 + // Can be a spurious CR followed by a number, a.g. after an equals sign [INFO] [stdout] 380 + // or before a unit. Should normally also be part of a sequence. [INFO] [stdout] 381 + [INFO] [stdout] 382 + let low_text = r.text.trim().to_lowercase(); [INFO] [stdout] 383 + if low_text.starts_with("mg") || low_text.starts_with("cm") [INFO] [stdout] 384 + || low_text.starts_with("kg") || low_text.starts_with("secs") [INFO] [stdout] 385 + || low_text.starts_with("patients") || low_text.starts_with("min") [INFO] [stdout] 386 + || low_text.starts_with("days") || low_text.starts_with("subjects") [INFO] [stdout] 387 + { [INFO] [stdout] 388 + genuine = false; [INFO] [stdout] 389 + } [INFO] [stdout] 390 + [INFO] [stdout] 391 + if index > 0 [INFO] [stdout] 392 + { [INFO] [stdout] 393 + let prev_line = &tagged_lines[index - 1].text; [INFO] [stdout] 394 + if prev_line.last_char() == '=' || prev_line.last_char() == '>' || prev_line.last_char() == '<' [INFO] [stdout] 395 + { [INFO] [stdout] 396 + genuine = false; [INFO] [stdout] 397 + } [INFO] [stdout] 398 + else [INFO] [stdout] 399 + { [INFO] [stdout] 400 + if r.tag != "101" && r.tag != "201" [INFO] [stdout] 401 + { [INFO] [stdout] 402 + let prevln1same = prev_tag_type == "num3spc"; [INFO] [stdout] 403 + let mut prevln2same = false; [INFO] [stdout] 404 + if index > 1 [INFO] [stdout] 405 + { [INFO] [stdout] 406 + let prevldr2 = tagged_lines[index - 2].tag.clone(); [INFO] [stdout] 407 + if prevldr2 == "num3spc".to_string() [INFO] [stdout] 408 + { [INFO] [stdout] 409 + prevln2same = true; [INFO] [stdout] 410 + } [INFO] [stdout] 411 + } [INFO] [stdout] 412 + if !(prevln1same || prevln2same) [INFO] [stdout] 413 + { [INFO] [stdout] 414 + // line seems to be isolated in the sequence [INFO] [stdout] 415 + genuine = false; [INFO] [stdout] 416 + } [INFO] [stdout] 417 + } [INFO] [stdout] 418 + } [INFO] [stdout] 419 + [INFO] [stdout] 420 + } [INFO] [stdout] 421 + [INFO] [stdout] 422 + } [INFO] [stdout] 423 + [INFO] [stdout] 424 + if genuine { [INFO] [stdout] 425 + [INFO] [stdout] 426 + Some(CLine { [INFO] [stdout] 427 + seq_num: (index + 1) as i32, [INFO] [stdout] 428 + tag: r.tag, [INFO] [stdout] 429 + tag_type: proc_tag_type, [INFO] [stdout] 430 + indent_level: level, [INFO] [stdout] 431 + text: r.text, [INFO] [stdout] 432 + }) [INFO] [stdout] 433 + } [INFO] [stdout] 434 + else { [INFO] [stdout] 435 + // remove the level if one has just been added to the levels vector [INFO] [stdout] 436 + if new_level { [INFO] [stdout] 437 + levels.pop(); [INFO] [stdout] 438 + } [INFO] [stdout] 439 + None [INFO] [stdout] 440 + } [INFO] [stdout] 441 + }, [INFO] [stdout] 442 + None => None, [INFO] [stdout] 443 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_res.rs:278:12 [INFO] [stdout] | [INFO] [stdout] 278 | if s9.text.first_char().is_digit(10) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s9.text.first_char().is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:291:48 [INFO] [stdout] | [INFO] [stdout] 291 | s12.text = s12.text.trim_start_matches(&['.', ' ']).to_string(); // text is shorn of any whitespace, periods [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:292:40 [INFO] [stdout] | [INFO] [stdout] 292 | s12.tag = s12.tag.trim_matches(&['.', ' ']).to_string(); // tag is now just the 3 numerals [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:306:10 [INFO] [stdout] | [INFO] [stdout] 306 | else if let Some(s15) = test_re("numal", this_line) { Some(s15) } [INFO] [stdout] | __________^ [INFO] [stdout] 307 | | else { [INFO] [stdout] 308 | | None [INFO] [stdout] 309 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("numal", this_line).map(|s15| s15) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/iec/iec_res.rs:322:37 [INFO] [stdout] | [INFO] [stdout] 322 | let this_tag_num: i32 = proc_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 322 - let this_tag_num: i32 = proc_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 322 + let this_tag_num: i32 = proc_tag.parse().unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_res.rs:374:30 [INFO] [stdout] | [INFO] [stdout] 374 | if r.tag_type == "num3spc".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `"num3spc"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_res.rs:405:49 [INFO] [stdout] | [INFO] [stdout] 405 | ... if prevldr2 == "num3spc".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `"num3spc"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/setup/mod.rs:32:67 [INFO] [stdout] | [INFO] [stdout] 32 | let config_file: Config = config_reader::populate_config_vars(&config_string)?; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `config_string` [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 `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/setup/mod.rs:59:31 [INFO] [stdout] | [INFO] [stdout] 59 | fn folder_exists(folder_name: &PathBuf) -> bool { [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] 59 - fn folder_exists(folder_name: &PathBuf) -> bool { [INFO] [stdout] 59 + fn folder_exists(folder_name: &Path) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/setup/mod.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 60 | / let res = match folder_name.try_exists() { [INFO] [stdout] 61 | | Ok(true) => true, [INFO] [stdout] 62 | | Ok(false) => false, [INFO] [stdout] 63 | | Err(_e) => false, [INFO] [stdout] 64 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 65 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 60 ~ [INFO] [stdout] 61 ~ match folder_name.try_exists() { [INFO] [stdout] 62 + Ok(true) => true, [INFO] [stdout] 63 + Ok(false) => false, [INFO] [stdout] 64 + Err(_e) => false, [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/setup/mod.rs:126:40 [INFO] [stdout] | [INFO] [stdout] 126 | log_helper::log_startup_params(¶ms); [INFO] [stdout] | ^^^^^^^ help: change this to: `params` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/setup/mod.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | / match LOG_RUNNING.get() { [INFO] [stdout] 133 | | Some(_) => true, [INFO] [stdout] 134 | | None => false, [INFO] [stdout] 135 | | } [INFO] [stdout] | |_____^ help: try: `LOG_RUNNING.get().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:531:5 [INFO] [stdout] | [INFO] [stdout] 491 | / let processed_result = match raw_result { [INFO] [stdout] 492 | | [INFO] [stdout] 493 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 528 | | None => None, [INFO] [stdout] 529 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 530 | [INFO] [stdout] 531 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 491 ~ [INFO] [stdout] 492 | [INFO] [stdout] 493 ~ match raw_result { [INFO] [stdout] 494 + [INFO] [stdout] 495 + Some (r) => { [INFO] [stdout] 496 + [INFO] [stdout] 497 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 498 + [INFO] [stdout] 499 + let (mut level, _new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 500 + [INFO] [stdout] 501 + // Some roman numeral tags may in fact be part of an alpha sequence - check sequence [INFO] [stdout] 502 + // They would be in as a sub-criterion at a level 1 more than they should be. [INFO] [stdout] 503 + [INFO] [stdout] 504 + let mut proc_tag_type = r.tag_type.clone(); // default [INFO] [stdout] 505 + [INFO] [stdout] 506 + if r.tag_type.starts_with("rom") { [INFO] [stdout] 507 + if r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 508 + || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 509 + || r.tag == "x." || r.tag == "x)" || r.tag == "X." { [INFO] [stdout] 510 + if tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 511 + proc_tag_type = "aldot".to_string(); [INFO] [stdout] 512 + level = level - 1; [INFO] [stdout] 513 + } [INFO] [stdout] 514 + } [INFO] [stdout] 515 + } [INFO] [stdout] 516 + [INFO] [stdout] 517 + if r.tag == "i." && r.text.starts_with("e.") { // very rare but can occur - a false match that needs to be recognised as a non-tag [INFO] [stdout] 518 + None [INFO] [stdout] 519 + } [INFO] [stdout] 520 + else { [INFO] [stdout] 521 + Some(CLine { [INFO] [stdout] 522 + seq_num: (index + 1) as i32, [INFO] [stdout] 523 + tag: r.tag, [INFO] [stdout] 524 + tag_type: proc_tag_type, [INFO] [stdout] 525 + indent_level: level, [INFO] [stdout] 526 + text: r.text, [INFO] [stdout] 527 + }) [INFO] [stdout] 528 + } [INFO] [stdout] 529 + }, [INFO] [stdout] 530 + None => None, [INFO] [stdout] 531 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:486:10 [INFO] [stdout] | [INFO] [stdout] 486 | else if let Some(s11) = test_re("i_num", this_line) { Some(s11) } // inclusion as I or i numbers, optional space i1, i2 [INFO] [stdout] | __________^ [INFO] [stdout] 487 | | else { [INFO] [stdout] 488 | | None [INFO] [stdout] 489 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("i_num", this_line).map(|s11| s11) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:504:13 [INFO] [stdout] | [INFO] [stdout] 504 | / if r.tag_type.starts_with("rom") { [INFO] [stdout] 505 | | if r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 | | || r.tag == "x." || r.tag == "x)" || r.tag == "X." { [INFO] [stdout] ... | [INFO] [stdout] 513 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 504 ~ if r.tag_type.starts_with("rom") [INFO] [stdout] 505 ~ && (r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 ~ || r.tag == "x." || r.tag == "x)" || r.tag == "X.") { [INFO] [stdout] 508 | if tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] ... [INFO] [stdout] 511 | } [INFO] [stdout] 512 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:505:17 [INFO] [stdout] | [INFO] [stdout] 505 | / if r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 | | || r.tag == "x." || r.tag == "x)" || r.tag == "X." { [INFO] [stdout] 508 | | if tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] ... | [INFO] [stdout] 512 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 505 ~ if (r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 ~ || r.tag == "x." || r.tag == "x)" || r.tag == "X.") { [INFO] [stdout] 508 ~ && tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 509 | proc_tag_type = "aldot".to_string(); [INFO] [stdout] 510 | level = level - 1; [INFO] [stdout] 511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/iec/iec_res.rs:510:25 [INFO] [stdout] | [INFO] [stdout] 510 | level = level - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `level -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:594:5 [INFO] [stdout] | [INFO] [stdout] 560 | / let processed_result = match raw_result { [INFO] [stdout] 561 | | [INFO] [stdout] 562 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 591 | | None => None, [INFO] [stdout] 592 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 593 | [INFO] [stdout] 594 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 560 ~ [INFO] [stdout] 561 | [INFO] [stdout] 562 ~ match raw_result { [INFO] [stdout] 563 + [INFO] [stdout] 564 + Some (r) => { [INFO] [stdout] 565 + [INFO] [stdout] 566 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 567 + [INFO] [stdout] 568 + let (mut level, _new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 569 + [INFO] [stdout] 570 + // Some roman numeral tags may in fact be part of an alpha sequence - check sequence [INFO] [stdout] 571 + // They would be in as a sub-criterion at a level 1 more than they should be. [INFO] [stdout] 572 + [INFO] [stdout] 573 + let mut proc_tag_type = r.tag_type.clone(); // default [INFO] [stdout] 574 + [INFO] [stdout] 575 + if r.tag_type.starts_with("rom") { [INFO] [stdout] 576 + if r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)" { [INFO] [stdout] 577 + if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 578 + proc_tag_type = "alinpar".to_string(); [INFO] [stdout] 579 + level = level - 1; [INFO] [stdout] 580 + } [INFO] [stdout] 581 + } [INFO] [stdout] 582 + } [INFO] [stdout] 583 + [INFO] [stdout] 584 + Some(CLine { [INFO] [stdout] 585 + seq_num: (index + 1) as i32, [INFO] [stdout] 586 + tag: r.tag, [INFO] [stdout] 587 + tag_type: proc_tag_type, [INFO] [stdout] 588 + indent_level: level, [INFO] [stdout] 589 + text: r.text, [INFO] [stdout] 590 + }) [INFO] [stdout] 591 + [INFO] [stdout] 592 + }, [INFO] [stdout] 593 + None => None, [INFO] [stdout] 594 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:554:10 [INFO] [stdout] | [INFO] [stdout] 554 | else if let Some(s7) = test_re("invqm", this_line) { Some(s7) } // inverted question mark only ¿, ¿ [INFO] [stdout] | __________^ [INFO] [stdout] 555 | | [INFO] [stdout] 556 | | else { [INFO] [stdout] 557 | | None [INFO] [stdout] 558 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("invqm", this_line).map(|s7| s7) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:573:13 [INFO] [stdout] | [INFO] [stdout] 573 | / if r.tag_type.starts_with("rom") { [INFO] [stdout] 574 | | if r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)" { [INFO] [stdout] 575 | | if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 576 | | proc_tag_type = "alinpar".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 580 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 573 ~ if r.tag_type.starts_with("rom") [INFO] [stdout] 574 ~ && (r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)") { [INFO] [stdout] 575 | if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] ... [INFO] [stdout] 578 | } [INFO] [stdout] 579 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:574:17 [INFO] [stdout] | [INFO] [stdout] 574 | / if r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)" { [INFO] [stdout] 575 | | if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 576 | | proc_tag_type = "alinpar".to_string(); [INFO] [stdout] 577 | | level = level - 1; [INFO] [stdout] 578 | | } [INFO] [stdout] 579 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 574 ~ if (r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)") { [INFO] [stdout] 575 ~ && tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 576 | proc_tag_type = "alinpar".to_string(); [INFO] [stdout] 577 | level = level - 1; [INFO] [stdout] 578 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/iec/iec_res.rs:577:25 [INFO] [stdout] | [INFO] [stdout] 577 | level = level - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `level -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `levels` [INFO] [stdout] --> src/iec/iec_res.rs:610:14 [INFO] [stdout] | [INFO] [stdout] 610 | for i in 2..levels.len() { [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] 610 - for i in 2..levels.len() { [INFO] [stdout] 610 + for (i, ) in levels.iter().enumerate().skip(2) { [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/iec/iec_res.rs:640:48 [INFO] [stdout] | [INFO] [stdout] 640 | fn tag_in_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [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] 640 - fn tag_in_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [INFO] [stdout] 640 + fn tag_in_sequence(tag: &String, tagged_lines: &[CLine], current_indent_level: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/iec/iec_res.rs:646:8 [INFO] [stdout] | [INFO] [stdout] 646 | if tagged_lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tagged_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_res.rs:664:58 [INFO] [stdout] | [INFO] [stdout] 664 | fn tag_in_bracketed_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [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] 664 - fn tag_in_bracketed_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [INFO] [stdout] 664 + fn tag_in_bracketed_sequence(tag: &String, tagged_lines: &[CLine], current_indent_level: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/iec/iec_res.rs:670:8 [INFO] [stdout] | [INFO] [stdout] 670 | if tagged_lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tagged_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_res.rs:689:56 [INFO] [stdout] | [INFO] [stdout] 689 | fn tag_in_numeric_sequence(tag_num: i32, tagged_lines: &Vec, current_indent_level: i32) -> bool { [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] 689 - fn tag_in_numeric_sequence(tag_num: i32, tagged_lines: &Vec, current_indent_level: i32) -> bool { [INFO] [stdout] 689 + fn tag_in_numeric_sequence(tag_num: i32, tagged_lines: &[CLine], current_indent_level: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/iec/iec_res.rs:695:8 [INFO] [stdout] | [INFO] [stdout] 695 | if tagged_lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tagged_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/iec/iec_res.rs:702:45 [INFO] [stdout] | [INFO] [stdout] 702 | let test_tag_num: i32 = test_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 702 - let test_tag_num: i32 = test_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 702 + let test_tag_num: i32 = test_tag.parse().unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/err.rs:59:33 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn report_error(e: AppError) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` 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/err.rs:105:47 [INFO] [stdout] | [INFO] [stdout] 105 | let hdr_line = get_header_line (star_num, &header); [INFO] [stdout] | ^^^^^^^ help: change this to: `header` [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/err.rs:113:47 [INFO] [stdout] | [INFO] [stdout] 113 | let hdr_line = get_header_line (star_num, &header); [INFO] [stdout] | ^^^^^^^ help: change this to: `header` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/err.rs:122:8 [INFO] [stdout] | [INFO] [stdout] 122 | if hdr_len % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!hdr_len.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lib.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | let cli_pars: cli_reader::CliPars; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 48 | cli_pars = cli_reader::fetch_valid_arguments(args)?; [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] help: move the declaration `cli_pars` here [INFO] [stdout] | [INFO] [stdout] 47 ~ [INFO] [stdout] 48 ~ let cli_pars: cli_reader::CliPars = cli_reader::fetch_valid_arguments(args)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `base_types::DownloadType` [INFO] [stdout] --> src/base_types.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn to_string(&self) -> String { [INFO] [stdout] 26 | | match self { [INFO] [stdout] 27 | | DownloadType::Recent => "Recently updated".to_string(), [INFO] [stdout] 28 | | DownloadType::BetweenDates => "Updated between dates".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `base_types::DownloadType` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DownloadResult` [INFO] [stdout] --> src/base_types.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new() -> Self { [INFO] [stdout] 44 | | DownloadResult { [INFO] [stdout] 45 | | num_checked: 0, [INFO] [stdout] 46 | | num_downloaded: 0, [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] | |____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for DownloadResult { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `base_types::ImportType` [INFO] [stdout] --> src/base_types.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / pub fn to_string(&self) -> String { [INFO] [stdout] 74 | | match self { [INFO] [stdout] 75 | | ImportType::None => "None".to_string(), [INFO] [stdout] 76 | | ImportType::Recent => "Recently downloaded".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `base_types::ImportType` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/iec/iec_fns.rs:605:35 [INFO] [stdout] | [INFO] [stdout] 605 | let mut level_pos_store = vec![0; 8]; // up to 8 levels possible [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/download/processor.rs:96:53 [INFO] [stdout] | [INFO] [stdout] 96 | ... if RE_CPMS_NUM.is_match(&id) { // already a digit string [INFO] [stdout] | ^^^ help: change this to: `id` [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/download/processor.rs:106:53 [INFO] [stdout] | [INFO] [stdout] 106 | ... if RE_NIHR_NUM.is_match(&id) { // already a digit string [INFO] [stdout] | ^^^ help: change this to: `id` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/download/processor.rs:121:51 [INFO] [stdout] | [INFO] [stdout] 121 | ... if type_string == "???".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"???"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/download/processor.rs:147:55 [INFO] [stdout] | [INFO] [stdout] 147 | ... if type_string == "???".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"???"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/download/processor.rs:178:51 [INFO] [stdout] | [INFO] [stdout] 178 | ... if type_string == "???".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"???"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:225:8 [INFO] [stdout] | [INFO] [stdout] 225 | if d.primary_outcomes.outcome_measures.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.primary_outcomes.outcome_measures.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:237:8 [INFO] [stdout] | [INFO] [stdout] 237 | if d.secondary_outcomes.outcome_measures.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.secondary_outcomes.outcome_measures.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:256:8 [INFO] [stdout] | [INFO] [stdout] 256 | if d.ethics_committee_list.ethics_committees.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.ethics_committee_list.ethics_committees.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/download/processor.rs:283:5 [INFO] [stdout] | [INFO] [stdout] 283 | / if let Some(tts) = ds.trial_type_list { [INFO] [stdout] 284 | | if tts.trial_types.len() > 0 { [INFO] [stdout] 285 | | for tt in tts.trial_types { [INFO] [stdout] 286 | | if let Some(s) = tt.trial_type.as_text_opt(){ [INFO] [stdout] ... | [INFO] [stdout] 291 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 283 ~ if let Some(tts) = ds.trial_type_list [INFO] [stdout] 284 ~ && tts.trial_types.len() > 0 { [INFO] [stdout] 285 | for tt in tts.trial_types { [INFO] [stdout] ... [INFO] [stdout] 289 | } [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:284:12 [INFO] [stdout] | [INFO] [stdout] 284 | if tts.trial_types.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tts.trial_types.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/download/processor.rs:296:5 [INFO] [stdout] | [INFO] [stdout] 296 | / if let Some(tss) = ds.trial_setting_list { [INFO] [stdout] 297 | | if tss.trial_settings.len() > 0 { [INFO] [stdout] 298 | | for ts in tss.trial_settings { [INFO] [stdout] 299 | | if let Some(s) = ts.trial_setting.as_text_opt(){ [INFO] [stdout] ... | [INFO] [stdout] 304 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 296 ~ if let Some(tss) = ds.trial_setting_list [INFO] [stdout] 297 ~ && tss.trial_settings.len() > 0 { [INFO] [stdout] 298 | for ts in tss.trial_settings { [INFO] [stdout] ... [INFO] [stdout] 302 | } [INFO] [stdout] 303 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:297:12 [INFO] [stdout] | [INFO] [stdout] 297 | if tss.trial_settings.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tss.trial_settings.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:311:8 [INFO] [stdout] | [INFO] [stdout] 311 | if study.condition_list.conditions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!study.condition_list.conditions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:331:8 [INFO] [stdout] | [INFO] [stdout] 331 | if study.intervention_list.interventions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!study.intervention_list.interventions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:353:8 [INFO] [stdout] | [INFO] [stdout] 353 | if s.contacts.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.contacts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:357:16 [INFO] [stdout] | [INFO] [stdout] 357 | if c.contact_type_list.contact_types.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.contact_type_list.contact_types.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:398:8 [INFO] [stdout] | [INFO] [stdout] 398 | if s.sponsors.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.sponsors.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:433:8 [INFO] [stdout] | [INFO] [stdout] 433 | if s.funders.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.funders.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:448:8 [INFO] [stdout] | [INFO] [stdout] 448 | if p.participant_type_list.participant_types.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!p.participant_type_list.participant_types.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:507:8 [INFO] [stdout] | [INFO] [stdout] 507 | if p.centre_list.centres.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!p.centre_list.centres.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:522:8 [INFO] [stdout] | [INFO] [stdout] 522 | if p.country_list.countries.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!p.country_list.countries.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:554:12 [INFO] [stdout] | [INFO] [stdout] 554 | if s_countries.len() == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s_countries.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/download/processor.rs:579:8 [INFO] [stdout] | [INFO] [stdout] 579 | if r.data_policy_list.data_policies.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!r.data_policy_list.data_policies.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/download/processor.rs:708:5 [INFO] [stdout] | [INFO] [stdout] 708 | / if let Some(b) = study.miscellaneous.ipd_sharing_plan { [INFO] [stdout] 709 | | if b.to_ascii_lowercase() == "yes" { [INFO] [stdout] 710 | | has_sharing_plan = true; [INFO] [stdout] 711 | | } [INFO] [stdout] 712 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 708 ~ if let Some(b) = study.miscellaneous.ipd_sharing_plan [INFO] [stdout] 709 ~ && b.to_ascii_lowercase() == "yes" { [INFO] [stdout] 710 | has_sharing_plan = true; [INFO] [stdout] 711 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/download/processor.rs:709:12 [INFO] [stdout] | [INFO] [stdout] 709 | if b.to_ascii_lowercase() == "yes" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 709 - if b.to_ascii_lowercase() == "yes" { [INFO] [stdout] 709 + if b.eq_ignore_ascii_case("yes") { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/download/monitoring.rs:10:63 [INFO] [stdout] | [INFO] [stdout] 10 | record_date: &Option, full_path: &PathBuf, src_pool: &Pool) -> 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] 10 - record_date: &Option, full_path: &PathBuf, src_pool: &Pool) -> Result { [INFO] [stdout] 10 + record_date: &Option, full_path: &Path, src_pool: &Pool) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/download/monitoring.rs:29:25 [INFO] [stdout] | [INFO] [stdout] 29 | sqlx::query(&sql).bind(sd_sid).bind(remote_url).bind(record_date) [INFO] [stdout] | ^^^^ help: change this to: `sql` [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/download/monitoring.rs:37:25 [INFO] [stdout] | [INFO] [stdout] 37 | sqlx::query(&sql).bind(sd_sid).bind(remote_url).bind(record_date) [INFO] [stdout] | ^^^^ help: change this to: `sql` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / match RE_IRASC.captures(&this_id) { [INFO] [stdout] 30 | | Some(s) => { [INFO] [stdout] 31 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 32 | | }, [INFO] [stdout] 33 | | None => {}, // no iras match at all [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 29 ~ if let Some(s) = RE_IRASC.captures(&this_id) { [INFO] [stdout] 30 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / match RE_CPMSC.captures(&this_id) { [INFO] [stdout] 37 | | Some(s) => { [INFO] [stdout] 38 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 39 | | }, [INFO] [stdout] 40 | | None => {}, // no cpms match at all [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 36 ~ if let Some(s) = RE_CPMSC.captures(&this_id) { [INFO] [stdout] 37 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 38 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / match RE_NIHRC.captures(&this_id) { [INFO] [stdout] 44 | | Some(s) => { [INFO] [stdout] 45 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 46 | | }, [INFO] [stdout] 47 | | None => {}, // no nihr match at all [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 43 ~ if let Some(s) = RE_NIHRC.captures(&this_id) { [INFO] [stdout] 44 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/download/support_fns.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | / match RE_HTAC.captures(&this_id) { [INFO] [stdout] 51 | | Some(s) => { [INFO] [stdout] 52 | | this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 53 | | }, [INFO] [stdout] 54 | | None => {}, // no hta match at all [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = note: you might want to preserve the comments from inside the `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(s) = RE_HTAC.captures(&this_id) { [INFO] [stdout] 51 + this_id = this_id.replace(&s[0], &s[0].replace(",", "||")) [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/download/mod.rs:131:31 [INFO] [stdout] | [INFO] [stdout] 131 | async fn get_study_count(url: &String) -> 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] 131 ~ async fn get_study_count(url: &str) -> Result { [INFO] [stdout] 132 | [INFO] [stdout] 133 ~ let response = reqwest::get(url.to_owned()).await [INFO] [stdout] 134 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 135 | [INFO] [stdout] ... [INFO] [stdout] 146 | let xml_content = response.text().await [INFO] [stdout] 147 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 148 | [INFO] [stdout] 149 | let trials_count: TrialsCount = de::from_str(&xml_content) [INFO] [stdout] 150 ~ .map_err(|e| AppError::QuickXMLError(url.to_owned(), e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/download/mod.rs:157:27 [INFO] [stdout] | [INFO] [stdout] 157 | async fn get_studies(url: &String) -> 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] 157 ~ async fn get_studies(url: &str) -> Result { [INFO] [stdout] 158 | [INFO] [stdout] 159 ~ let response = reqwest::get(url.to_owned()).await [INFO] [stdout] 160 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 161 | [INFO] [stdout] ... [INFO] [stdout] 172 | let xml_content = response.text().await [INFO] [stdout] 173 ~ .map_err(|e| AppError::ReqwestError(url.to_owned(), e))?; [INFO] [stdout] 174 | [INFO] [stdout] 175 | de::from_str(&xml_content) [INFO] [stdout] 176 ~ .map_err(|e| AppError::QuickXMLError(url.to_owned(), e)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/download/mod.rs:255:31 [INFO] [stdout] | [INFO] [stdout] 255 | fn folder_exists(folder_name: &PathBuf) -> bool { [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] 255 - fn folder_exists(folder_name: &PathBuf) -> bool { [INFO] [stdout] 255 + fn folder_exists(folder_name: &Path) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/download/mod.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 256 | / let res = match folder_name.try_exists() { [INFO] [stdout] 257 | | Ok(true) => true, [INFO] [stdout] 258 | | Ok(false) => false, [INFO] [stdout] 259 | | Err(_e) => false, [INFO] [stdout] 260 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 261 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 256 ~ [INFO] [stdout] 257 ~ match folder_name.try_exists() { [INFO] [stdout] 258 + Ok(true) => true, [INFO] [stdout] 259 + Ok(false) => false, [INFO] [stdout] 260 + Err(_e) => false, [INFO] [stdout] 261 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/import/monitoring.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | sqlx::query(&sql).bind(sd_sid).bind(imp_event_id).bind(now) [INFO] [stdout] | ^^^^ help: change this to: `sql` [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: called `unwrap` on `sci_title_db` after checking its variant with `is_some` [INFO] [stdout] --> src/import/processor.rs:127:48 [INFO] [stdout] | [INFO] [stdout] 127 | if sci_title_db.is_some() {db_ts.push (sci_title_db.unwrap());} [INFO] [stdout] | ------------------------- ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = sci_title_db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `acronym_db` after checking its variant with `is_some` [INFO] [stdout] --> src/import/processor.rs:128:46 [INFO] [stdout] | [INFO] [stdout] 128 | if acronym_db.is_some() {db_ts.push (acronym_db.unwrap());} [INFO] [stdout] | ----------------------- ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = acronym_db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `acronym_db` after checking its variant with `is_some` [INFO] [stdout] --> src/import/processor.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | if acronym_db.is_some() {db_ts.push (acronym_db.unwrap());} [INFO] [stdout] | ----------------------- ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: try: `if let Some() = acronym_db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::filter` [INFO] [stdout] --> src/import/processor.rs:188:27 [INFO] [stdout] | [INFO] [stdout] 188 | let mut description = match s.summary.plain_english_summary.clone() { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 189 | | Some (s) => { [INFO] [stdout] 190 | | if s.to_lowercase().starts_with("not provided") { [INFO] [stdout] 191 | | None [INFO] [stdout] ... | [INFO] [stdout] 197 | | None => None, [INFO] [stdout] 198 | | }; [INFO] [stdout] | |_____^ help: try: `s.summary.plain_english_summary.clone().filter(|s| !s.to_lowercase().starts_with("not provided"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter [INFO] [stdout] = note: `#[warn(clippy::manual_filter)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/import/processor.rs:202:8 [INFO] [stdout] | [INFO] [stdout] 202 | if description == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `description.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:320:25 [INFO] [stdout] | [INFO] [stdout] 320 | let status_opt = if status_string == "" {None} else {Some(status_string.to_string())}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `status_string.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: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:326:17 [INFO] [stdout] | [INFO] [stdout] 326 | / match NaiveDate::parse_from_str(&ds[..10], "%Y-%m-%d") { [INFO] [stdout] 327 | | Ok(d) =>Some(d), [INFO] [stdout] 328 | | Err(_) => None, [INFO] [stdout] 329 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds[..10], "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:525:21 [INFO] [stdout] | [INFO] [stdout] 525 | / if let Some(true) = dbo.is_sponsor { [INFO] [stdout] 526 | | if dbo.org_name == fname { // Change contribution type and try to combine information [INFO] [stdout] 527 | | dbo.is_funder = Some(true); [INFO] [stdout] 528 | | dbo.org_cref_id = f.fund_ref.clone(); [INFO] [stdout] ... | [INFO] [stdout] 532 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 525 ~ if let Some(true) = dbo.is_sponsor [INFO] [stdout] 526 ~ && dbo.org_name == fname { // Change contribution type and try to combine information [INFO] [stdout] 527 | dbo.is_funder = Some(true); [INFO] [stdout] ... [INFO] [stdout] 530 | break; [INFO] [stdout] 531 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:563:13 [INFO] [stdout] | [INFO] [stdout] 563 | / if c.surname.appears_plausible_person_name() { [INFO] [stdout] 564 | | if let Some(cts) = &c.contact_types { [INFO] [stdout] 565 | | let mut role_list = "".to_string(); [INFO] [stdout] 566 | | for ct in cts { [INFO] [stdout] ... | [INFO] [stdout] 589 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 563 ~ if c.surname.appears_plausible_person_name() [INFO] [stdout] 564 ~ && let Some(cts) = &c.contact_types { [INFO] [stdout] 565 | let mut role_list = "".to_string(); [INFO] [stdout] ... [INFO] [stdout] 587 | } [INFO] [stdout] 588 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:571:32 [INFO] [stdout] | [INFO] [stdout] 571 | ... if role_list == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `role_list.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: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:579:24 [INFO] [stdout] | [INFO] [stdout] 579 | if role_list != "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!role_list.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: stripping a prefix manually [INFO] [stdout] --> src/import/processor.rs:643:39 [INFO] [stdout] | [INFO] [stdout] 643 | ... c2 = Some(c2_section[9..].trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/import/processor.rs:642:25 [INFO] [stdout] | [INFO] [stdout] 642 | if c2_section.starts_with("Subtopic:") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 642 ~ if let Some() = c2_section.strip_prefix("Subtopic:") { [INFO] [stdout] 643 ~ c2 = Some(.trim().to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/import/processor.rs:646:41 [INFO] [stdout] | [INFO] [stdout] 646 | ... desc = Some(desc_section[8..].trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/import/processor.rs:645:25 [INFO] [stdout] | [INFO] [stdout] 645 | if desc_section.starts_with("Disease:") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 645 ~ if let Some() = desc_section.strip_prefix("Disease:") { [INFO] [stdout] 646 ~ desc = Some(.trim().to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:688:5 [INFO] [stdout] | [INFO] [stdout] 688 | / if type_id == 11 { [INFO] [stdout] 689 | | if let Some(ints) = &s.interventions { [INFO] [stdout] 690 | | for int in ints { [INFO] [stdout] 691 | | if let Some(p) = &int.phase { [INFO] [stdout] ... | [INFO] [stdout] 714 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 688 ~ if type_id == 11 [INFO] [stdout] 689 ~ && let Some(ints) = &s.interventions { [INFO] [stdout] 690 | for int in ints { [INFO] [stdout] ... [INFO] [stdout] 712 | } [INFO] [stdout] 713 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:720:18 [INFO] [stdout] | [INFO] [stdout] 720 | if design != "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:852:13 [INFO] [stdout] | [INFO] [stdout] 852 | / if let Some(dn) = &int.drug_names.clean() { [INFO] [stdout] 853 | | if !dn.to_lowercase().starts_with("the sponsor has confirmed") [INFO] [stdout] 854 | | && !dn.to_lowercase().starts_with("the health research authority") [INFO] [stdout] 855 | | && !dn.to_lowercase().starts_with("not provided") [INFO] [stdout] ... | [INFO] [stdout] 925 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 852 ~ if let Some(dn) = &int.drug_names.clean() [INFO] [stdout] 853 ~ && !dn.to_lowercase().starts_with("the sponsor has confirmed") [INFO] [stdout] 854 | && !dn.to_lowercase().starts_with("the health research authority") [INFO] [stdout] ... [INFO] [stdout] 923 | } [INFO] [stdout] 924 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:937:5 [INFO] [stdout] | [INFO] [stdout] 937 | / if incs.is_not_a_place_holder() { [INFO] [stdout] 938 | | if let Some(inc_para) = incs { [INFO] [stdout] 939 | | let (inc_result_code, mut inc_criteria) = original_process_iec(&sd_sid, &inc_para, "inclusion"); [INFO] [stdout] 940 | | inc_result = inc_result_code; [INFO] [stdout] ... | [INFO] [stdout] 946 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 937 ~ if incs.is_not_a_place_holder() [INFO] [stdout] 938 ~ && let Some(inc_para) = incs { [INFO] [stdout] 939 | let (inc_result_code, mut inc_criteria) = original_process_iec(&sd_sid, &inc_para, "inclusion"); [INFO] [stdout] ... [INFO] [stdout] 944 | } [INFO] [stdout] 945 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/import/processor.rs:939:85 [INFO] [stdout] | [INFO] [stdout] 939 | let (inc_result_code, mut inc_criteria) = original_process_iec(&sd_sid, &inc_para, "inclusion"); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `inc_para` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/import/processor.rs:942:16 [INFO] [stdout] | [INFO] [stdout] 942 | if inc_criteria.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!inc_criteria.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/import/processor.rs:949:5 [INFO] [stdout] | [INFO] [stdout] 949 | / if excs.is_not_a_place_holder() { [INFO] [stdout] 950 | | if let Some(exc_para) = excs { [INFO] [stdout] 951 | | let (exc_result_code, mut exc_criteria) = original_process_iec(&sd_sid , &exc_para, "exclusion"); [INFO] [stdout] 952 | | exc_result = exc_result_code; [INFO] [stdout] ... | [INFO] [stdout] 958 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 949 ~ if excs.is_not_a_place_holder() [INFO] [stdout] 950 ~ && let Some(exc_para) = excs { [INFO] [stdout] 951 | let (exc_result_code, mut exc_criteria) = original_process_iec(&sd_sid , &exc_para, "exclusion"); [INFO] [stdout] ... [INFO] [stdout] 956 | } [INFO] [stdout] 957 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/import/processor.rs:951:86 [INFO] [stdout] | [INFO] [stdout] 951 | let (exc_result_code, mut exc_criteria) = original_process_iec(&sd_sid , &exc_para, "exclusion"); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `exc_para` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/import/processor.rs:954:16 [INFO] [stdout] | [INFO] [stdout] 954 | if exc_criteria.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exc_criteria.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: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:973:29 [INFO] [stdout] | [INFO] [stdout] 973 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 974 | | Ok(d) => Some(d), [INFO] [stdout] 975 | | Err(_) => None, [INFO] [stdout] 976 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:981:29 [INFO] [stdout] | [INFO] [stdout] 981 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 982 | | Ok(d) => Some(d), [INFO] [stdout] 983 | | Err(_) => None, [INFO] [stdout] 984 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/import/processor.rs:1077:21 [INFO] [stdout] | [INFO] [stdout] 1077 | / match RE_PM.captures(&external_url.clone()) { [INFO] [stdout] 1078 | | Some(s) => { [INFO] [stdout] 1079 | | pmid_as_str = s[0].to_string(); [INFO] [stdout] 1080 | | external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmid_as_str); [INFO] [stdout] ... | [INFO] [stdout] 1085 | | None => {}, [INFO] [stdout] 1086 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1077 ~ if let Some(s) = RE_PM.captures(&external_url.clone()) { [INFO] [stdout] 1078 + pmid_as_str = s[0].to_string(); [INFO] [stdout] 1079 + external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmid_as_str); [INFO] [stdout] 1080 + pub_id = pmid_as_str.clone(); [INFO] [stdout] 1081 + pub_id_type = "PMID".to_string(); [INFO] [stdout] 1082 + categorised =true; [INFO] [stdout] 1083 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/import/processor.rs:1095:31 [INFO] [stdout] | [INFO] [stdout] 1095 | doi = (&low_url[19..]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `low_url[19..]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/import/processor.rs:1098:30 [INFO] [stdout] | [INFO] [stdout] 1098 | doi= (&low_url[16..]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `low_url[16..]` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/import/processor.rs:1101:30 [INFO] [stdout] | [INFO] [stdout] 1101 | doi= (&low_url[20..]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `low_url[20..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/import/processor.rs:1116:21 [INFO] [stdout] | [INFO] [stdout] 1116 | / match RE_PMC.captures(&external_url.clone()) { [INFO] [stdout] 1117 | | Some(s) => { [INFO] [stdout] 1118 | | pmcid_as_str = s[0].to_string(); [INFO] [stdout] 1119 | | external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmcid_as_str); [INFO] [stdout] ... | [INFO] [stdout] 1124 | | None => {}, [INFO] [stdout] 1125 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1116 ~ if let Some(s) = RE_PMC.captures(&external_url.clone()) { [INFO] [stdout] 1117 + pmcid_as_str = s[0].to_string(); [INFO] [stdout] 1118 + external_url = format!("https://pubmed.ncbi.nlm.nih.gov/{}/", pmcid_as_str); [INFO] [stdout] 1119 + pub_id = pmcid_as_str.clone(); [INFO] [stdout] 1120 + pub_id_type = "PMC ID".to_string(); [INFO] [stdout] 1121 + categorised =true; [INFO] [stdout] 1122 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1140:43 [INFO] [stdout] | [INFO] [stdout] 1140 | doi: if doi_as_str == "".to_string() {None} else {Some(doi_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1141:45 [INFO] [stdout] | [INFO] [stdout] 1141 | pmid: if pmid_as_str == "".to_string() {None} else {Some(pmid_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1142:47 [INFO] [stdout] | [INFO] [stdout] 1142 | pmcid: if pmcid_as_str == "".to_string() {None} else {Some(pmcid_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/import/processor.rs:1143:59 [INFO] [stdout] | [INFO] [stdout] 1143 | pubsite_url: if pubsite_url_as_str == "".to_string() {None} else {Some(pubsite_url_as_str)}, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:1209:29 [INFO] [stdout] | [INFO] [stdout] 1209 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 1210 | | Ok(d) => Some(d), [INFO] [stdout] 1211 | | Err(_) => None, [INFO] [stdout] 1212 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/processor.rs:1217:29 [INFO] [stdout] | [INFO] [stdout] 1217 | Some(ds) => match NaiveDate::parse_from_str(&ds, "%Y-%m-%d") { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 1218 | | Ok(d) => Some(d), [INFO] [stdout] 1219 | | Err(_) => None, [INFO] [stdout] 1220 | | } [INFO] [stdout] | |_________________^ help: replace with: `NaiveDate::parse_from_str(&ds, "%Y-%m-%d").ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:1292:28 [INFO] [stdout] | [INFO] [stdout] 1292 | if file_type != ""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!file_type.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: comparison to empty slice [INFO] [stdout] --> src/import/processor.rs:1348:24 [INFO] [stdout] | [INFO] [stdout] 1348 | if ending != "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!ending.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: manual implementation of `Option::map` [INFO] [stdout] --> src/import/support_fns.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | / if let Some (dt) = NaiveDate::from_ymd_opt(y, m, d) [INFO] [stdout] 58 | | { [INFO] [stdout] 59 | | Some(dt) [INFO] [stdout] ... | [INFO] [stdout] 62 | | None [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________________^ help: try: `NaiveDate::from_ymd_opt(y, m, d).map(|dt| dt)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/import/support_fns.rs:125:32 [INFO] [stdout] | [INFO] [stdout] 125 | let num: Option = match age_parts[0].trim().parse() { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 126 | | Ok(num) => Some(num), [INFO] [stdout] 127 | | Err(_) => None [INFO] [stdout] 128 | | }; [INFO] [stdout] | |_________^ help: replace with: `age_parts[0].trim().parse().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/import/support_fns.rs:154:47 [INFO] [stdout] | [INFO] [stdout] 154 | let units_as_string: Option = match units { [INFO] [stdout] | _______________________________________________^ [INFO] [stdout] 155 | | Some(u) => Some(u.to_string()), [INFO] [stdout] 156 | | None => None, [INFO] [stdout] 157 | | }; [INFO] [stdout] | |_________^ help: try: `units.map(|u| u.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/import/support_fns.rs:170:28 [INFO] [stdout] | [INFO] [stdout] 170 | let giv_n = given_name.unwrap_or_else(||"".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_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: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/import/support_fns.rs:171:29 [INFO] [stdout] | [INFO] [stdout] 171 | let fam_n = family_name.unwrap_or_else(||"".to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/support_fns.rs:173:8 [INFO] [stdout] | [INFO] [stdout] 173 | if giv_n == "" && fam_n == "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `giv_n.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: comparison to empty slice [INFO] [stdout] --> src/import/support_fns.rs:173:23 [INFO] [stdout] | [INFO] [stdout] 173 | if giv_n == "" && fam_n == "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `fam_n.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/import/support_fns.rs:182:40 [INFO] [stdout] | [INFO] [stdout] 182 | pub fn get_cr_numbered_strings(input: &String) -> Option> { [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] 182 - pub fn get_cr_numbered_strings(input: &String) -> Option> { [INFO] [stdout] 182 + pub fn get_cr_numbered_strings(input: &str) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/import/support_fns.rs:191:8 [INFO] [stdout] | [INFO] [stdout] 191 | if res.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!res.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/import/support_fns.rs:205:37 [INFO] [stdout] | [INFO] [stdout] 205 | pub fn get_numbered_strings(input: &String) -> Option> { [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] 205 - pub fn get_numbered_strings(input: &String) -> Option> { [INFO] [stdout] 205 + pub fn get_numbered_strings(input: &str) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/import/support_fns.rs:211:38 [INFO] [stdout] | [INFO] [stdout] 211 | .filter(| t| *t != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.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: this boolean expression can be simplified [INFO] [stdout] --> src/import/support_fns.rs:283:20 [INFO] [stdout] | [INFO] [stdout] 283 | if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 283 - if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] 283 + if !(i == 1 && skip_res1 != false) { [INFO] [stdout] | [INFO] [stdout] 283 - if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] 283 + if i != 1 || skip_res1 == false { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/import/support_fns.rs:221:40 [INFO] [stdout] | [INFO] [stdout] 221 | pub fn get_comma_delim_strings(input: &String, min_width: usize) -> 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] 221 - pub fn get_comma_delim_strings(input: &String, min_width: usize) -> Vec { [INFO] [stdout] 221 + pub fn get_comma_delim_strings(input: &str, min_width: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/import/support_fns.rs:283:41 [INFO] [stdout] | [INFO] [stdout] 283 | if i != 1 || (i == 1 && skip_res1 == false) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `!skip_res1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IPD` contains a capitalized acronym [INFO] [stdout] --> src/data_models/json_models.rs:233:12 [INFO] [stdout] | [INFO] [stdout] 233 | pub struct IPD [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ipd` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:39:34 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn add(&mut self, sd_sid:&String, r: &DBSummary) [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] 39 ~ pub fn add(&mut self, sd_sid:&str, r: &DBSummary) [INFO] [stdout] 40 | { [INFO] [stdout] 41 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:114:34 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn add(&mut self, sd_sid:&String, r: &DBStudyDates) [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 ~ pub fn add(&mut self, sd_sid:&str, r: &DBStudyDates) [INFO] [stdout] 115 | { [INFO] [stdout] 116 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:198:34 [INFO] [stdout] | [INFO] [stdout] 198 | pub fn add(&mut self, sd_sid:&String, r: &DBStudyPartics) [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] 198 ~ pub fn add(&mut self, sd_sid:&str, r: &DBStudyPartics) [INFO] [stdout] 199 | { [INFO] [stdout] 200 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:276:36 [INFO] [stdout] | [INFO] [stdout] 276 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:287:34 [INFO] [stdout] | [INFO] [stdout] 287 | pub fn add(&mut self, sd_sid:&String, v: &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] 287 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 288 | { [INFO] [stdout] 289 | for r in v { [INFO] [stdout] 290 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:336:34 [INFO] [stdout] | [INFO] [stdout] 336 | pub fn add(&mut self, sd_sid:&String, v: &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] 336 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 337 | { [INFO] [stdout] 338 | for r in v { [INFO] [stdout] 339 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:346:36 [INFO] [stdout] | [INFO] [stdout] 346 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:395:34 [INFO] [stdout] | [INFO] [stdout] 395 | pub fn add(&mut self, sd_sid:&String, v: &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] 395 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 396 | { [INFO] [stdout] 397 | for r in v { [INFO] [stdout] 398 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:409:36 [INFO] [stdout] | [INFO] [stdout] 409 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:463:34 [INFO] [stdout] | [INFO] [stdout] 463 | pub fn add(&mut self, sd_sid:&String, v: &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] 463 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 464 | { [INFO] [stdout] 465 | for r in v { [INFO] [stdout] 466 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:475:36 [INFO] [stdout] | [INFO] [stdout] 475 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:524:34 [INFO] [stdout] | [INFO] [stdout] 524 | pub fn add(&mut self, sd_sid:&String, v: &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] 524 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 525 | { [INFO] [stdout] 526 | for r in v { [INFO] [stdout] 527 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:536:36 [INFO] [stdout] | [INFO] [stdout] 536 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:576:34 [INFO] [stdout] | [INFO] [stdout] 576 | pub fn add(&mut self, sd_sid:&String, v: &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] 576 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 577 | { [INFO] [stdout] 578 | for r in v { [INFO] [stdout] 579 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:584:36 [INFO] [stdout] | [INFO] [stdout] 584 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:620:34 [INFO] [stdout] | [INFO] [stdout] 620 | pub fn add(&mut self, sd_sid:&String, v: &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] 620 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 621 | { [INFO] [stdout] 622 | for r in v { [INFO] [stdout] 623 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:630:36 [INFO] [stdout] | [INFO] [stdout] 630 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:669:34 [INFO] [stdout] | [INFO] [stdout] 669 | pub fn add(&mut self, sd_sid:&String, v: &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] 669 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 670 | { [INFO] [stdout] 671 | for r in v { [INFO] [stdout] 672 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:679:36 [INFO] [stdout] | [INFO] [stdout] 679 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:718:34 [INFO] [stdout] | [INFO] [stdout] 718 | pub fn add(&mut self, sd_sid:&String, v: &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] 718 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 719 | { [INFO] [stdout] 720 | for r in v { [INFO] [stdout] 721 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:728:36 [INFO] [stdout] | [INFO] [stdout] 728 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:777:34 [INFO] [stdout] | [INFO] [stdout] 777 | pub fn add(&mut self, sd_sid:&String, v: &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] 777 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 778 | { [INFO] [stdout] 779 | for r in v { [INFO] [stdout] 780 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:792:36 [INFO] [stdout] | [INFO] [stdout] 792 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:860:34 [INFO] [stdout] | [INFO] [stdout] 860 | pub fn add(&mut self, sd_sid:&String, v: &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] 860 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 861 | { [INFO] [stdout] 862 | for r in v { [INFO] [stdout] 863 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:873:37 [INFO] [stdout] | [INFO] [stdout] 873 | self.date_createds.push(r.date_created.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_created` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:874:38 [INFO] [stdout] | [INFO] [stdout] 874 | self.date_uploadeds.push(r.date_uploaded.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_uploaded` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:878:36 [INFO] [stdout] | [INFO] [stdout] 878 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/data_models/data_vecs.rs:958:34 [INFO] [stdout] | [INFO] [stdout] 958 | pub fn add(&mut self, sd_sid:&String, v: &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] 958 ~ pub fn add(&mut self, sd_sid:&str, v: &Vec) [INFO] [stdout] 959 | { [INFO] [stdout] 960 | for r in v { [INFO] [stdout] 961 ~ self.sd_sids.push(sd_sid.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:971:37 [INFO] [stdout] | [INFO] [stdout] 971 | self.date_createds.push(r.date_created.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_created` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option` which implements the `Copy` trait [INFO] [stdout] --> src/data_models/data_vecs.rs:972:38 [INFO] [stdout] | [INFO] [stdout] 972 | self.date_uploadeds.push(r.date_uploaded.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.date_uploaded` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/data_models/data_vecs.rs:976:36 [INFO] [stdout] | [INFO] [stdout] 976 | pub fn shrink_to_fit(&mut self) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:76:20 [INFO] [stdout] | [INFO] [stdout] 76 | || low_ref == "" [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_ref.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:81:58 [INFO] [stdout] | [INFO] [stdout] 81 | let trimmed = quoteless.trim_matches(&[' ', '-']); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[' ', '-']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:82:24 [INFO] [stdout] | [INFO] [stdout] 82 | if trimmed == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `trimmed.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:105:20 [INFO] [stdout] | [INFO] [stdout] 105 | if st == "" || st.len() < 2 // 1 character ids not meaningful or useful [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:141:24 [INFO] [stdout] | [INFO] [stdout] 141 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:170:24 [INFO] [stdout] | [INFO] [stdout] 170 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:192:20 [INFO] [stdout] | [INFO] [stdout] 192 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: manual implementation of `ok` [INFO] [stdout] --> src/helpers/string_extensions.rs:198:21 [INFO] [stdout] | [INFO] [stdout] 198 | / match st.parse::() [INFO] [stdout] 199 | | { [INFO] [stdout] 200 | | Ok(n) => Some(n), [INFO] [stdout] 201 | | Err(_e) => None [INFO] [stdout] 202 | | } [INFO] [stdout] | |_____________________^ help: replace with: `st.parse::().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:213:20 [INFO] [stdout] | [INFO] [stdout] 213 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: manual implementation of `ok` [INFO] [stdout] --> src/helpers/string_extensions.rs:219:21 [INFO] [stdout] | [INFO] [stdout] 219 | / match st.parse::() [INFO] [stdout] 220 | | { [INFO] [stdout] 221 | | Ok(n) => Some(n), [INFO] [stdout] 222 | | Err(_e) => None [INFO] [stdout] 223 | | } [INFO] [stdout] | |_____________________^ help: replace with: `st.parse::().ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:234:20 [INFO] [stdout] | [INFO] [stdout] 234 | if st == "" [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `st.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: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:267:26 [INFO] [stdout] | [INFO] [stdout] 267 | if st == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:293:26 [INFO] [stdout] | [INFO] [stdout] 293 | if st == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | if low_ref == "" || low_ref == "null" || low_ref == "n/a" [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_ref.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:333:52 [INFO] [stdout] | [INFO] [stdout] 333 | let t = quoteless.trim_matches(&[' ', '-']); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[' ', '-']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:334:24 [INFO] [stdout] | [INFO] [stdout] 334 | if t == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `t.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: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:342:33 [INFO] [stdout] | [INFO] [stdout] 342 | tr = tr.replace('\u{2000}', " ").replace('\u{2001}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2000}', '\u{2001}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:343:33 [INFO] [stdout] | [INFO] [stdout] 343 | tr = tr.replace('\u{2002}', " ").replace('\u{2003}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2002}', '\u{2003}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:344:33 [INFO] [stdout] | [INFO] [stdout] 344 | tr = tr.replace('\u{2007}', " ").replace('\u{2008}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2007}', '\u{2008}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:345:33 [INFO] [stdout] | [INFO] [stdout] 345 | tr = tr.replace('\u{2009}', " ").replace('\u{200A}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2009}', '\u{200A}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:347:33 [INFO] [stdout] | [INFO] [stdout] 347 | tr = tr.replace('\u{00AE}', " ").replace('\u{2122}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{00AE}', '\u{2122}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:377:50 [INFO] [stdout] | [INFO] [stdout] 377 | ... tr = tr.trim_matches(&[';', ' ']).to_string() [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[';', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:412:20 [INFO] [stdout] | [INFO] [stdout] 412 | if low_ref == "" || low_ref == "null" || low_ref == "n/a" [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_ref.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:418:52 [INFO] [stdout] | [INFO] [stdout] 418 | let t = quoteless.trim_matches(&[' ', '-']); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[' ', '-']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/string_extensions.rs:419:24 [INFO] [stdout] | [INFO] [stdout] 419 | if t == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `t.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: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:429:33 [INFO] [stdout] | [INFO] [stdout] 429 | tr = tr.replace('\u{2000}', " ").replace('\u{2001}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2000}', '\u{2001}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:430:33 [INFO] [stdout] | [INFO] [stdout] 430 | tr = tr.replace('\u{2002}', " ").replace('\u{2003}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2002}', '\u{2003}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:431:33 [INFO] [stdout] | [INFO] [stdout] 431 | tr = tr.replace('\u{2007}', " ").replace('\u{2008}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2007}', '\u{2008}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:432:33 [INFO] [stdout] | [INFO] [stdout] 432 | tr = tr.replace('\u{2009}', " ").replace('\u{200A}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{2009}', '\u{200A}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/helpers/string_extensions.rs:434:33 [INFO] [stdout] | [INFO] [stdout] 434 | tr = tr.replace('\u{00AE}', " ").replace('\u{2122}', " "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['\u{00AE}', '\u{2122}'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/string_extensions.rs:464:50 [INFO] [stdout] | [INFO] [stdout] 464 | ... tr = tr.trim_matches(&[';', ' ']).to_string() [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[';', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:514:24 [INFO] [stdout] | [INFO] [stdout] 514 | if s == "".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/helpers/string_extensions.rs:573:45 [INFO] [stdout] | [INFO] [stdout] 573 | ... '>' => {if inside {inside = false; continue;}} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 573 - '>' => {if inside {inside = false; continue;}} [INFO] [stdout] 573 + '>'if inside => {inside = false; continue;} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/string_extensions.rs:672:25 [INFO] [stdout] | [INFO] [stdout] 672 | if s == "".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `""` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:772:17 [INFO] [stdout] | [INFO] [stdout] 772 | / { [INFO] [stdout] 773 | | result = false; [INFO] [stdout] 774 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:777:17 [INFO] [stdout] | [INFO] [stdout] 777 | / { [INFO] [stdout] 778 | | result = false; [INFO] [stdout] 779 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:749:94 [INFO] [stdout] | [INFO] [stdout] 749 | || low_s == "no" || low_s == "nil" || low_s == "nill" || low_s == "non" { [INFO] [stdout] | ______________________________________________________________________________________________^ [INFO] [stdout] 750 | | result = false; [INFO] [stdout] 751 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:754:21 [INFO] [stdout] | [INFO] [stdout] 754 | / { [INFO] [stdout] 755 | | result = false; [INFO] [stdout] 756 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:754:21 [INFO] [stdout] | [INFO] [stdout] 754 | / { [INFO] [stdout] 755 | | result = false; [INFO] [stdout] 756 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:759:21 [INFO] [stdout] | [INFO] [stdout] 759 | / { [INFO] [stdout] 760 | | result = false; [INFO] [stdout] 761 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/string_extensions.rs:759:21 [INFO] [stdout] | [INFO] [stdout] 759 | / { [INFO] [stdout] 760 | | result = false; [INFO] [stdout] 761 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/string_extensions.rs:765:21 [INFO] [stdout] | [INFO] [stdout] 765 | / { [INFO] [stdout] 766 | | result = false; [INFO] [stdout] 767 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/helpers/string_extensions.rs:802:60 [INFO] [stdout] | [INFO] [stdout] 802 | if s.chars().nth(1).unwrap_or_default() == '.' || s.chars().nth(1).unwrap_or_default().is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.chars().nth(1).unwrap_or_default().is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/helpers/name_extensions.rs:16:37 [INFO] [stdout] | [INFO] [stdout] 16 | fn tidy_org_name(&self, sd_sid: &String) -> Option; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/helpers/name_extensions.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | / match sf.find('@') [INFO] [stdout] 66 | | { [INFO] [stdout] 67 | | Some(p) => { [INFO] [stdout] 68 | | Some((&sf[(p + 1)..]).to_string()) [INFO] [stdout] 69 | | }, [INFO] [stdout] 70 | | None => None, [INFO] [stdout] 71 | | } [INFO] [stdout] | |_________________^ help: try: `sf.find('@').map(|p| (&sf[(p + 1)..]).to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/helpers/name_extensions.rs:68:30 [INFO] [stdout] | [INFO] [stdout] 68 | Some((&sf[(p + 1)..]).to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sf[(p + 1)..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | / { [INFO] [stdout] 88 | | false [INFO] [stdout] 89 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:93:17 [INFO] [stdout] | [INFO] [stdout] 93 | / { [INFO] [stdout] 94 | | false [INFO] [stdout] 95 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:93:17 [INFO] [stdout] | [INFO] [stdout] 93 | / { [INFO] [stdout] 94 | | false [INFO] [stdout] 95 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:99:17 [INFO] [stdout] | [INFO] [stdout] 99 | / { [INFO] [stdout] 100 | | false [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:99:17 [INFO] [stdout] | [INFO] [stdout] 99 | / { [INFO] [stdout] 100 | | false [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | / { [INFO] [stdout] 107 | | false [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | / { [INFO] [stdout] 107 | | false [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | / { [INFO] [stdout] 111 | | false [INFO] [stdout] 112 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/helpers/name_extensions.rs:109:22 [INFO] [stdout] | [INFO] [stdout] 109 | else if low_s.starts_with("dr") && &sf[..2] == "DR" [INFO] [stdout] | ______________________^ [INFO] [stdout] 110 | | { [INFO] [stdout] 111 | | false [INFO] [stdout] ... | [INFO] [stdout] 114 | | true [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________________^ help: you can reduce it to: `{ !(low_s.starts_with("dr") && &sf[..2] == "DR") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/helpers/name_extensions.rs:130:17 [INFO] [stdout] | [INFO] [stdout] 130 | / if low_s == "" || low_s.contains("research") || low_s.contains("development") || [INFO] [stdout] 131 | | low_s.contains("trials") || low_s.contains("pharma") || [INFO] [stdout] 132 | | low_s.contains("ltd") || low_s.contains("inc.") { [INFO] [stdout] 133 | | false [INFO] [stdout] ... | [INFO] [stdout] 136 | | true [INFO] [stdout] 137 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 130 ~ !(low_s == "" || low_s.contains("research") || low_s.contains("development") || [INFO] [stdout] 131 + low_s.contains("trials") || low_s.contains("pharma") || [INFO] [stdout] 132 + low_s.contains("ltd") || low_s.contains("inc.")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/name_extensions.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | if low_s == "" || low_s.contains("research") || low_s.contains("development") || [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_s.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: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:153:17 [INFO] [stdout] | [INFO] [stdout] 153 | / { [INFO] [stdout] 154 | | false [INFO] [stdout] 155 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:158:17 [INFO] [stdout] | [INFO] [stdout] 158 | / { [INFO] [stdout] 159 | | false [INFO] [stdout] 160 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:158:17 [INFO] [stdout] | [INFO] [stdout] 158 | / { [INFO] [stdout] 159 | | false [INFO] [stdout] 160 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | / { [INFO] [stdout] 165 | | false [INFO] [stdout] 166 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/name_extensions.rs:152:20 [INFO] [stdout] | [INFO] [stdout] 152 | if low_s == "" || low_s == "n.a." || low_s == "na" || low_s == "n.a" || low_s == "n/a" [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_s.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: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/helpers/name_extensions.rs:161:22 [INFO] [stdout] | [INFO] [stdout] 161 | else if low_s.starts_with("not applic") || low_s.starts_with("not aplic") || low_s.starts_with("non applic") [INFO] [stdout] | ______________________^ [INFO] [stdout] 162 | | || low_s.starts_with("non aplic") || low_s.starts_with("no applic") || low_s.starts_with("no aplic") [INFO] [stdout] 163 | | || low_s.starts_with("see ") || low_s.starts_with("not avail") || low_s.starts_with("non dispo") [INFO] [stdout] ... | [INFO] [stdout] 168 | | true [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] help: you can reduce it to [INFO] [stdout] | [INFO] [stdout] 161 ~ else { !(low_s.starts_with("not applic") || low_s.starts_with("not aplic") || low_s.starts_with("non applic") [INFO] [stdout] 162 + || low_s.starts_with("non aplic") || low_s.starts_with("no applic") || low_s.starts_with("no aplic") [INFO] [stdout] 163 + || low_s.starts_with("see ") || low_s.starts_with("not avail") || low_s.starts_with("non dispo")) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/name_extensions.rs:201:36 [INFO] [stdout] | [INFO] [stdout] 201 | s = s.trim_matches(&[',', '-', '*', ';', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[',', '-', '*', ';', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/helpers/name_extensions.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | / if low_s.contains("newcastle") { [INFO] [stdout] 225 | | if low_s.contains("university") && !low_s.contains("hospital") { [INFO] [stdout] 226 | | if low_s.contains("nsw") || low_s.contains("australia") { [INFO] [stdout] 227 | | s = "University of Newcastle (Australia)".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 242 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 224 ~ if low_s.contains("newcastle") [INFO] [stdout] 225 ~ && low_s.contains("university") && !low_s.contains("hospital") { [INFO] [stdout] 226 | if low_s.contains("nsw") || low_s.contains("australia") { [INFO] [stdout] ... [INFO] [stdout] 240 | } [INFO] [stdout] 241 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/helpers/name_extensions.rs:249:21 [INFO] [stdout] | [INFO] [stdout] 249 | / { [INFO] [stdout] 250 | | s = "China Medical University".to_string(); [INFO] [stdout] 251 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/helpers/name_extensions.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | / { [INFO] [stdout] 254 | | s = "China Medical University".to_string(); [INFO] [stdout] 255 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/helpers/name_extensions.rs:337:24 [INFO] [stdout] | [INFO] [stdout] 337 | && s[2..3].to_string() == low_s[2..3].to_string().to_uppercase() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `s[2..3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/helpers/name_extensions.rs:346:20 [INFO] [stdout] | [INFO] [stdout] 346 | if low_st == "" || low_st == "dr" || low_st == "mr" || low_st == "ms" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `low_st.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/helpers/name_extensions.rs:381:43 [INFO] [stdout] | [INFO] [stdout] 381 | Some(sts.trim_matches(&[' ', '-', ',']).to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `[' ', '-', ',']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:627:9 [INFO] [stdout] | [INFO] [stdout] 627 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 627 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 627 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:630:9 [INFO] [stdout] | [INFO] [stdout] 630 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 630 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 630 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:633:9 [INFO] [stdout] | [INFO] [stdout] 633 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 633 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 633 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:636:9 [INFO] [stdout] | [INFO] [stdout] 636 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 636 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 636 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:639:9 [INFO] [stdout] | [INFO] [stdout] 639 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 639 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 639 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:642:9 [INFO] [stdout] | [INFO] [stdout] 642 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 642 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 642 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:645:9 [INFO] [stdout] | [INFO] [stdout] 645 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 645 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 645 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:648:9 [INFO] [stdout] | [INFO] [stdout] 648 | assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 648 - assert_eq!(t_opt.appears_plausible_org_name(), false); [INFO] [stdout] 648 + assert!(!t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:651:9 [INFO] [stdout] | [INFO] [stdout] 651 | assert_eq!(t_opt.appears_plausible_org_name(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 651 - assert_eq!(t_opt.appears_plausible_org_name(), true); [INFO] [stdout] 651 + assert!(t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:654:9 [INFO] [stdout] | [INFO] [stdout] 654 | assert_eq!(t_opt.appears_plausible_org_name(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 654 - assert_eq!(t_opt.appears_plausible_org_name(), true); [INFO] [stdout] 654 + assert!(t_opt.appears_plausible_org_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:662:9 [INFO] [stdout] | [INFO] [stdout] 662 | assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 662 - assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] 662 + assert!(!t_opt.appears_plausible_person_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:665:9 [INFO] [stdout] | [INFO] [stdout] 665 | assert_eq!(t_opt.appears_plausible_person_name(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 665 - assert_eq!(t_opt.appears_plausible_person_name(), true); [INFO] [stdout] 665 + assert!(t_opt.appears_plausible_person_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:668:9 [INFO] [stdout] | [INFO] [stdout] 668 | assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 668 - assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] 668 + assert!(!t_opt.appears_plausible_person_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:671:9 [INFO] [stdout] | [INFO] [stdout] 671 | assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 671 - assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] 671 + assert!(!t_opt.appears_plausible_person_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:674:9 [INFO] [stdout] | [INFO] [stdout] 674 | assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 674 - assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] 674 + assert!(!t_opt.appears_plausible_person_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:677:9 [INFO] [stdout] | [INFO] [stdout] 677 | assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 677 - assert_eq!(t_opt.appears_plausible_person_name(), false); [INFO] [stdout] 677 + assert!(!t_opt.appears_plausible_person_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:684:9 [INFO] [stdout] | [INFO] [stdout] 684 | assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 684 - assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] 684 + assert!(!t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:687:9 [INFO] [stdout] | [INFO] [stdout] 687 | assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 687 - assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] 687 + assert!(!t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:690:9 [INFO] [stdout] | [INFO] [stdout] 690 | assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 690 - assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] 690 + assert!(!t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:693:9 [INFO] [stdout] | [INFO] [stdout] 693 | assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 693 - assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] 693 + assert!(!t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:696:9 [INFO] [stdout] | [INFO] [stdout] 696 | assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 696 - assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] 696 + assert!(!t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:699:9 [INFO] [stdout] | [INFO] [stdout] 699 | assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 699 - assert_eq!(t_opt.appears_plausible_title(), false); [INFO] [stdout] 699 + assert!(!t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/helpers/name_extensions.rs:702:9 [INFO] [stdout] | [INFO] [stdout] 702 | assert_eq!(t_opt.appears_plausible_title(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 702 - assert_eq!(t_opt.appears_plausible_title(), true); [INFO] [stdout] 702 + assert!(t_opt.appears_plausible_title()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/iec/iec_fns.rs:43:30 [INFO] [stdout] | [INFO] [stdout] 43 | .filter(| t| *t != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.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: length comparison to zero [INFO] [stdout] --> src/iec/iec_fns.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | if repaired_lines.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `repaired_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/iec/iec_fns.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let return_code; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [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 `return_code` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 ~ let return_code = if final_cr_lines.len() == 1 { [INFO] [stdout] 110 ~ if input_type == "inclusion" {4} else {16} [INFO] [stdout] 111 | } [INFO] [stdout] 112 | else { [INFO] [stdout] 113 ~ if input_type == "inclusion" {8} else {32} [INFO] [stdout] 114 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/iec/iec_fns.rs:138:34 [INFO] [stdout] | [INFO] [stdout] 138 | for (i, ln) in initial_lines.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_fns.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | / if previous_tag_type != "none".to_string() [INFO] [stdout] 151 | | && !previous_tag_type.starts_with("numdot"){ [INFO] [stdout] 152 | | [INFO] [stdout] 153 | | if let Some(rr) = test_re(&previous_tag_type,&ln) { [INFO] [stdout] ... | [INFO] [stdout] 162 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 151 ~ && !previous_tag_type.starts_with("numdot") [INFO] [stdout] 152 | [INFO] [stdout] 153 ~ && let Some(rr) = test_re(&previous_tag_type,&ln) { [INFO] [stdout] 154 | iec = Some(CLine { [INFO] [stdout] ... [INFO] [stdout] 160 | }); [INFO] [stdout] 161 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_fns.rs:150:33 [INFO] [stdout] | [INFO] [stdout] 150 | if previous_tag_type != "none".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `"none"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:153:58 [INFO] [stdout] | [INFO] [stdout] 153 | if let Some(rr) = test_re(&previous_tag_type,&ln) { [INFO] [stdout] | ^^^ help: change this to: `ln` [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 `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:171:16 [INFO] [stdout] | [INFO] [stdout] 171 | if first_char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `first_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:179:44 [INFO] [stdout] | [INFO] [stdout] 179 | if *second_char == '.' || (second_char.is_digit(10) && *third_char == '.') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `second_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/iec/iec_fns.rs:233:52 [INFO] [stdout] | [INFO] [stdout] 233 | ... .filter(|t| t.text != "") [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.text.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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_fns.rs:239:30 [INFO] [stdout] | [INFO] [stdout] 239 | fn repair_split_lines(plines:&mut Vec, tv: &TypePars) -> 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] 239 - fn repair_split_lines(plines:&mut Vec, tv: &TypePars) -> Vec{ [INFO] [stdout] 239 + fn repair_split_lines(plines:&mut [CLine], tv: &TypePars) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:292:77 [INFO] [stdout] | [INFO] [stdout] 292 | ... && (init_char.is_lowercase() || init_char.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `init_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_fns.rs:308:65 [INFO] [stdout] | [INFO] [stdout] 308 | ... && (init_char.is_lowercase() || init_char.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `init_char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/iec/iec_fns.rs:318:80 [INFO] [stdout] | [INFO] [stdout] 318 | ... plines[i - 1].text = format!("{}. {}", prev_text[..(prev_text.len() - 1)].to_string(), this_text) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&prev_text[..(prev_text.len() - 1)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:396:64 [INFO] [stdout] | [INFO] [stdout] 396 | if let Some(c) = check_if_lines_all_start_with_same_bullet(&processed_lines) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:439:44 [INFO] [stdout] | [INFO] [stdout] 439 | if check_if_all_lines_end_consistently(&processed_lines, 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:440:57 [INFO] [stdout] | [INFO] [stdout] 440 | || check_if_all_lines_start_with_caps(&processed_lines, 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:441:63 [INFO] [stdout] | [INFO] [stdout] 441 | || check_if_all_lines_start_with_lower_case(&processed_lines, 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `processed_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `processed_lines` [INFO] [stdout] --> src/iec/iec_fns.rs:445:18 [INFO] [stdout] | [INFO] [stdout] 445 | for i in 0..processed_lines.len() { [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] 445 - for i in 0..processed_lines.len() { [INFO] [stdout] 445 + for in &mut processed_lines { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:529:52 [INFO] [stdout] | [INFO] [stdout] 529 | if check_if_all_lines_end_consistently(&joined_lines, 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `joined_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/iec/iec_fns.rs:530:55 [INFO] [stdout] | [INFO] [stdout] 530 | || check_if_all_lines_start_with_caps(&joined_lines, 0) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `joined_lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `joined_lines` [INFO] [stdout] --> src/iec/iec_fns.rs:609:18 [INFO] [stdout] | [INFO] [stdout] 609 | for i in 0..=max_i { [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] 609 - for i in 0..=max_i { [INFO] [stdout] 609 + for in joined_lines.iter().take(max_i + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_fns.rs:646:42 [INFO] [stdout] | [INFO] [stdout] 646 | type_id = if tag2 == "Spp".to_string() {tv.post_crit} else {tv.grp_hdr} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"Spp"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_helper.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn coalesce_very_short_lines(input_lines: &Vec<&str>) -> 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] 36 - pub fn coalesce_very_short_lines(input_lines: &Vec<&str>) -> Vec [INFO] [stdout] 36 + pub fn coalesce_very_short_lines(input_lines: &[&str]) -> Vec [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_helper.rs:169:31 [INFO] [stdout] | [INFO] [stdout] 169 | pub fn is_redundant_header(s: &String) -> bool { [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] 169 - pub fn is_redundant_header(s: &String) -> bool { [INFO] [stdout] 169 + pub fn is_redundant_header(s: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_helper.rs:188:36 [INFO] [stdout] | [INFO] [stdout] 188 | s_low = s_low.trim_matches(&[':', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `[':', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/iec/iec_helper.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | / if s_low.is_empty() { [INFO] [stdout] 190 | | true [INFO] [stdout] 191 | | } [INFO] [stdout] 192 | | else { [INFO] [stdout] 193 | | false [INFO] [stdout] 194 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `s_low.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/iec/iec_helper.rs:206:47 [INFO] [stdout] | [INFO] [stdout] 206 | let num_lines_without_tags = in_lines.into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/iec/iec_helper.rs:210:9 [INFO] [stdout] | [INFO] [stdout] 210 | / if (num_lines > 4 && num_lines_without_tags >= num_lines - 1) || [INFO] [stdout] 211 | | (num_lines > 2 && num_lines_without_tags == num_lines) { [INFO] [stdout] 212 | | true [INFO] [stdout] ... | [INFO] [stdout] 215 | | false [INFO] [stdout] 216 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `(num_lines > 4 && num_lines_without_tags >= num_lines - 1) || (num_lines > 2 && num_lines_without_tags == num_lines)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_helper.rs:221:60 [INFO] [stdout] | [INFO] [stdout] 221 | pub fn check_if_lines_all_start_with_same_bullet(in_lines: &Vec) -> Option { [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] 221 - pub fn check_if_lines_all_start_with_same_bullet(in_lines: &Vec) -> Option { [INFO] [stdout] 221 + pub fn check_if_lines_all_start_with_same_bullet(in_lines: &[CLine]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is only used to index `in_lines` [INFO] [stdout] --> src/iec/iec_helper.rs:234:18 [INFO] [stdout] | [INFO] [stdout] 234 | for k in 2..in_lines.len() [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] 234 - for k in 2..in_lines.len() [INFO] [stdout] 234 + for in in_lines.iter().skip(2) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:315:46 [INFO] [stdout] | [INFO] [stdout] 315 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff"... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 315 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] 315 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:321:46 [INFO] [stdout] | [INFO] [stdout] 321 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "l2 line 3 stuff".to_string(), "line 4 stu... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 321 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "l2 line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] 321 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff".to_string(), "l2 line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:324:46 [INFO] [stdout] | [INFO] [stdout] 324 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["l1 line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stu... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 324 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["l1 line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] 324 + assert_eq!(coalesce_very_short_lines(&lines), vec!["l1 line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:327:46 [INFO] [stdout] | [INFO] [stdout] 327 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff ... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 327 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff l4".to_string()]); [INFO] [stdout] 327 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff l4".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:333:46 [INFO] [stdout] | [INFO] [stdout] 333 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff lab".to_string(), "line 3 stuff".to_string(), "line 4 st... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 333 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff lab".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] 333 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff lab".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:336:46 [INFO] [stdout] | [INFO] [stdout] 336 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["lab line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 st... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 336 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["lab line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] 336 + assert_eq!(coalesce_very_short_lines(&lines), vec!["lab line 2 stuff".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:339:46 [INFO] [stdout] | [INFO] [stdout] 339 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff ... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 339 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff lab".to_string()]); [INFO] [stdout] 339 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff lab".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:349:46 [INFO] [stdout] | [INFO] [stdout] 349 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t1".to_string(), "line 1 stuff lab lob".to_string(), "li... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 349 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t1".to_string(), "line 1 stuff lab lob".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 349 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t1".to_string(), "line 1 stuff lab lob".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:354:46 [INFO] [stdout] | [INFO] [stdout] 354 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["lab lob line 2 stuff t2".to_string(), "line 3 stuff".to_string(), "li... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 354 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["lab lob line 2 stuff t2".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 354 + assert_eq!(coalesce_very_short_lines(&lines), vec!["lab lob line 2 stuff t2".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:359:46 [INFO] [stdout] | [INFO] [stdout] 359 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t3".to_string(), "line 1 stuff".to_string(), "line 2 stu... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 359 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t3".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff lab lob".to_string()]); [INFO] [stdout] 359 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t3".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff lab lob".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:366:46 [INFO] [stdout] | [INFO] [stdout] 366 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t4".to_string(), "line 1 stuff".to_string(), "l2 l3 line... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 366 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t4".to_string(), "line 1 stuff".to_string(), "l2 l3 line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 366 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t4".to_string(), "line 1 stuff".to_string(), "l2 l3 line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:371:46 [INFO] [stdout] | [INFO] [stdout] 371 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["l1 l2 line 2 stuff t5".to_string(), "line 3 stuff".to_string(), "line... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 371 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["l1 l2 line 2 stuff t5".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 371 + assert_eq!(coalesce_very_short_lines(&lines), vec!["l1 l2 line 2 stuff t5".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:376:46 [INFO] [stdout] | [INFO] [stdout] 376 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t6".to_string(), "line 1 stuff".to_string(), "line 2 stu... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 376 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t6".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff".to_string(), "l4 l5".to_string()]); [INFO] [stdout] 376 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t6".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff".to_string(), "l4 l5".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:383:46 [INFO] [stdout] | [INFO] [stdout] 383 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t7".to_string(), "line 1 stuff lab".to_string(), "l3 lin... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 383 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t7".to_string(), "line 1 stuff lab".to_string(), "l3 line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 383 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t7".to_string(), "line 1 stuff lab".to_string(), "l3 line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:388:46 [INFO] [stdout] | [INFO] [stdout] 388 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["lab l2 line 2 stuff t8".to_string(), "line 3 stuff".to_string(), "lin... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 388 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["lab l2 line 2 stuff t8".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 388 + assert_eq!(coalesce_very_short_lines(&lines), vec!["lab l2 line 2 stuff t8".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:393:46 [INFO] [stdout] | [INFO] [stdout] 393 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t9".to_string(), "line 1 stuff".to_string(), "line 2 stu... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 393 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t9".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff lab l5".to_string()]); [INFO] [stdout] 393 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t9".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff lab l5".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:401:46 [INFO] [stdout] | [INFO] [stdout] 401 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t10".to_string(), "line 1 stuff".to_string(), "l2 lab li... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 401 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t10".to_string(), "line 1 stuff".to_string(), "l2 lab line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 401 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t10".to_string(), "line 1 stuff".to_string(), "l2 lab line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:406:46 [INFO] [stdout] | [INFO] [stdout] 406 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["l1 lab line 2 stuff t11".to_string(), "line 3 stuff".to_string(), "li... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 406 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["l1 lab line 2 stuff t11".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] 406 + assert_eq!(coalesce_very_short_lines(&lines), vec!["l1 lab line 2 stuff t11".to_string(), "line 3 stuff".to_string(), "line 4 stuff".to_string(), "line 5 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:411:46 [INFO] [stdout] | [INFO] [stdout] 411 | ... assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t12".to_string(), "line 1 stuff".to_string(), "line 2 st... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 411 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 0 stuff t12".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff".to_string(), "l5 lab".to_string()]); [INFO] [stdout] 411 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 0 stuff t12".to_string(), "line 1 stuff".to_string(), "line 2 stuff".to_string(), "line 3 stuff".to_string(), "l5 lab".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:419:46 [INFO] [stdout] | [INFO] [stdout] 419 | assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff lab".to_string(), "l3 line 4 stuff".to_string()]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 419 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff lab".to_string(), "l3 line 4 stuff".to_string()]); [INFO] [stdout] 419 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff lab".to_string(), "l3 line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:422:46 [INFO] [stdout] | [INFO] [stdout] 422 | assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "l3 lab line 4 stuff".to_string()]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 422 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "l3 lab line 4 stuff".to_string()]); [INFO] [stdout] 422 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff".to_string(), "l3 lab line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:425:46 [INFO] [stdout] | [INFO] [stdout] 425 | assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff lab lob".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 425 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff lab lob".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] 425 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff lab lob".to_string(), "line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `coalesce_very_short_lines` doesn't need a mutable reference [INFO] [stdout] --> src/iec/iec_helper.rs:428:46 [INFO] [stdout] | [INFO] [stdout] 428 | assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "l2 l3 line 4 stuff".to_string()]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 428 - assert_eq!(coalesce_very_short_lines(&mut lines), vec!["line 1 stuff".to_string(), "l2 l3 line 4 stuff".to_string()]); [INFO] [stdout] 428 + assert_eq!(coalesce_very_short_lines(&lines), vec!["line 1 stuff".to_string(), "l2 l3 line 4 stuff".to_string()]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_res.rs:79:43 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn test_re(tag_type: &str, this_line: &String) -> Option { [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] 79 - pub fn test_re(tag_type: &str, this_line: &String) -> Option { [INFO] [stdout] 79 + pub fn test_re(tag_type: &str, this_line: &str) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:93:17 [INFO] [stdout] | [INFO] [stdout] 88 | / let init_rr = Some (RegexResults { [INFO] [stdout] 89 | | tag: tag.to_string(), [INFO] [stdout] 90 | | tag_type: tag_type.to_string(), [INFO] [stdout] 91 | | text: this_line[tag.len()..].trim().to_string(), [INFO] [stdout] 92 | | }); [INFO] [stdout] | |___________________- unnecessary `let` binding [INFO] [stdout] 93 | init_rr [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 88 ~ [INFO] [stdout] 89 ~ Some (RegexResults { [INFO] [stdout] 90 + tag: tag.to_string(), [INFO] [stdout] 91 + tag_type: tag_type.to_string(), [INFO] [stdout] 92 + text: this_line[tag.len()..].trim().to_string(), [INFO] [stdout] 93 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:256:5 [INFO] [stdout] | [INFO] [stdout] 151 | / let processed_result = match raw_result { [INFO] [stdout] 152 | | [INFO] [stdout] 153 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 253 | | None => None, [INFO] [stdout] 254 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 255 | [INFO] [stdout] 256 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 151 ~ [INFO] [stdout] 152 | [INFO] [stdout] 153 ~ match raw_result { [INFO] [stdout] 154 + [INFO] [stdout] 155 + Some (r) => { [INFO] [stdout] 156 + [INFO] [stdout] 157 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 158 + [INFO] [stdout] 159 + let (level, new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 160 + [INFO] [stdout] 161 + let mut genuine = true; // as the starting point [INFO] [stdout] 162 + let mut proc_tag_type = r.tag_type.clone(); [INFO] [stdout] 163 + let mut proc_tag = r.tag.clone(); [INFO] [stdout] 164 + let mut proc_text = r.text.clone(); [INFO] [stdout] 165 + [INFO] [stdout] 166 + if &r.tag_type == "numdotnumalcap" { [INFO] [stdout] 167 + [INFO] [stdout] 168 + // number-dot-number cap letter - Cap is usually from text (no space) [INFO] [stdout] 169 + // Change the tag name, tag and text details accordingly [INFO] [stdout] 170 + [INFO] [stdout] 171 + proc_tag_type = "numdot2".to_string(); [INFO] [stdout] 172 + [INFO] [stdout] 173 + let proc_tag2 = proc_tag.clone(); [INFO] [stdout] 174 + let tag_letter = proc_tag2.last_char(); [INFO] [stdout] 175 + proc_tag.pop(); [INFO] [stdout] 176 + proc_text = format!("{}{}", tag_letter, proc_text); [INFO] [stdout] 177 + [INFO] [stdout] 178 + } [INFO] [stdout] 179 + [INFO] [stdout] 180 + // The n.n tag type may be a genuine number in front of a quantity [INFO] [stdout] 181 + [INFO] [stdout] 182 + if &r.tag_type == "numdot2" { [INFO] [stdout] 183 + [INFO] [stdout] 184 + if prev_tag_type == "numdot2" [INFO] [stdout] 185 + || (prev_tag_type == "numdot" && proc_tag.ends_with(".1")) [INFO] [stdout] 186 + || (prev_tag_type == "none" && proc_tag.ends_with(".1")) [INFO] [stdout] 187 + { [INFO] [stdout] 188 + genuine = true; // continuation of numdot2 or the first in a numdot2 sequence [INFO] [stdout] 189 + } [INFO] [stdout] 190 + else { [INFO] [stdout] 191 + genuine = false; [INFO] [stdout] 192 + } [INFO] [stdout] 193 + [INFO] [stdout] 194 + // if genuine appears false what is this line? [INFO] [stdout] 195 + // Could be a number, X.Y, followed by a quantity (in which case a header type line) [INFO] [stdout] 196 + // Or could be a n. tag, follwe by a number Y... as the first character in the string [INFO] [stdout] 197 + [INFO] [stdout] 198 + if !genuine [INFO] [stdout] 199 + { [INFO] [stdout] 200 + let low_text = r.text.trim().to_lowercase(); [INFO] [stdout] 201 + if low_text.starts_with("secs") [INFO] [stdout] 202 + || low_text.starts_with("second") [INFO] [stdout] 203 + || low_text.starts_with("mins") [INFO] [stdout] 204 + || low_text.starts_with("minute") [INFO] [stdout] 205 + || low_text.starts_with("hour") [INFO] [stdout] 206 + || low_text.starts_with("day") [INFO] [stdout] 207 + || low_text.starts_with("week") [INFO] [stdout] 208 + || low_text.starts_with("month") [INFO] [stdout] 209 + || low_text.starts_with("year") [INFO] [stdout] 210 + || low_text.starts_with("mg") [INFO] [stdout] 211 + || low_text.starts_with("ml") [INFO] [stdout] 212 + || low_text.starts_with("kg") [INFO] [stdout] 213 + || low_text.starts_with("g/") [INFO] [stdout] 214 + || low_text.starts_with("cm") [INFO] [stdout] 215 + || low_text.starts_with("patient") [INFO] [stdout] 216 + || low_text.starts_with("subject") [INFO] [stdout] 217 + { [INFO] [stdout] 218 + // appears to be a header or (more likely) a split line part [INFO] [stdout] 219 + } [INFO] [stdout] 220 + else [INFO] [stdout] 221 + { [INFO] [stdout] 222 + // change the tag namne, tag and text to refflect a numdot type [INFO] [stdout] 223 + [INFO] [stdout] 224 + proc_tag_type = "numdot".to_string(); [INFO] [stdout] 225 + let proc_tag2 = proc_tag.clone(); [INFO] [stdout] 226 + let tag_parts: Vec<&str> = proc_tag2.split('.').collect(); [INFO] [stdout] 227 + [INFO] [stdout] 228 + proc_tag = tag_parts[0].to_string(); [INFO] [stdout] 229 + proc_text = format!("{} {}", tag_parts[1], proc_text); [INFO] [stdout] 230 + } [INFO] [stdout] 231 + [INFO] [stdout] 232 + } [INFO] [stdout] 233 + [INFO] [stdout] 234 + } [INFO] [stdout] 235 + [INFO] [stdout] 236 + [INFO] [stdout] 237 + if !genuine { [INFO] [stdout] 238 + [INFO] [stdout] 239 + // remove the level if one has just been added to the levels vector [INFO] [stdout] 240 + if new_level { [INFO] [stdout] 241 + levels.pop(); [INFO] [stdout] 242 + } [INFO] [stdout] 243 + None [INFO] [stdout] 244 + } [INFO] [stdout] 245 + else { [INFO] [stdout] 246 + Some(CLine { [INFO] [stdout] 247 + seq_num: (index + 1) as i32, [INFO] [stdout] 248 + tag: proc_tag, [INFO] [stdout] 249 + tag_type: proc_tag_type, [INFO] [stdout] 250 + indent_level: level, [INFO] [stdout] 251 + text: proc_text, [INFO] [stdout] 252 + }) [INFO] [stdout] 253 + } [INFO] [stdout] 254 + }, [INFO] [stdout] 255 + None => None, [INFO] [stdout] 256 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:123:50 [INFO] [stdout] | [INFO] [stdout] 123 | s4.text = s4.text.trim_start_matches(&['.', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:130:50 [INFO] [stdout] | [INFO] [stdout] 130 | s3.text = s3.text.trim_start_matches(&['.', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:136:50 [INFO] [stdout] | [INFO] [stdout] 136 | s2.text = s2.text.trim_start_matches(&['.', ' ']).to_string(); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:145:10 [INFO] [stdout] | [INFO] [stdout] 145 | else if let Some(s8) = test_re("numdot", this_line,) { Some(s8) } // number period only - can give false positives [INFO] [stdout] | __________^ [INFO] [stdout] 146 | | else { [INFO] [stdout] 147 | | None [INFO] [stdout] 148 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("numdot", this_line,).map(|s8| s8) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:443:5 [INFO] [stdout] | [INFO] [stdout] 311 | / let processed_result = match raw_result { [INFO] [stdout] 312 | | [INFO] [stdout] 313 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 440 | | None => None, [INFO] [stdout] 441 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 442 | [INFO] [stdout] 443 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 311 ~ [INFO] [stdout] 312 | [INFO] [stdout] 313 ~ match raw_result { [INFO] [stdout] 314 + [INFO] [stdout] 315 + Some (r) => { [INFO] [stdout] 316 + [INFO] [stdout] 317 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 318 + [INFO] [stdout] 319 + let (level, new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 320 + [INFO] [stdout] 321 + let mut genuine = true; // as the starting point [INFO] [stdout] 322 + let proc_tag_type = r.tag_type.clone(); [INFO] [stdout] 323 + let proc_tag = r.tag.clone().trim().to_string(); [INFO] [stdout] 324 + let this_tag_num: i32 = proc_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 325 + [INFO] [stdout] 326 + if &r.tag_type == "numspc" { [INFO] [stdout] 327 + [INFO] [stdout] 328 + // May need to be ignored if a number appears out of sequence [INFO] [stdout] 329 + // Also the case if number is followed by a time period or unit [INFO] [stdout] 330 + // - in which case almost always part of the line above [INFO] [stdout] 331 + [INFO] [stdout] 332 + if (index == 0 || (index == 1 && prev_level == 1)) && this_tag_num != 1 [INFO] [stdout] 333 + { [INFO] [stdout] 334 + genuine = false; // probably, but the converse may not be true [INFO] [stdout] 335 + } [INFO] [stdout] 336 + [INFO] [stdout] 337 + let low_text = r.text.trim().to_lowercase(); [INFO] [stdout] 338 + if low_text.starts_with("secs") [INFO] [stdout] 339 + || low_text.starts_with("second") [INFO] [stdout] 340 + || low_text.starts_with("mins") [INFO] [stdout] 341 + || low_text.starts_with("minute") [INFO] [stdout] 342 + || low_text.starts_with("hour") [INFO] [stdout] 343 + || low_text.starts_with("day") [INFO] [stdout] 344 + || low_text.starts_with("week") [INFO] [stdout] 345 + || low_text.starts_with("month") [INFO] [stdout] 346 + || low_text.starts_with("year") [INFO] [stdout] 347 + || low_text.starts_with("mg") [INFO] [stdout] 348 + || low_text.starts_with("ml") [INFO] [stdout] 349 + || low_text.starts_with("kg") [INFO] [stdout] 350 + || low_text.starts_with("g/") [INFO] [stdout] 351 + || low_text.starts_with("cm") [INFO] [stdout] 352 + || low_text.starts_with("patient") [INFO] [stdout] 353 + || low_text.starts_with("subject") [INFO] [stdout] 354 + { [INFO] [stdout] 355 + // appears to be a header or (more likely) a split line part [INFO] [stdout] 356 + [INFO] [stdout] 357 + genuine = false; [INFO] [stdout] 358 + } [INFO] [stdout] 359 + [INFO] [stdout] 360 + if this_tag_num > 1 { [INFO] [stdout] 361 + if tag_in_numeric_sequence(this_tag_num, tagged_lines, level) { [INFO] [stdout] 362 + genuine = true; // continuation of numdot2 or the first in a numdot2 sequence [INFO] [stdout] 363 + } [INFO] [stdout] 364 + else { [INFO] [stdout] 365 + genuine = false; [INFO] [stdout] 366 + } [INFO] [stdout] 367 + } [INFO] [stdout] 368 + [INFO] [stdout] 369 + if this_tag_num == 1 { [INFO] [stdout] 370 + [INFO] [stdout] 371 + // presumed genuine unless made false above [INFO] [stdout] 372 + [INFO] [stdout] 373 + } [INFO] [stdout] 374 + } [INFO] [stdout] 375 + [INFO] [stdout] 376 + if r.tag_type == "num3spc".to_string() { [INFO] [stdout] 377 + [INFO] [stdout] 378 + // Regex is @"^(1|2)\d{1,2}\.?\s?" - tag type will be ^(1|2)\d{1,2} [INFO] [stdout] 379 + // Can be a spurious CR followed by a number, a.g. after an equals sign [INFO] [stdout] 380 + // or before a unit. Should normally also be part of a sequence. [INFO] [stdout] 381 + [INFO] [stdout] 382 + let low_text = r.text.trim().to_lowercase(); [INFO] [stdout] 383 + if low_text.starts_with("mg") || low_text.starts_with("cm") [INFO] [stdout] 384 + || low_text.starts_with("kg") || low_text.starts_with("secs") [INFO] [stdout] 385 + || low_text.starts_with("patients") || low_text.starts_with("min") [INFO] [stdout] 386 + || low_text.starts_with("days") || low_text.starts_with("subjects") [INFO] [stdout] 387 + { [INFO] [stdout] 388 + genuine = false; [INFO] [stdout] 389 + } [INFO] [stdout] 390 + [INFO] [stdout] 391 + if index > 0 [INFO] [stdout] 392 + { [INFO] [stdout] 393 + let prev_line = &tagged_lines[index - 1].text; [INFO] [stdout] 394 + if prev_line.last_char() == '=' || prev_line.last_char() == '>' || prev_line.last_char() == '<' [INFO] [stdout] 395 + { [INFO] [stdout] 396 + genuine = false; [INFO] [stdout] 397 + } [INFO] [stdout] 398 + else [INFO] [stdout] 399 + { [INFO] [stdout] 400 + if r.tag != "101" && r.tag != "201" [INFO] [stdout] 401 + { [INFO] [stdout] 402 + let prevln1same = prev_tag_type == "num3spc"; [INFO] [stdout] 403 + let mut prevln2same = false; [INFO] [stdout] 404 + if index > 1 [INFO] [stdout] 405 + { [INFO] [stdout] 406 + let prevldr2 = tagged_lines[index - 2].tag.clone(); [INFO] [stdout] 407 + if prevldr2 == "num3spc".to_string() [INFO] [stdout] 408 + { [INFO] [stdout] 409 + prevln2same = true; [INFO] [stdout] 410 + } [INFO] [stdout] 411 + } [INFO] [stdout] 412 + if !(prevln1same || prevln2same) [INFO] [stdout] 413 + { [INFO] [stdout] 414 + // line seems to be isolated in the sequence [INFO] [stdout] 415 + genuine = false; [INFO] [stdout] 416 + } [INFO] [stdout] 417 + } [INFO] [stdout] 418 + } [INFO] [stdout] 419 + [INFO] [stdout] 420 + } [INFO] [stdout] 421 + [INFO] [stdout] 422 + } [INFO] [stdout] 423 + [INFO] [stdout] 424 + if genuine { [INFO] [stdout] 425 + [INFO] [stdout] 426 + Some(CLine { [INFO] [stdout] 427 + seq_num: (index + 1) as i32, [INFO] [stdout] 428 + tag: r.tag, [INFO] [stdout] 429 + tag_type: proc_tag_type, [INFO] [stdout] 430 + indent_level: level, [INFO] [stdout] 431 + text: r.text, [INFO] [stdout] 432 + }) [INFO] [stdout] 433 + } [INFO] [stdout] 434 + else { [INFO] [stdout] 435 + // remove the level if one has just been added to the levels vector [INFO] [stdout] 436 + if new_level { [INFO] [stdout] 437 + levels.pop(); [INFO] [stdout] 438 + } [INFO] [stdout] 439 + None [INFO] [stdout] 440 + } [INFO] [stdout] 441 + }, [INFO] [stdout] 442 + None => None, [INFO] [stdout] 443 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/iec/iec_res.rs:278:12 [INFO] [stdout] | [INFO] [stdout] 278 | if s9.text.first_char().is_digit(10) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s9.text.first_char().is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:291:48 [INFO] [stdout] | [INFO] [stdout] 291 | s12.text = s12.text.trim_start_matches(&['.', ' ']).to_string(); // text is shorn of any whitespace, periods [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/iec/iec_res.rs:292:40 [INFO] [stdout] | [INFO] [stdout] 292 | s12.tag = s12.tag.trim_matches(&['.', ' ']).to_string(); // tag is now just the 3 numerals [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['.', ' ']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:306:10 [INFO] [stdout] | [INFO] [stdout] 306 | else if let Some(s15) = test_re("numal", this_line) { Some(s15) } [INFO] [stdout] | __________^ [INFO] [stdout] 307 | | else { [INFO] [stdout] 308 | | None [INFO] [stdout] 309 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("numal", this_line).map(|s15| s15) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/iec/iec_res.rs:322:37 [INFO] [stdout] | [INFO] [stdout] 322 | let this_tag_num: i32 = proc_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 322 - let this_tag_num: i32 = proc_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 322 + let this_tag_num: i32 = proc_tag.parse().unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_res.rs:374:30 [INFO] [stdout] | [INFO] [stdout] 374 | if r.tag_type == "num3spc".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `"num3spc"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/iec/iec_res.rs:405:49 [INFO] [stdout] | [INFO] [stdout] 405 | ... if prevldr2 == "num3spc".to_string() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `"num3spc"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:531:5 [INFO] [stdout] | [INFO] [stdout] 491 | / let processed_result = match raw_result { [INFO] [stdout] 492 | | [INFO] [stdout] 493 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 528 | | None => None, [INFO] [stdout] 529 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 530 | [INFO] [stdout] 531 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 491 ~ [INFO] [stdout] 492 | [INFO] [stdout] 493 ~ match raw_result { [INFO] [stdout] 494 + [INFO] [stdout] 495 + Some (r) => { [INFO] [stdout] 496 + [INFO] [stdout] 497 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 498 + [INFO] [stdout] 499 + let (mut level, _new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 500 + [INFO] [stdout] 501 + // Some roman numeral tags may in fact be part of an alpha sequence - check sequence [INFO] [stdout] 502 + // They would be in as a sub-criterion at a level 1 more than they should be. [INFO] [stdout] 503 + [INFO] [stdout] 504 + let mut proc_tag_type = r.tag_type.clone(); // default [INFO] [stdout] 505 + [INFO] [stdout] 506 + if r.tag_type.starts_with("rom") { [INFO] [stdout] 507 + if r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 508 + || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 509 + || r.tag == "x." || r.tag == "x)" || r.tag == "X." { [INFO] [stdout] 510 + if tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 511 + proc_tag_type = "aldot".to_string(); [INFO] [stdout] 512 + level = level - 1; [INFO] [stdout] 513 + } [INFO] [stdout] 514 + } [INFO] [stdout] 515 + } [INFO] [stdout] 516 + [INFO] [stdout] 517 + if r.tag == "i." && r.text.starts_with("e.") { // very rare but can occur - a false match that needs to be recognised as a non-tag [INFO] [stdout] 518 + None [INFO] [stdout] 519 + } [INFO] [stdout] 520 + else { [INFO] [stdout] 521 + Some(CLine { [INFO] [stdout] 522 + seq_num: (index + 1) as i32, [INFO] [stdout] 523 + tag: r.tag, [INFO] [stdout] 524 + tag_type: proc_tag_type, [INFO] [stdout] 525 + indent_level: level, [INFO] [stdout] 526 + text: r.text, [INFO] [stdout] 527 + }) [INFO] [stdout] 528 + } [INFO] [stdout] 529 + }, [INFO] [stdout] 530 + None => None, [INFO] [stdout] 531 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:486:10 [INFO] [stdout] | [INFO] [stdout] 486 | else if let Some(s11) = test_re("i_num", this_line) { Some(s11) } // inclusion as I or i numbers, optional space i1, i2 [INFO] [stdout] | __________^ [INFO] [stdout] 487 | | else { [INFO] [stdout] 488 | | None [INFO] [stdout] 489 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("i_num", this_line).map(|s11| s11) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:504:13 [INFO] [stdout] | [INFO] [stdout] 504 | / if r.tag_type.starts_with("rom") { [INFO] [stdout] 505 | | if r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 | | || r.tag == "x." || r.tag == "x)" || r.tag == "X." { [INFO] [stdout] ... | [INFO] [stdout] 513 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 504 ~ if r.tag_type.starts_with("rom") [INFO] [stdout] 505 ~ && (r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 ~ || r.tag == "x." || r.tag == "x)" || r.tag == "X.") { [INFO] [stdout] 508 | if tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] ... [INFO] [stdout] 511 | } [INFO] [stdout] 512 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:505:17 [INFO] [stdout] | [INFO] [stdout] 505 | / if r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 | | || r.tag == "x." || r.tag == "x)" || r.tag == "X." { [INFO] [stdout] 508 | | if tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] ... | [INFO] [stdout] 512 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 505 ~ if (r.tag == "i." || r.tag == "i)" || r.tag == "I." [INFO] [stdout] 506 | || r.tag == "v." || r.tag == "v)" || r.tag == "V." [INFO] [stdout] 507 ~ || r.tag == "x." || r.tag == "x)" || r.tag == "X.") { [INFO] [stdout] 508 ~ && tag_in_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 509 | proc_tag_type = "aldot".to_string(); [INFO] [stdout] 510 | level = level - 1; [INFO] [stdout] 511 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/iec/iec_res.rs:510:25 [INFO] [stdout] | [INFO] [stdout] 510 | level = level - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `level -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/iec/iec_res.rs:594:5 [INFO] [stdout] | [INFO] [stdout] 560 | / let processed_result = match raw_result { [INFO] [stdout] 561 | | [INFO] [stdout] 562 | | Some (r) => { [INFO] [stdout] ... | [INFO] [stdout] 591 | | None => None, [INFO] [stdout] 592 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 593 | [INFO] [stdout] 594 | processed_result [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 560 ~ [INFO] [stdout] 561 | [INFO] [stdout] 562 ~ match raw_result { [INFO] [stdout] 563 + [INFO] [stdout] 564 + Some (r) => { [INFO] [stdout] 565 + [INFO] [stdout] 566 + // get level - necessary to properly compare with previous lines [INFO] [stdout] 567 + [INFO] [stdout] 568 + let (mut level, _new_level) = if &r.tag_type != prev_tag_type {get_level(&r.tag_type, levels)} else {(prev_level, false)}; [INFO] [stdout] 569 + [INFO] [stdout] 570 + // Some roman numeral tags may in fact be part of an alpha sequence - check sequence [INFO] [stdout] 571 + // They would be in as a sub-criterion at a level 1 more than they should be. [INFO] [stdout] 572 + [INFO] [stdout] 573 + let mut proc_tag_type = r.tag_type.clone(); // default [INFO] [stdout] 574 + [INFO] [stdout] 575 + if r.tag_type.starts_with("rom") { [INFO] [stdout] 576 + if r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)" { [INFO] [stdout] 577 + if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 578 + proc_tag_type = "alinpar".to_string(); [INFO] [stdout] 579 + level = level - 1; [INFO] [stdout] 580 + } [INFO] [stdout] 581 + } [INFO] [stdout] 582 + } [INFO] [stdout] 583 + [INFO] [stdout] 584 + Some(CLine { [INFO] [stdout] 585 + seq_num: (index + 1) as i32, [INFO] [stdout] 586 + tag: r.tag, [INFO] [stdout] 587 + tag_type: proc_tag_type, [INFO] [stdout] 588 + indent_level: level, [INFO] [stdout] 589 + text: r.text, [INFO] [stdout] 590 + }) [INFO] [stdout] 591 + [INFO] [stdout] 592 + }, [INFO] [stdout] 593 + None => None, [INFO] [stdout] 594 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/iec/iec_res.rs:554:10 [INFO] [stdout] | [INFO] [stdout] 554 | else if let Some(s7) = test_re("invqm", this_line) { Some(s7) } // inverted question mark only ¿, ¿ [INFO] [stdout] | __________^ [INFO] [stdout] 555 | | [INFO] [stdout] 556 | | else { [INFO] [stdout] 557 | | None [INFO] [stdout] 558 | | }; [INFO] [stdout] | |_____^ help: try: `{ test_re("invqm", this_line).map(|s7| s7) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:573:13 [INFO] [stdout] | [INFO] [stdout] 573 | / if r.tag_type.starts_with("rom") { [INFO] [stdout] 574 | | if r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)" { [INFO] [stdout] 575 | | if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 576 | | proc_tag_type = "alinpar".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 580 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 573 ~ if r.tag_type.starts_with("rom") [INFO] [stdout] 574 ~ && (r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)") { [INFO] [stdout] 575 | if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] ... [INFO] [stdout] 578 | } [INFO] [stdout] 579 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/iec/iec_res.rs:574:17 [INFO] [stdout] | [INFO] [stdout] 574 | / if r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)" { [INFO] [stdout] 575 | | if tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 576 | | proc_tag_type = "alinpar".to_string(); [INFO] [stdout] 577 | | level = level - 1; [INFO] [stdout] 578 | | } [INFO] [stdout] 579 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 574 ~ if (r.tag == "(i)" || r.tag == "(v)" || r.tag == "(x)") { [INFO] [stdout] 575 ~ && tag_in_bracketed_sequence(&r.tag, tagged_lines, level) { [INFO] [stdout] 576 | proc_tag_type = "alinpar".to_string(); [INFO] [stdout] 577 | level = level - 1; [INFO] [stdout] 578 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/iec/iec_res.rs:577:25 [INFO] [stdout] | [INFO] [stdout] 577 | level = level - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `level -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `levels` [INFO] [stdout] --> src/iec/iec_res.rs:610:14 [INFO] [stdout] | [INFO] [stdout] 610 | for i in 2..levels.len() { [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] 610 - for i in 2..levels.len() { [INFO] [stdout] 610 + for (i, ) in levels.iter().enumerate().skip(2) { [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/iec/iec_res.rs:640:48 [INFO] [stdout] | [INFO] [stdout] 640 | fn tag_in_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [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] 640 - fn tag_in_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [INFO] [stdout] 640 + fn tag_in_sequence(tag: &String, tagged_lines: &[CLine], current_indent_level: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/iec/iec_res.rs:646:8 [INFO] [stdout] | [INFO] [stdout] 646 | if tagged_lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tagged_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_res.rs:664:58 [INFO] [stdout] | [INFO] [stdout] 664 | fn tag_in_bracketed_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [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] 664 - fn tag_in_bracketed_sequence(tag: &String, tagged_lines: &Vec, current_indent_level: i32) -> bool { [INFO] [stdout] 664 + fn tag_in_bracketed_sequence(tag: &String, tagged_lines: &[CLine], current_indent_level: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/iec/iec_res.rs:670:8 [INFO] [stdout] | [INFO] [stdout] 670 | if tagged_lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tagged_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/iec/iec_res.rs:689:56 [INFO] [stdout] | [INFO] [stdout] 689 | fn tag_in_numeric_sequence(tag_num: i32, tagged_lines: &Vec, current_indent_level: i32) -> bool { [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] 689 - fn tag_in_numeric_sequence(tag_num: i32, tagged_lines: &Vec, current_indent_level: i32) -> bool { [INFO] [stdout] 689 + fn tag_in_numeric_sequence(tag_num: i32, tagged_lines: &[CLine], current_indent_level: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/iec/iec_res.rs:695:8 [INFO] [stdout] | [INFO] [stdout] 695 | if tagged_lines.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tagged_lines.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Result::Err` [INFO] [stdout] --> src/iec/iec_res.rs:702:45 [INFO] [stdout] | [INFO] [stdout] 702 | let test_tag_num: i32 = test_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 702 - let test_tag_num: i32 = test_tag.parse().unwrap_or_else(|_| 0); [INFO] [stdout] 702 + let test_tag_num: i32 = test_tag.parse().unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/lib.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | let cli_pars: cli_reader::CliPars; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 48 | cli_pars = cli_reader::fetch_valid_arguments(args)?; [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] help: move the declaration `cli_pars` here [INFO] [stdout] | [INFO] [stdout] 47 ~ [INFO] [stdout] 48 ~ let cli_pars: cli_reader::CliPars = cli_reader::fetch_valid_arguments(args)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/iec/iec_fns.rs:605:35 [INFO] [stdout] | [INFO] [stdout] 605 | let mut level_pos_store = vec![0; 8]; // up to 8 levels possible [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 40s [INFO] running `Command { std: "docker" "inspect" "0d2839756cd4dbe0acf9194a00f49ee1676d0c5365dcc76b833cbcb89f1f20e9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0d2839756cd4dbe0acf9194a00f49ee1676d0c5365dcc76b833cbcb89f1f20e9", kill_on_drop: false }` [INFO] [stdout] 0d2839756cd4dbe0acf9194a00f49ee1676d0c5365dcc76b833cbcb89f1f20e9