[INFO] cloning repository https://github.com/apple-x-co/rs-pdf [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/apple-x-co/rs-pdf" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fapple-x-co%2Frs-pdf", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fapple-x-co%2Frs-pdf'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] aeb72fa236c6b3be8073f8fa62fd8334e9ab8f41 [INFO] linting apple-x-co/rs-pdf against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fapple-x-co%2Frs-pdf" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] [stderr] Updating files: 42% (16/38) Updating files: 44% (17/38) Updating files: 47% (18/38) Updating files: 50% (19/38) Updating files: 52% (20/38) Updating files: 55% (21/38) Updating files: 57% (22/38) Updating files: 60% (23/38) Updating files: 63% (24/38) Updating files: 65% (25/38) Updating files: 68% (26/38) Updating files: 71% (27/38) Updating files: 73% (28/38) Updating files: 76% (29/38) Updating files: 78% (30/38) Updating files: 81% (31/38) Updating files: 84% (32/38) Updating files: 86% (33/38) Updating files: 89% (34/38) Updating files: 92% (35/38) Updating files: 94% (36/38) Updating files: 97% (37/38) Updating files: 100% (38/38) Updating files: 100% (38/38), done. [INFO] started tweaking git repo https://github.com/apple-x-co/rs-pdf [INFO] finished tweaking git repo https://github.com/apple-x-co/rs-pdf [INFO] tweaked toml for git repo https://github.com/apple-x-co/rs-pdf written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/apple-x-co/rs-pdf 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/apple-x-co/rs-pdf already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded time-macros v0.2.19 [INFO] [stderr] Downloaded clap_derive v4.5.28 [INFO] [stderr] Downloaded redox_syscall v0.5.9 [INFO] [stderr] Downloaded ab_glyph v0.2.29 [INFO] [stderr] Downloaded clap v4.5.31 [INFO] [stderr] Downloaded uuid v1.15.1 [INFO] [stderr] Downloaded referencing v0.29.1 [INFO] [stderr] Downloaded jsonschema v0.29.1 [INFO] [stderr] Downloaded serde_json v1.0.139 [INFO] [stderr] Downloaded clap_builder v4.5.31 [INFO] [stderr] Downloaded pom v3.4.0 [INFO] [stderr] Downloaded libc v0.2.170 [INFO] [stderr] Downloaded printpdf v0.7.0 [INFO] [stderr] Downloaded lopdf v0.31.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] 6f99765769778d0230dd3ca3ca0cabdb93da2fb53df2daf477fd9a5f716396dd [INFO] running `Command { std: "docker" "start" "-a" "6f99765769778d0230dd3ca3ca0cabdb93da2fb53df2daf477fd9a5f716396dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6f99765769778d0230dd3ca3ca0cabdb93da2fb53df2daf477fd9a5f716396dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6f99765769778d0230dd3ca3ca0cabdb93da2fb53df2daf477fd9a5f716396dd", kill_on_drop: false }` [INFO] [stdout] 6f99765769778d0230dd3ca3ca0cabdb93da2fb53df2daf477fd9a5f716396dd [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] b2acacda3ae5bc0439387464c9eb365e7641fcae4b858fabd82cab407f1d958f [INFO] running `Command { std: "docker" "start" "-a" "b2acacda3ae5bc0439387464c9eb365e7641fcae4b858fabd82cab407f1d958f", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.93 [INFO] [stderr] Compiling unicode-ident v1.0.16 [INFO] [stderr] Compiling libc v0.2.170 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Checking icu_locid_transform_data v1.5.0 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Checking icu_properties_data v1.5.0 [INFO] [stderr] Checking bytes v1.10.0 [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking miniz_oxide v0.8.5 [INFO] [stderr] Compiling httparse v1.10.0 [INFO] [stderr] Checking icu_normalizer_data v1.5.0 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling serde_json v1.0.139 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Checking ryu v1.0.19 [INFO] [stderr] Compiling ref-cast v1.0.23 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling ahash v0.8.11 [INFO] [stderr] Checking log v0.4.25 [INFO] [stderr] Checking deranged v0.3.11 [INFO] [stderr] Checking time-core v0.1.2 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Checking flate2 v1.1.0 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking gif v0.13.1 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Checking ttf-parser v0.19.2 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking http v1.2.0 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Checking uuid v1.15.1 [INFO] [stderr] Checking md5 v0.7.0 [INFO] [stderr] Checking clap_builder v4.5.31 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking uuid-simd v0.8.0 [INFO] [stderr] Checking bytecount v0.6.8 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Checking time v0.3.37 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking tokio v1.43.0 [INFO] [stderr] Checking owned_ttf_parser v0.19.0 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking owned_ttf_parser v0.25.0 [INFO] [stderr] Checking ab_glyph v0.2.29 [INFO] [stderr] Checking http-body-util v0.1.2 [INFO] [stderr] Checking bstr v1.12.0 [INFO] [stderr] Checking fancy-regex v0.14.0 [INFO] [stderr] Checking pom v3.4.0 [INFO] [stderr] Checking lopdf v0.31.0 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling ref-cast-impl v1.0.23 [INFO] [stderr] Compiling clap_derive v4.5.28 [INFO] [stderr] Checking printpdf v0.7.0 [INFO] [stderr] Checking hyper-util v0.1.10 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking clap v4.5.31 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking fluent-uri v0.3.2 [INFO] [stderr] Checking email_address v0.2.9 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking reqwest v0.12.12 [INFO] [stderr] Checking referencing v0.29.1 [INFO] [stderr] Checking jsonschema v0.29.1 [INFO] [stderr] Checking rs-pdf v0.2.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:25:28 [INFO] [stdout] | [INFO] [stdout] 25 | const PAGE_NUMBER_FORMAT: &'static str = "Page ${CURRENT_PAGE_NUMBER} of ${TOTAL_PAGES}"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | const PAGE_TYPE_DYNAMIC: &'static str = "dynamic"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | const PAGE_TYPE_STATIC: &'static str = "static"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:28:26 [INFO] [stdout] | [INFO] [stdout] 28 | const OBJECT_TYPE_TEXT: &'static str = "text"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | const OBJECT_TYPE_IMAGE: &'static str = "image"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:30:26 [INFO] [stdout] | [INFO] [stdout] 30 | const OBJECT_TYPE_LINE: &'static str = "line"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:31:31 [INFO] [stdout] | [INFO] [stdout] 31 | const OBJECT_TYPE_RECTANGLE: &'static str = "rectangle"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | const OBJECT_TYPE_OBJECT: &'static str = "object"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:33:29 [INFO] [stdout] | [INFO] [stdout] 33 | const OBJECT_TYPE_OBJECTS: &'static str = "objects"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:34:30 [INFO] [stdout] | [INFO] [stdout] 34 | const OBJECT_TYPE_FLEXIBLE: &'static str = "flexible"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:35:35 [INFO] [stdout] | [INFO] [stdout] 35 | const OBJECT_TYPE_FLEXIBLE_ITEM: &'static str = "flexible_item"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:37:27 [INFO] [stdout] | [INFO] [stdout] 37 | const JSON_SCHEMA_BYTES: &'static [u8] = include_bytes!("../../schema/schema.json"); [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:25:28 [INFO] [stdout] | [INFO] [stdout] 25 | const PAGE_NUMBER_FORMAT: &'static str = "Page ${CURRENT_PAGE_NUMBER} of ${TOTAL_PAGES}"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:26:27 [INFO] [stdout] | [INFO] [stdout] 26 | const PAGE_TYPE_DYNAMIC: &'static str = "dynamic"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | const PAGE_TYPE_STATIC: &'static str = "static"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:28:26 [INFO] [stdout] | [INFO] [stdout] 28 | const OBJECT_TYPE_TEXT: &'static str = "text"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | const OBJECT_TYPE_IMAGE: &'static str = "image"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:30:26 [INFO] [stdout] | [INFO] [stdout] 30 | const OBJECT_TYPE_LINE: &'static str = "line"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:31:31 [INFO] [stdout] | [INFO] [stdout] 31 | const OBJECT_TYPE_RECTANGLE: &'static str = "rectangle"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | const OBJECT_TYPE_OBJECT: &'static str = "object"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:33:29 [INFO] [stdout] | [INFO] [stdout] 33 | const OBJECT_TYPE_OBJECTS: &'static str = "objects"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/pdf_writer.rs:24:41 [INFO] [stdout] | [INFO] [stdout] 24 | const CURRENT_PAGE_NUMBER_PLACEHOLDER: &'static str = "${CURRENT_PAGE_NUMBER}"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:34:30 [INFO] [stdout] | [INFO] [stdout] 34 | const OBJECT_TYPE_FLEXIBLE: &'static str = "flexible"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:35:35 [INFO] [stdout] | [INFO] [stdout] 35 | const OBJECT_TYPE_FLEXIBLE_ITEM: &'static str = "flexible_item"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/document_json.rs:37:27 [INFO] [stdout] | [INFO] [stdout] 37 | const JSON_SCHEMA_BYTES: &'static [u8] = include_bytes!("../../schema/schema.json"); [INFO] [stdout] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/pdf_writer.rs:25:33 [INFO] [stdout] | [INFO] [stdout] 25 | const TOTAL_PAGES_PLACEHOLDER: &'static str = "${TOTAL_PAGES}"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/pdf_writer.rs:24:41 [INFO] [stdout] | [INFO] [stdout] 24 | const CURRENT_PAGE_NUMBER_PLACEHOLDER: &'static str = "${CURRENT_PAGE_NUMBER}"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/block_document/pdf_writer.rs:25:33 [INFO] [stdout] | [INFO] [stdout] 25 | const TOTAL_PAGES_PLACEHOLDER: &'static str = "${TOTAL_PAGES}"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:66:25 [INFO] [stdout] | [INFO] [stdout] 66 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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/block_document/static_page.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:66:25 [INFO] [stdout] | [INFO] [stdout] 66 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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/block_document/static_page.rs:85:16 [INFO] [stdout] | [INFO] [stdout] 85 | if blocks.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!blocks.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:98:17 [INFO] [stdout] | [INFO] [stdout] 98 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/block_document/static_page.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | / let mut containers: Vec = Vec::new(); [INFO] [stdout] 111 | | containers.push(StaticPage { blocks, auto_pagination }); [INFO] [stdout] | |________________________________________________________________^ help: consider using the `vec![]` macro: `let containers: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `block_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/static_page.rs:134:29 [INFO] [stdout] | [INFO] [stdout] 125 | if block_container.frame.is_some() [INFO] [stdout] | ------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 134 | block_container.frame.as_ref().unwrap(), // NOTE: 合ってないかも... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: length comparison to zero [INFO] [stdout] --> src/block_document/static_page.rs:85:16 [INFO] [stdout] | [INFO] [stdout] 85 | if blocks.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!blocks.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: called `unwrap` on `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/static_page.rs:292:29 [INFO] [stdout] | [INFO] [stdout] 288 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 292 | width = flexible_container.frame.as_ref().unwrap().width(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:98:17 [INFO] [stdout] | [INFO] [stdout] 98 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/static_page.rs:293:30 [INFO] [stdout] | [INFO] [stdout] 288 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 293 | height = flexible_container.frame.as_ref().unwrap().height(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/block_document/static_page.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | / let mut containers: Vec = Vec::new(); [INFO] [stdout] 111 | | containers.push(StaticPage { blocks, auto_pagination }); [INFO] [stdout] | |________________________________________________________________^ help: consider using the `vec![]` macro: `let containers: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `block_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/static_page.rs:134:29 [INFO] [stdout] | [INFO] [stdout] 125 | if block_container.frame.is_some() [INFO] [stdout] | ------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 134 | block_container.frame.as_ref().unwrap(), // NOTE: 合ってないかも... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/static_page.rs:292:29 [INFO] [stdout] | [INFO] [stdout] 288 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 292 | width = flexible_container.frame.as_ref().unwrap().width(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/static_page.rs:293:30 [INFO] [stdout] | [INFO] [stdout] 288 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 293 | height = flexible_container.frame.as_ref().unwrap().height(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/block_document/static_page.rs:230:25 [INFO] [stdout] | [INFO] [stdout] 230 | / match style { [INFO] [stdout] 231 | | Style::Space(space) => { [INFO] [stdout] 232 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 235 | | } [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] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 230 ~ if let Style::Space(space) = style { [INFO] [stdout] 231 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 232 + } [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/block_document/static_page.rs:268:25 [INFO] [stdout] | [INFO] [stdout] 268 | / match style { [INFO] [stdout] 269 | | Style::Space(space) => { [INFO] [stdout] 270 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [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] 268 ~ if let Style::Space(space) = style { [INFO] [stdout] 269 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 270 + } [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/block_document/static_page.rs:305:21 [INFO] [stdout] | [INFO] [stdout] 305 | / match block { [INFO] [stdout] 306 | | Block::FlexibleItem(flexible_item) => { [INFO] [stdout] 307 | | if let Some(basis) = flexible_item.basis { [INFO] [stdout] 308 | | item_width = width * (basis / 100.0); [INFO] [stdout] ... | [INFO] [stdout] 337 | | _ => {} [INFO] [stdout] 338 | | } [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] 305 ~ if let Block::FlexibleItem(flexible_item) = block { [INFO] [stdout] 306 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 307 + item_width = width * (basis / 100.0); [INFO] [stdout] 308 + } [INFO] [stdout] 309 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 310 + item_height = height * (basis / 100.0); [INFO] [stdout] 311 + } [INFO] [stdout] 312 + [INFO] [stdout] 313 + flexible_item.set_frame(match flexible_container.direction { [INFO] [stdout] 314 + Direction::Horizontal => GeoRect { [INFO] [stdout] 315 + point: Some(GeoPoint { [INFO] [stdout] 316 + x: item_x, [INFO] [stdout] 317 + y: 0.0, [INFO] [stdout] 318 + }), [INFO] [stdout] 319 + size: Some(GeoSize { [INFO] [stdout] 320 + width: item_width, [INFO] [stdout] 321 + height: 0.0, [INFO] [stdout] 322 + }), [INFO] [stdout] 323 + }, [INFO] [stdout] 324 + Direction::Vertical => GeoRect { [INFO] [stdout] 325 + point: Some(GeoPoint { [INFO] [stdout] 326 + x: 0.0, [INFO] [stdout] 327 + y: item_y, [INFO] [stdout] 328 + }), [INFO] [stdout] 329 + size: Some(GeoSize { [INFO] [stdout] 330 + width: 0.0, [INFO] [stdout] 331 + height: item_height, [INFO] [stdout] 332 + }), [INFO] [stdout] 333 + }, [INFO] [stdout] 334 + }); [INFO] [stdout] 335 + } [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/block_document/static_page.rs:230:25 [INFO] [stdout] | [INFO] [stdout] 230 | / match style { [INFO] [stdout] 231 | | Style::Space(space) => { [INFO] [stdout] 232 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 235 | | } [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] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 230 ~ if let Style::Space(space) = style { [INFO] [stdout] 231 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 232 + } [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/block_document/static_page.rs:268:25 [INFO] [stdout] | [INFO] [stdout] 268 | / match style { [INFO] [stdout] 269 | | Style::Space(space) => { [INFO] [stdout] 270 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 273 | | } [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] 268 ~ if let Style::Space(space) = style { [INFO] [stdout] 269 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 270 + } [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/block_document/static_page.rs:413:21 [INFO] [stdout] | [INFO] [stdout] 413 | / match block { [INFO] [stdout] 414 | | Block::Text(block_text) => { [INFO] [stdout] 415 | | let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 416 | | match text_wrap.mode { [INFO] [stdout] ... | [INFO] [stdout] 430 | | _ => {} [INFO] [stdout] 431 | | } [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] 413 ~ if let Block::Text(block_text) = block { [INFO] [stdout] 414 + let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 415 + match text_wrap.mode { [INFO] [stdout] 416 + TextWrapMode::Word => { [INFO] [stdout] 417 + if block_text.frame.is_none() { [INFO] [stdout] 418 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 419 + } [INFO] [stdout] 420 + } [INFO] [stdout] 421 + TextWrapMode::Character => { [INFO] [stdout] 422 + if block_text.frame.is_none() { [INFO] [stdout] 423 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 424 + } [INFO] [stdout] 425 + } [INFO] [stdout] 426 + _ => {} [INFO] [stdout] 427 + } [INFO] [stdout] 428 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/static_page.rs:418:37 [INFO] [stdout] | [INFO] [stdout] 418 | / ... if block_text.frame.is_none() { [INFO] [stdout] 419 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 420 | | ... } [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] 417 ~ TextWrapMode::Word [INFO] [stdout] 418 ~ if block_text.frame.is_none() => { [INFO] [stdout] 419 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 420 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/static_page.rs:423:37 [INFO] [stdout] | [INFO] [stdout] 423 | / ... if block_text.frame.is_none() { [INFO] [stdout] 424 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 425 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 422 ~ TextWrapMode::Character [INFO] [stdout] 423 ~ if block_text.frame.is_none() => { [INFO] [stdout] 424 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:492:21 [INFO] [stdout] | [INFO] [stdout] 492 | &drawn_frame, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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/block_document/static_page.rs:305:21 [INFO] [stdout] | [INFO] [stdout] 305 | / match block { [INFO] [stdout] 306 | | Block::FlexibleItem(flexible_item) => { [INFO] [stdout] 307 | | if let Some(basis) = flexible_item.basis { [INFO] [stdout] 308 | | item_width = width * (basis / 100.0); [INFO] [stdout] ... | [INFO] [stdout] 337 | | _ => {} [INFO] [stdout] 338 | | } [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] 305 ~ if let Block::FlexibleItem(flexible_item) = block { [INFO] [stdout] 306 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 307 + item_width = width * (basis / 100.0); [INFO] [stdout] 308 + } [INFO] [stdout] 309 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 310 + item_height = height * (basis / 100.0); [INFO] [stdout] 311 + } [INFO] [stdout] 312 + [INFO] [stdout] 313 + flexible_item.set_frame(match flexible_container.direction { [INFO] [stdout] 314 + Direction::Horizontal => GeoRect { [INFO] [stdout] 315 + point: Some(GeoPoint { [INFO] [stdout] 316 + x: item_x, [INFO] [stdout] 317 + y: 0.0, [INFO] [stdout] 318 + }), [INFO] [stdout] 319 + size: Some(GeoSize { [INFO] [stdout] 320 + width: item_width, [INFO] [stdout] 321 + height: 0.0, [INFO] [stdout] 322 + }), [INFO] [stdout] 323 + }, [INFO] [stdout] 324 + Direction::Vertical => GeoRect { [INFO] [stdout] 325 + point: Some(GeoPoint { [INFO] [stdout] 326 + x: 0.0, [INFO] [stdout] 327 + y: item_y, [INFO] [stdout] 328 + }), [INFO] [stdout] 329 + size: Some(GeoSize { [INFO] [stdout] 330 + width: 0.0, [INFO] [stdout] 331 + height: item_height, [INFO] [stdout] 332 + }), [INFO] [stdout] 333 + }, [INFO] [stdout] 334 + }); [INFO] [stdout] 335 + } [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/block_document/static_page.rs:413:21 [INFO] [stdout] | [INFO] [stdout] 413 | / match block { [INFO] [stdout] 414 | | Block::Text(block_text) => { [INFO] [stdout] 415 | | let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 416 | | match text_wrap.mode { [INFO] [stdout] ... | [INFO] [stdout] 430 | | _ => {} [INFO] [stdout] 431 | | } [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] 413 ~ if let Block::Text(block_text) = block { [INFO] [stdout] 414 + let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 415 + match text_wrap.mode { [INFO] [stdout] 416 + TextWrapMode::Word => { [INFO] [stdout] 417 + if block_text.frame.is_none() { [INFO] [stdout] 418 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 419 + } [INFO] [stdout] 420 + } [INFO] [stdout] 421 + TextWrapMode::Character => { [INFO] [stdout] 422 + if block_text.frame.is_none() { [INFO] [stdout] 423 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 424 + } [INFO] [stdout] 425 + } [INFO] [stdout] 426 + _ => {} [INFO] [stdout] 427 + } [INFO] [stdout] 428 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/static_page.rs:418:37 [INFO] [stdout] | [INFO] [stdout] 418 | / ... if block_text.frame.is_none() { [INFO] [stdout] 419 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 420 | | ... } [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] 417 ~ TextWrapMode::Word [INFO] [stdout] 418 ~ if block_text.frame.is_none() => { [INFO] [stdout] 419 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 420 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:529:68 [INFO] [stdout] | [INFO] [stdout] 529 | Self::calculate_image_constraints(block_image, &drawn_frame, direction); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/static_page.rs:423:37 [INFO] [stdout] | [INFO] [stdout] 423 | / ... if block_text.frame.is_none() { [INFO] [stdout] 424 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 425 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 422 ~ TextWrapMode::Character [INFO] [stdout] 423 ~ if block_text.frame.is_none() => { [INFO] [stdout] 424 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:492:21 [INFO] [stdout] | [INFO] [stdout] 492 | &drawn_frame, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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/block_document/static_page.rs:545:25 [INFO] [stdout] | [INFO] [stdout] 545 | / match style { [INFO] [stdout] 546 | | Style::Space(space) => { [INFO] [stdout] 547 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 550 | | } [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] 545 ~ if let Style::Space(space) = style { [INFO] [stdout] 546 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 547 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/static_page.rs:529:68 [INFO] [stdout] | [INFO] [stdout] 529 | Self::calculate_image_constraints(block_image, &drawn_frame, direction); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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/block_document/static_page.rs:573:21 [INFO] [stdout] | [INFO] [stdout] 573 | / match style { [INFO] [stdout] 574 | | Style::Space(space) => { [INFO] [stdout] 575 | | frame = frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 578 | | } [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] 573 ~ if let Style::Space(space) = style { [INFO] [stdout] 574 + frame = frame.padding(space); [INFO] [stdout] 575 + } [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/block_document/static_page.rs:545:25 [INFO] [stdout] | [INFO] [stdout] 545 | / match style { [INFO] [stdout] 546 | | Style::Space(space) => { [INFO] [stdout] 547 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 550 | | } [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] 545 ~ if let Style::Space(space) = style { [INFO] [stdout] 546 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 547 + } [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/block_document/static_page.rs:573:21 [INFO] [stdout] | [INFO] [stdout] 573 | / match style { [INFO] [stdout] 574 | | Style::Space(space) => { [INFO] [stdout] 575 | | frame = frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 578 | | } [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] 573 ~ if let Style::Space(space) = style { [INFO] [stdout] 574 + frame = frame.padding(space); [INFO] [stdout] 575 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `image::ImageError` [INFO] [stdout] --> src/block_document/static_page.rs:592:45 [INFO] [stdout] | [INFO] [stdout] 592 | .map(|image| image.dimensions()) [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] | |_____________________________________________| [INFO] [stdout] 593 | || .map_err(ImageError::from) [INFO] [stdout] | ||______________________________________^ [INFO] [stdout] 594 | | } [INFO] [stdout] | |_____- help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `image::ImageError` [INFO] [stdout] --> src/block_document/static_page.rs:592:45 [INFO] [stdout] | [INFO] [stdout] 592 | .map(|image| image.dimensions()) [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] | |_____________________________________________| [INFO] [stdout] 593 | || .map_err(ImageError::from) [INFO] [stdout] | ||______________________________________^ [INFO] [stdout] 594 | | } [INFO] [stdout] | |_____- help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/block_document/static_page.rs:590:22 [INFO] [stdout] | [INFO] [stdout] 590 | .map_err(|e| ImageError::from(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ImageError::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:624:12 [INFO] [stdout] | [INFO] [stdout] 624 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 625 | | .frame [INFO] [stdout] 626 | | .as_ref() [INFO] [stdout] 627 | | .map_or(true, |b| b.size.is_none()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 627 - .map_or(true, |b| b.size.is_none()) [INFO] [stdout] 627 + .is_none_or(|b| b.size.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:644:12 [INFO] [stdout] | [INFO] [stdout] 644 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 645 | | .frame [INFO] [stdout] 646 | | .as_ref() [INFO] [stdout] 647 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 647 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 647 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/block_document/static_page.rs:590:22 [INFO] [stdout] | [INFO] [stdout] 590 | .map_err(|e| ImageError::from(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ImageError::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:624:12 [INFO] [stdout] | [INFO] [stdout] 624 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 625 | | .frame [INFO] [stdout] 626 | | .as_ref() [INFO] [stdout] 627 | | .map_or(true, |b| b.size.is_none()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 627 - .map_or(true, |b| b.size.is_none()) [INFO] [stdout] 627 + .is_none_or(|b| b.size.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:644:12 [INFO] [stdout] | [INFO] [stdout] 644 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 645 | | .frame [INFO] [stdout] 646 | | .as_ref() [INFO] [stdout] 647 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 647 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 647 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:749:12 [INFO] [stdout] | [INFO] [stdout] 749 | if block_text [INFO] [stdout] | ____________^ [INFO] [stdout] 750 | | .frame [INFO] [stdout] 751 | | .as_ref() [INFO] [stdout] 752 | | .map_or(true, |b| b.size.is_none()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 752 - .map_or(true, |b| b.size.is_none()) [INFO] [stdout] 752 + .is_none_or(|b| b.size.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:759:12 [INFO] [stdout] | [INFO] [stdout] 759 | if block_text [INFO] [stdout] | ____________^ [INFO] [stdout] 760 | | .frame [INFO] [stdout] 761 | | .as_ref() [INFO] [stdout] 762 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 762 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 762 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:749:12 [INFO] [stdout] | [INFO] [stdout] 749 | if block_text [INFO] [stdout] | ____________^ [INFO] [stdout] 750 | | .frame [INFO] [stdout] 751 | | .as_ref() [INFO] [stdout] 752 | | .map_or(true, |b| b.size.is_none()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 752 - .map_or(true, |b| b.size.is_none()) [INFO] [stdout] 752 + .is_none_or(|b| b.size.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/static_page.rs:759:12 [INFO] [stdout] | [INFO] [stdout] 759 | if block_text [INFO] [stdout] | ____________^ [INFO] [stdout] 760 | | .frame [INFO] [stdout] 761 | | .as_ref() [INFO] [stdout] 762 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 762 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 762 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/block_document/document_json.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | if !validator.validate(&json).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `validator.validate(&json).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/block_document/document_json.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | if !validator.validate(&json).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `validator.validate(&json).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / if !style["text_fill_color"].is_null() { [INFO] [stdout] 172 | | if let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 173 | | page_number.add_style(text_fill_color); [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [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] 171 ~ if !style["text_fill_color"].is_null() [INFO] [stdout] 172 ~ && let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 173 | page_number.add_style(text_fill_color); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / if !style["text_outline_color"].is_null() { [INFO] [stdout] 178 | | if let Some(text_outline_color) = [INFO] [stdout] 179 | | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] ... | [INFO] [stdout] 183 | | } [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] 177 ~ if !style["text_outline_color"].is_null() [INFO] [stdout] 178 ~ && let Some(text_outline_color) = [INFO] [stdout] 179 | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] 180 | { [INFO] [stdout] 181 | page_number.add_style(text_outline_color); [INFO] [stdout] 182 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | / if !style["text_outline_style"].is_null() { [INFO] [stdout] 186 | | if let Some(text_outline_style) = [INFO] [stdout] 187 | | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [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] 185 ~ if !style["text_outline_style"].is_null() [INFO] [stdout] 186 ~ && let Some(text_outline_style) = [INFO] [stdout] 187 | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] 188 | { [INFO] [stdout] 189 | page_number.add_style(text_outline_style); [INFO] [stdout] 190 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | / if !style["text_style"].is_null() { [INFO] [stdout] 194 | | if let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 195 | | page_number.add_style(text_style); [INFO] [stdout] 196 | | } [INFO] [stdout] 197 | | } [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] 193 ~ if !style["text_style"].is_null() [INFO] [stdout] 194 ~ && let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 195 | page_number.add_style(text_style); [INFO] [stdout] 196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / if !style["text_fill_color"].is_null() { [INFO] [stdout] 172 | | if let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 173 | | page_number.add_style(text_fill_color); [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [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] 171 ~ if !style["text_fill_color"].is_null() [INFO] [stdout] 172 ~ && let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 173 | page_number.add_style(text_fill_color); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / if !style["text_outline_color"].is_null() { [INFO] [stdout] 178 | | if let Some(text_outline_color) = [INFO] [stdout] 179 | | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] ... | [INFO] [stdout] 183 | | } [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] 177 ~ if !style["text_outline_color"].is_null() [INFO] [stdout] 178 ~ && let Some(text_outline_color) = [INFO] [stdout] 179 | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] 180 | { [INFO] [stdout] 181 | page_number.add_style(text_outline_color); [INFO] [stdout] 182 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | / if !style["text_outline_style"].is_null() { [INFO] [stdout] 186 | | if let Some(text_outline_style) = [INFO] [stdout] 187 | | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] ... | [INFO] [stdout] 191 | | } [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] 185 ~ if !style["text_outline_style"].is_null() [INFO] [stdout] 186 ~ && let Some(text_outline_style) = [INFO] [stdout] 187 | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] 188 | { [INFO] [stdout] 189 | page_number.add_style(text_outline_style); [INFO] [stdout] 190 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | / if !style["text_style"].is_null() { [INFO] [stdout] 194 | | if let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 195 | | page_number.add_style(text_style); [INFO] [stdout] 196 | | } [INFO] [stdout] 197 | | } [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] 193 ~ if !style["text_style"].is_null() [INFO] [stdout] 194 ~ && let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 195 | page_number.add_style(text_style); [INFO] [stdout] 196 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | / if !style["alignment"].is_null() { [INFO] [stdout] 228 | | if let Some(alignment) = parse_alignment(&style["alignment"]) { [INFO] [stdout] 229 | | text.add_style(alignment); [INFO] [stdout] 230 | | } [INFO] [stdout] 231 | | } [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] 227 ~ if !style["alignment"].is_null() [INFO] [stdout] 228 ~ && let Some(alignment) = parse_alignment(&style["alignment"]) { [INFO] [stdout] 229 | text.add_style(alignment); [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:233:13 [INFO] [stdout] | [INFO] [stdout] 233 | / if !style["border_color"].is_null() { [INFO] [stdout] 234 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 235 | | text.add_style(border_color); [INFO] [stdout] 236 | | } [INFO] [stdout] 237 | | } [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] 233 ~ if !style["border_color"].is_null() [INFO] [stdout] 234 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 235 | text.add_style(border_color); [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | / if !style["border_style"].is_null() { [INFO] [stdout] 240 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 241 | | text.add_style(border_style); [INFO] [stdout] 242 | | } [INFO] [stdout] 243 | | } [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] 239 ~ if !style["border_style"].is_null() [INFO] [stdout] 240 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 241 | text.add_style(border_style); [INFO] [stdout] 242 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / if !style["border_width"].is_null() { [INFO] [stdout] 246 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 247 | | text.add_style(border_width); [INFO] [stdout] 248 | | } [INFO] [stdout] 249 | | } [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] 245 ~ if !style["border_width"].is_null() [INFO] [stdout] 246 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 247 | text.add_style(border_width); [INFO] [stdout] 248 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:251:13 [INFO] [stdout] | [INFO] [stdout] 251 | / if !style["text_fill_color"].is_null() { [INFO] [stdout] 252 | | if let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 253 | | text.add_style(text_fill_color); [INFO] [stdout] 254 | | } [INFO] [stdout] 255 | | } [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] 251 ~ if !style["text_fill_color"].is_null() [INFO] [stdout] 252 ~ && let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 253 | text.add_style(text_fill_color); [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:257:13 [INFO] [stdout] | [INFO] [stdout] 257 | / if !style["text_outline_color"].is_null() { [INFO] [stdout] 258 | | if let Some(text_outline_color) = [INFO] [stdout] 259 | | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] ... | [INFO] [stdout] 263 | | } [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] 257 ~ if !style["text_outline_color"].is_null() [INFO] [stdout] 258 ~ && let Some(text_outline_color) = [INFO] [stdout] 259 | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] 260 | { [INFO] [stdout] 261 | text.add_style(text_outline_color); [INFO] [stdout] 262 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:265:13 [INFO] [stdout] | [INFO] [stdout] 265 | / if !style["text_outline_style"].is_null() { [INFO] [stdout] 266 | | if let Some(text_outline_style) = [INFO] [stdout] 267 | | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] ... | [INFO] [stdout] 271 | | } [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] 265 ~ if !style["text_outline_style"].is_null() [INFO] [stdout] 266 ~ && let Some(text_outline_style) = [INFO] [stdout] 267 | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] 268 | { [INFO] [stdout] 269 | text.add_style(text_outline_style); [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:273:13 [INFO] [stdout] | [INFO] [stdout] 273 | / if !style["text_style"].is_null() { [INFO] [stdout] 274 | | if let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 275 | | text.add_style(text_style); [INFO] [stdout] 276 | | } [INFO] [stdout] 277 | | } [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] 273 ~ if !style["text_style"].is_null() [INFO] [stdout] 274 ~ && let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 275 | text.add_style(text_style); [INFO] [stdout] 276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | / if !style["alignment"].is_null() { [INFO] [stdout] 228 | | if let Some(alignment) = parse_alignment(&style["alignment"]) { [INFO] [stdout] 229 | | text.add_style(alignment); [INFO] [stdout] 230 | | } [INFO] [stdout] 231 | | } [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] 227 ~ if !style["alignment"].is_null() [INFO] [stdout] 228 ~ && let Some(alignment) = parse_alignment(&style["alignment"]) { [INFO] [stdout] 229 | text.add_style(alignment); [INFO] [stdout] 230 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:233:13 [INFO] [stdout] | [INFO] [stdout] 233 | / if !style["border_color"].is_null() { [INFO] [stdout] 234 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 235 | | text.add_style(border_color); [INFO] [stdout] 236 | | } [INFO] [stdout] 237 | | } [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] 233 ~ if !style["border_color"].is_null() [INFO] [stdout] 234 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 235 | text.add_style(border_color); [INFO] [stdout] 236 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:279:13 [INFO] [stdout] | [INFO] [stdout] 279 | / if !style["text_wrap"].is_null() { [INFO] [stdout] 280 | | if let Some(text_wrap) = parse_text_wrap(&style["text_wrap"]) { [INFO] [stdout] 281 | | text.add_style(text_wrap); [INFO] [stdout] 282 | | } [INFO] [stdout] 283 | | } [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] 279 ~ if !style["text_wrap"].is_null() [INFO] [stdout] 280 ~ && let Some(text_wrap) = parse_text_wrap(&style["text_wrap"]) { [INFO] [stdout] 281 | text.add_style(text_wrap); [INFO] [stdout] 282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | / if !style["border_style"].is_null() { [INFO] [stdout] 240 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 241 | | text.add_style(border_style); [INFO] [stdout] 242 | | } [INFO] [stdout] 243 | | } [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] 239 ~ if !style["border_style"].is_null() [INFO] [stdout] 240 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 241 | text.add_style(border_style); [INFO] [stdout] 242 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | / if !style["border_width"].is_null() { [INFO] [stdout] 246 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 247 | | text.add_style(border_width); [INFO] [stdout] 248 | | } [INFO] [stdout] 249 | | } [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] 245 ~ if !style["border_width"].is_null() [INFO] [stdout] 246 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 247 | text.add_style(border_width); [INFO] [stdout] 248 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | / if !style["border_color"].is_null() { [INFO] [stdout] 303 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 304 | | image.add_style(border_color); [INFO] [stdout] 305 | | } [INFO] [stdout] 306 | | } [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] 302 ~ if !style["border_color"].is_null() [INFO] [stdout] 303 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 304 | image.add_style(border_color); [INFO] [stdout] 305 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 308 | / if !style["border_style"].is_null() { [INFO] [stdout] 309 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 310 | | image.add_style(border_style); [INFO] [stdout] 311 | | } [INFO] [stdout] 312 | | } [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] 308 ~ if !style["border_style"].is_null() [INFO] [stdout] 309 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 310 | image.add_style(border_style); [INFO] [stdout] 311 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:251:13 [INFO] [stdout] | [INFO] [stdout] 251 | / if !style["text_fill_color"].is_null() { [INFO] [stdout] 252 | | if let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 253 | | text.add_style(text_fill_color); [INFO] [stdout] 254 | | } [INFO] [stdout] 255 | | } [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] 251 ~ if !style["text_fill_color"].is_null() [INFO] [stdout] 252 ~ && let Some(text_fill_color) = parse_text_fill_color(&style["text_fill_color"]) { [INFO] [stdout] 253 | text.add_style(text_fill_color); [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:314:13 [INFO] [stdout] | [INFO] [stdout] 314 | / if !style["border_width"].is_null() { [INFO] [stdout] 315 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 316 | | image.add_style(border_width); [INFO] [stdout] 317 | | } [INFO] [stdout] 318 | | } [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] 314 ~ if !style["border_width"].is_null() [INFO] [stdout] 315 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 316 | image.add_style(border_width); [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:257:13 [INFO] [stdout] | [INFO] [stdout] 257 | / if !style["text_outline_color"].is_null() { [INFO] [stdout] 258 | | if let Some(text_outline_color) = [INFO] [stdout] 259 | | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] ... | [INFO] [stdout] 263 | | } [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] 257 ~ if !style["text_outline_color"].is_null() [INFO] [stdout] 258 ~ && let Some(text_outline_color) = [INFO] [stdout] 259 | parse_text_outline_color(&style["text_outline_color"]) [INFO] [stdout] 260 | { [INFO] [stdout] 261 | text.add_style(text_outline_color); [INFO] [stdout] 262 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:265:13 [INFO] [stdout] | [INFO] [stdout] 265 | / if !style["text_outline_style"].is_null() { [INFO] [stdout] 266 | | if let Some(text_outline_style) = [INFO] [stdout] 267 | | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] ... | [INFO] [stdout] 271 | | } [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] 265 ~ if !style["text_outline_style"].is_null() [INFO] [stdout] 266 ~ && let Some(text_outline_style) = [INFO] [stdout] 267 | parse_text_outline_style(&style["text_outline_style"]) [INFO] [stdout] 268 | { [INFO] [stdout] 269 | text.add_style(text_outline_style); [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:335:13 [INFO] [stdout] | [INFO] [stdout] 335 | / if !style["space"].is_null() { [INFO] [stdout] 336 | | if let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 337 | | (line).add_style(space); [INFO] [stdout] 338 | | } [INFO] [stdout] 339 | | } [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] 335 ~ if !style["space"].is_null() [INFO] [stdout] 336 ~ && let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 337 | (line).add_style(space); [INFO] [stdout] 338 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:273:13 [INFO] [stdout] | [INFO] [stdout] 273 | / if !style["text_style"].is_null() { [INFO] [stdout] 274 | | if let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 275 | | text.add_style(text_style); [INFO] [stdout] 276 | | } [INFO] [stdout] 277 | | } [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] 273 ~ if !style["text_style"].is_null() [INFO] [stdout] 274 ~ && let Some(text_style) = parse_text_style(&style["text_style"]) { [INFO] [stdout] 275 | text.add_style(text_style); [INFO] [stdout] 276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:341:13 [INFO] [stdout] | [INFO] [stdout] 341 | / if !style["border_color"].is_null() { [INFO] [stdout] 342 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 343 | | line.add_style(border_color); [INFO] [stdout] 344 | | } [INFO] [stdout] 345 | | } [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] 341 ~ if !style["border_color"].is_null() [INFO] [stdout] 342 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 343 | line.add_style(border_color); [INFO] [stdout] 344 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:279:13 [INFO] [stdout] | [INFO] [stdout] 279 | / if !style["text_wrap"].is_null() { [INFO] [stdout] 280 | | if let Some(text_wrap) = parse_text_wrap(&style["text_wrap"]) { [INFO] [stdout] 281 | | text.add_style(text_wrap); [INFO] [stdout] 282 | | } [INFO] [stdout] 283 | | } [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] 279 ~ if !style["text_wrap"].is_null() [INFO] [stdout] 280 ~ && let Some(text_wrap) = parse_text_wrap(&style["text_wrap"]) { [INFO] [stdout] 281 | text.add_style(text_wrap); [INFO] [stdout] 282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:347:13 [INFO] [stdout] | [INFO] [stdout] 347 | / if !style["border_style"].is_null() { [INFO] [stdout] 348 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 349 | | line.add_style(border_style); [INFO] [stdout] 350 | | } [INFO] [stdout] 351 | | } [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] 347 ~ if !style["border_style"].is_null() [INFO] [stdout] 348 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 349 | line.add_style(border_style); [INFO] [stdout] 350 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:353:13 [INFO] [stdout] | [INFO] [stdout] 353 | / if !style["border_width"].is_null() { [INFO] [stdout] 354 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 355 | | line.add_style(border_width); [INFO] [stdout] 356 | | } [INFO] [stdout] 357 | | } [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] 353 ~ if !style["border_width"].is_null() [INFO] [stdout] 354 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 355 | line.add_style(border_width); [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:302:13 [INFO] [stdout] | [INFO] [stdout] 302 | / if !style["border_color"].is_null() { [INFO] [stdout] 303 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 304 | | image.add_style(border_color); [INFO] [stdout] 305 | | } [INFO] [stdout] 306 | | } [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] 302 ~ if !style["border_color"].is_null() [INFO] [stdout] 303 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 304 | image.add_style(border_color); [INFO] [stdout] 305 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:374:13 [INFO] [stdout] | [INFO] [stdout] 374 | / if !style["background_color"].is_null() { [INFO] [stdout] 375 | | if let Some(background_color) = parse_background_color(&style["background_color"]) { [INFO] [stdout] 376 | | rectangle.add_style(background_color); [INFO] [stdout] 377 | | } [INFO] [stdout] 378 | | } [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] 374 ~ if !style["background_color"].is_null() [INFO] [stdout] 375 ~ && let Some(background_color) = parse_background_color(&style["background_color"]) { [INFO] [stdout] 376 | rectangle.add_style(background_color); [INFO] [stdout] 377 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 308 | / if !style["border_style"].is_null() { [INFO] [stdout] 309 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 310 | | image.add_style(border_style); [INFO] [stdout] 311 | | } [INFO] [stdout] 312 | | } [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] 308 ~ if !style["border_style"].is_null() [INFO] [stdout] 309 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 310 | image.add_style(border_style); [INFO] [stdout] 311 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:380:13 [INFO] [stdout] | [INFO] [stdout] 380 | / if !style["border_color"].is_null() { [INFO] [stdout] 381 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 382 | | rectangle.add_style(border_color); [INFO] [stdout] 383 | | } [INFO] [stdout] 384 | | } [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] 380 ~ if !style["border_color"].is_null() [INFO] [stdout] 381 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 382 | rectangle.add_style(border_color); [INFO] [stdout] 383 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:314:13 [INFO] [stdout] | [INFO] [stdout] 314 | / if !style["border_width"].is_null() { [INFO] [stdout] 315 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 316 | | image.add_style(border_width); [INFO] [stdout] 317 | | } [INFO] [stdout] 318 | | } [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] 314 ~ if !style["border_width"].is_null() [INFO] [stdout] 315 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 316 | image.add_style(border_width); [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:386:13 [INFO] [stdout] | [INFO] [stdout] 386 | / if !style["border_style"].is_null() { [INFO] [stdout] 387 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 388 | | rectangle.add_style(border_style); [INFO] [stdout] 389 | | } [INFO] [stdout] 390 | | } [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] 386 ~ if !style["border_style"].is_null() [INFO] [stdout] 387 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 388 | rectangle.add_style(border_style); [INFO] [stdout] 389 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:335:13 [INFO] [stdout] | [INFO] [stdout] 335 | / if !style["space"].is_null() { [INFO] [stdout] 336 | | if let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 337 | | (line).add_style(space); [INFO] [stdout] 338 | | } [INFO] [stdout] 339 | | } [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] 335 ~ if !style["space"].is_null() [INFO] [stdout] 336 ~ && let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 337 | (line).add_style(space); [INFO] [stdout] 338 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | / if !style["border_width"].is_null() { [INFO] [stdout] 393 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 394 | | rectangle.add_style(border_width); [INFO] [stdout] 395 | | } [INFO] [stdout] 396 | | } [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] 392 ~ if !style["border_width"].is_null() [INFO] [stdout] 393 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 394 | rectangle.add_style(border_width); [INFO] [stdout] 395 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:341:13 [INFO] [stdout] | [INFO] [stdout] 341 | / if !style["border_color"].is_null() { [INFO] [stdout] 342 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 343 | | line.add_style(border_color); [INFO] [stdout] 344 | | } [INFO] [stdout] 345 | | } [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] 341 ~ if !style["border_color"].is_null() [INFO] [stdout] 342 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 343 | line.add_style(border_color); [INFO] [stdout] 344 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:405:17 [INFO] [stdout] | [INFO] [stdout] 405 | / if !style["space"].is_null() { [INFO] [stdout] 406 | | if let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 407 | | wrapper.add_style(space); [INFO] [stdout] 408 | | } [INFO] [stdout] 409 | | } [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] 405 ~ if !style["space"].is_null() [INFO] [stdout] 406 ~ && let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 407 | wrapper.add_style(space); [INFO] [stdout] 408 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:347:13 [INFO] [stdout] | [INFO] [stdout] 347 | / if !style["border_style"].is_null() { [INFO] [stdout] 348 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 349 | | line.add_style(border_style); [INFO] [stdout] 350 | | } [INFO] [stdout] 351 | | } [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] 347 ~ if !style["border_style"].is_null() [INFO] [stdout] 348 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 349 | line.add_style(border_style); [INFO] [stdout] 350 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:353:13 [INFO] [stdout] | [INFO] [stdout] 353 | / if !style["border_width"].is_null() { [INFO] [stdout] 354 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 355 | | line.add_style(border_width); [INFO] [stdout] 356 | | } [INFO] [stdout] 357 | | } [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] 353 ~ if !style["border_width"].is_null() [INFO] [stdout] 354 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 355 | line.add_style(border_width); [INFO] [stdout] 356 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:374:13 [INFO] [stdout] | [INFO] [stdout] 374 | / if !style["background_color"].is_null() { [INFO] [stdout] 375 | | if let Some(background_color) = parse_background_color(&style["background_color"]) { [INFO] [stdout] 376 | | rectangle.add_style(background_color); [INFO] [stdout] 377 | | } [INFO] [stdout] 378 | | } [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] 374 ~ if !style["background_color"].is_null() [INFO] [stdout] 375 ~ && let Some(background_color) = parse_background_color(&style["background_color"]) { [INFO] [stdout] 376 | rectangle.add_style(background_color); [INFO] [stdout] 377 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:380:13 [INFO] [stdout] | [INFO] [stdout] 380 | / if !style["border_color"].is_null() { [INFO] [stdout] 381 | | if let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 382 | | rectangle.add_style(border_color); [INFO] [stdout] 383 | | } [INFO] [stdout] 384 | | } [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] 380 ~ if !style["border_color"].is_null() [INFO] [stdout] 381 ~ && let Some(border_color) = parse_border_color(&style["border_color"]) { [INFO] [stdout] 382 | rectangle.add_style(border_color); [INFO] [stdout] 383 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:386:13 [INFO] [stdout] | [INFO] [stdout] 386 | / if !style["border_style"].is_null() { [INFO] [stdout] 387 | | if let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 388 | | rectangle.add_style(border_style); [INFO] [stdout] 389 | | } [INFO] [stdout] 390 | | } [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] 386 ~ if !style["border_style"].is_null() [INFO] [stdout] 387 ~ && let Some(border_style) = parse_border_style(&style["border_style"]) { [INFO] [stdout] 388 | rectangle.add_style(border_style); [INFO] [stdout] 389 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | / if !style["border_width"].is_null() { [INFO] [stdout] 393 | | if let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 394 | | rectangle.add_style(border_width); [INFO] [stdout] 395 | | } [INFO] [stdout] 396 | | } [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] 392 ~ if !style["border_width"].is_null() [INFO] [stdout] 393 ~ && let Some(border_width) = parse_border_width(&style["border_width"]) { [INFO] [stdout] 394 | rectangle.add_style(border_width); [INFO] [stdout] 395 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/document_json.rs:405:17 [INFO] [stdout] | [INFO] [stdout] 405 | / if !style["space"].is_null() { [INFO] [stdout] 406 | | if let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 407 | | wrapper.add_style(space); [INFO] [stdout] 408 | | } [INFO] [stdout] 409 | | } [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] 405 ~ if !style["space"].is_null() [INFO] [stdout] 406 ~ && let Some(space) = parse_space(&style["space"]) { [INFO] [stdout] 407 | wrapper.add_style(space); [INFO] [stdout] 408 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/block_document/pdf_writer.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | let text = format!( [INFO] [stdout] | ________________^ [INFO] [stdout] 169 | | "{}", [INFO] [stdout] 170 | | page_number.format [INFO] [stdout] 171 | | .replace(CURRENT_PAGE_NUMBER_PLACEHOLDER, current_page_number.to_string().as_str()) [INFO] [stdout] 172 | | .replace(TOTAL_PAGES_PLACEHOLDER, total_pages.to_string().as_str()), [INFO] [stdout] 173 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 168 ~ let text = page_number.format [INFO] [stdout] 169 + .replace(CURRENT_PAGE_NUMBER_PLACEHOLDER, current_page_number.to_string().as_str()) [INFO] [stdout] 170 ~ .replace(TOTAL_PAGES_PLACEHOLDER, total_pages.to_string().as_str()).to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/pdf_writer.rs:270:5 [INFO] [stdout] | [INFO] [stdout] 270 | / if let Some(frame) = &block_rectangle.frame { [INFO] [stdout] 271 | | if frame.point.is_some() { [INFO] [stdout] 272 | | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... | [INFO] [stdout] 346 | | } [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] 270 ~ if let Some(frame) = &block_rectangle.frame [INFO] [stdout] 271 ~ && frame.point.is_some() { [INFO] [stdout] 272 | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... [INFO] [stdout] 344 | } [INFO] [stdout] 345 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:301:57 [INFO] [stdout] | [INFO] [stdout] 301 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 302 | | BorderStyle::Dash(i) => { [INFO] [stdout] 303 | | border_required = true; [INFO] [stdout] 304 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 309 | | _ => {} [INFO] [stdout] 310 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:301:40 [INFO] [stdout] | [INFO] [stdout] 301 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 302 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/block_document/pdf_writer.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | let text = format!( [INFO] [stdout] | ________________^ [INFO] [stdout] 169 | | "{}", [INFO] [stdout] 170 | | page_number.format [INFO] [stdout] 171 | | .replace(CURRENT_PAGE_NUMBER_PLACEHOLDER, current_page_number.to_string().as_str()) [INFO] [stdout] 172 | | .replace(TOTAL_PAGES_PLACEHOLDER, total_pages.to_string().as_str()), [INFO] [stdout] 173 | | ); [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 168 ~ let text = page_number.format [INFO] [stdout] 169 + .replace(CURRENT_PAGE_NUMBER_PLACEHOLDER, current_page_number.to_string().as_str()) [INFO] [stdout] 170 ~ .replace(TOTAL_PAGES_PLACEHOLDER, total_pages.to_string().as_str()).to_string(); [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/block_document/pdf_writer.rs:301:57 [INFO] [stdout] | [INFO] [stdout] 301 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 302 | | BorderStyle::Dash(i) => { [INFO] [stdout] 303 | | border_required = true; [INFO] [stdout] 304 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 309 | | _ => {} [INFO] [stdout] 310 | | }, [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] 301 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 302 + border_required = true; [INFO] [stdout] 303 + layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 304 + dash_1: Some(*i), [INFO] [stdout] 305 + ..Default::default() [INFO] [stdout] 306 + }); [INFO] [stdout] 307 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:372:49 [INFO] [stdout] | [INFO] [stdout] 372 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 373 | | BorderStyle::Dash(i) => { [INFO] [stdout] 374 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 375 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 379 | | _ => {} [INFO] [stdout] 380 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:372:32 [INFO] [stdout] | [INFO] [stdout] 372 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 373 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:372:49 [INFO] [stdout] | [INFO] [stdout] 372 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 373 | | BorderStyle::Dash(i) => { [INFO] [stdout] 374 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 375 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 379 | | _ => {} [INFO] [stdout] 380 | | }, [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] 372 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 373 + layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 374 + dash_1: Some(*i), [INFO] [stdout] 375 + ..Default::default() [INFO] [stdout] 376 + }); [INFO] [stdout] 377 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/pdf_writer.rs:270:5 [INFO] [stdout] | [INFO] [stdout] 270 | / if let Some(frame) = &block_rectangle.frame { [INFO] [stdout] 271 | | if frame.point.is_some() { [INFO] [stdout] 272 | | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... | [INFO] [stdout] 346 | | } [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] 270 ~ if let Some(frame) = &block_rectangle.frame [INFO] [stdout] 271 ~ && frame.point.is_some() { [INFO] [stdout] 272 | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... [INFO] [stdout] 344 | } [INFO] [stdout] 345 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:301:57 [INFO] [stdout] | [INFO] [stdout] 301 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 302 | | BorderStyle::Dash(i) => { [INFO] [stdout] 303 | | border_required = true; [INFO] [stdout] 304 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 309 | | _ => {} [INFO] [stdout] 310 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:301:40 [INFO] [stdout] | [INFO] [stdout] 301 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 302 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/pdf_writer.rs:423:5 [INFO] [stdout] | [INFO] [stdout] 423 | / if let Some(frame) = &block_text.frame { [INFO] [stdout] 424 | | if frame.point.is_some() { [INFO] [stdout] 425 | | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... | [INFO] [stdout] 673 | | } [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] 423 ~ if let Some(frame) = &block_text.frame [INFO] [stdout] 424 ~ && frame.point.is_some() { [INFO] [stdout] 425 | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... [INFO] [stdout] 671 | } [INFO] [stdout] 672 ~ } [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/block_document/pdf_writer.rs:301:57 [INFO] [stdout] | [INFO] [stdout] 301 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 302 | | BorderStyle::Dash(i) => { [INFO] [stdout] 303 | | border_required = true; [INFO] [stdout] 304 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 309 | | _ => {} [INFO] [stdout] 310 | | }, [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] 301 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 302 + border_required = true; [INFO] [stdout] 303 + layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 304 + dash_1: Some(*i), [INFO] [stdout] 305 + ..Default::default() [INFO] [stdout] 306 + }); [INFO] [stdout] 307 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:458:57 [INFO] [stdout] | [INFO] [stdout] 458 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 459 | | BorderStyle::Dash(i) => { [INFO] [stdout] 460 | | border_required = true; [INFO] [stdout] 461 | | layer1.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 466 | | _ => {} [INFO] [stdout] 467 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:458:40 [INFO] [stdout] | [INFO] [stdout] 458 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 459 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:436:25 [INFO] [stdout] | [INFO] [stdout] 436 | / match alignment.horizontal.as_ref() { [INFO] [stdout] 437 | | Some(h_a) => h_alignment = Some(h_a), [INFO] [stdout] 438 | | _ => {} [INFO] [stdout] 439 | | } [INFO] [stdout] | |_________________________^ help: try: `if let Some(h_a) = alignment.horizontal.as_ref() { h_alignment = Some(h_a) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/block_document/pdf_writer.rs:440:25 [INFO] [stdout] | [INFO] [stdout] 440 | / match alignment.vertical.as_ref() { [INFO] [stdout] 441 | | Some(v_a) => v_alignment = Some(v_a), [INFO] [stdout] 442 | | _ => {} [INFO] [stdout] 443 | | } [INFO] [stdout] | |_________________________^ help: try: `if let Some(v_a) = alignment.vertical.as_ref() { v_alignment = Some(v_a) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/block_document/pdf_writer.rs:458:57 [INFO] [stdout] | [INFO] [stdout] 458 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 459 | | BorderStyle::Dash(i) => { [INFO] [stdout] 460 | | border_required = true; [INFO] [stdout] 461 | | layer1.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 466 | | _ => {} [INFO] [stdout] 467 | | }, [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] 458 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 459 + border_required = true; [INFO] [stdout] 460 + layer1.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 461 + dash_1: Some(*i), [INFO] [stdout] 462 + ..Default::default() [INFO] [stdout] 463 + }); [INFO] [stdout] 464 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:372:49 [INFO] [stdout] | [INFO] [stdout] 372 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 373 | | BorderStyle::Dash(i) => { [INFO] [stdout] 374 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 375 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 379 | | _ => {} [INFO] [stdout] 380 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:372:32 [INFO] [stdout] | [INFO] [stdout] 372 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 373 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:372:49 [INFO] [stdout] | [INFO] [stdout] 372 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 373 | | BorderStyle::Dash(i) => { [INFO] [stdout] 374 | | layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 375 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 379 | | _ => {} [INFO] [stdout] 380 | | }, [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] 372 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 373 + layer.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 374 + dash_1: Some(*i), [INFO] [stdout] 375 + ..Default::default() [INFO] [stdout] 376 + }); [INFO] [stdout] 377 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:586:68 [INFO] [stdout] | [INFO] [stdout] 586 | Style::TextOutlineStyle(text_outline_style) => match text_outline_style { [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 587 | | TextOutlineStyle::Dash(i) => { [INFO] [stdout] 588 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 589 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 593 | | _ => {} [INFO] [stdout] 594 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:586:45 [INFO] [stdout] | [INFO] [stdout] 586 | Style::TextOutlineStyle(text_outline_style) => match text_outline_style { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 587 | TextOutlineStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:586:68 [INFO] [stdout] | [INFO] [stdout] 586 | Style::TextOutlineStyle(text_outline_style) => match text_outline_style { [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 587 | | TextOutlineStyle::Dash(i) => { [INFO] [stdout] 588 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 589 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 593 | | _ => {} [INFO] [stdout] 594 | | }, [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] 586 ~ Style::TextOutlineStyle(text_outline_style) => if let TextOutlineStyle::Dash(i) = text_outline_style { [INFO] [stdout] 587 + layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 588 + dash_1: Some(*i), [INFO] [stdout] 589 + ..Default::default() [INFO] [stdout] 590 + }); [INFO] [stdout] 591 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/pdf_writer.rs:423:5 [INFO] [stdout] | [INFO] [stdout] 423 | / if let Some(frame) = &block_text.frame { [INFO] [stdout] 424 | | if frame.point.is_some() { [INFO] [stdout] 425 | | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... | [INFO] [stdout] 673 | | } [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] 423 ~ if let Some(frame) = &block_text.frame [INFO] [stdout] 424 ~ && frame.point.is_some() { [INFO] [stdout] 425 | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... [INFO] [stdout] 671 | } [INFO] [stdout] 672 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:458:57 [INFO] [stdout] | [INFO] [stdout] 458 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 459 | | BorderStyle::Dash(i) => { [INFO] [stdout] 460 | | border_required = true; [INFO] [stdout] 461 | | layer1.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 466 | | _ => {} [INFO] [stdout] 467 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:458:40 [INFO] [stdout] | [INFO] [stdout] 458 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 459 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:436:25 [INFO] [stdout] | [INFO] [stdout] 436 | / match alignment.horizontal.as_ref() { [INFO] [stdout] 437 | | Some(h_a) => h_alignment = Some(h_a), [INFO] [stdout] 438 | | _ => {} [INFO] [stdout] 439 | | } [INFO] [stdout] | |_________________________^ help: try: `if let Some(h_a) = alignment.horizontal.as_ref() { h_alignment = Some(h_a) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/block_document/pdf_writer.rs:440:25 [INFO] [stdout] | [INFO] [stdout] 440 | / match alignment.vertical.as_ref() { [INFO] [stdout] 441 | | Some(v_a) => v_alignment = Some(v_a), [INFO] [stdout] 442 | | _ => {} [INFO] [stdout] 443 | | } [INFO] [stdout] | |_________________________^ help: try: `if let Some(v_a) = alignment.vertical.as_ref() { v_alignment = Some(v_a) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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/block_document/pdf_writer.rs:458:57 [INFO] [stdout] | [INFO] [stdout] 458 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 459 | | BorderStyle::Dash(i) => { [INFO] [stdout] 460 | | border_required = true; [INFO] [stdout] 461 | | layer1.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 466 | | _ => {} [INFO] [stdout] 467 | | }, [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] 458 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 459 + border_required = true; [INFO] [stdout] 460 + layer1.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 461 + dash_1: Some(*i), [INFO] [stdout] 462 + ..Default::default() [INFO] [stdout] 463 + }); [INFO] [stdout] 464 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/pdf_writer.rs:695:5 [INFO] [stdout] | [INFO] [stdout] 695 | / if let Some(frame) = &block_image.frame { [INFO] [stdout] 696 | | if frame.point.is_some() { [INFO] [stdout] 697 | | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... | [INFO] [stdout] 776 | | } [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] 695 ~ if let Some(frame) = &block_image.frame [INFO] [stdout] 696 ~ && frame.point.is_some() { [INFO] [stdout] 697 | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... [INFO] [stdout] 774 | } [INFO] [stdout] 775 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:586:68 [INFO] [stdout] | [INFO] [stdout] 586 | Style::TextOutlineStyle(text_outline_style) => match text_outline_style { [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 587 | | TextOutlineStyle::Dash(i) => { [INFO] [stdout] 588 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 589 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 593 | | _ => {} [INFO] [stdout] 594 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:586:45 [INFO] [stdout] | [INFO] [stdout] 586 | Style::TextOutlineStyle(text_outline_style) => match text_outline_style { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 587 | TextOutlineStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:738:57 [INFO] [stdout] | [INFO] [stdout] 738 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 739 | | BorderStyle::Dash(i) => { [INFO] [stdout] 740 | | border_required = true; [INFO] [stdout] 741 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 746 | | _ => {} [INFO] [stdout] 747 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:738:40 [INFO] [stdout] | [INFO] [stdout] 738 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 739 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:738:57 [INFO] [stdout] | [INFO] [stdout] 738 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 739 | | BorderStyle::Dash(i) => { [INFO] [stdout] 740 | | border_required = true; [INFO] [stdout] 741 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 746 | | _ => {} [INFO] [stdout] 747 | | }, [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] 738 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 739 + border_required = true; [INFO] [stdout] 740 + layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 741 + dash_1: Some(*i), [INFO] [stdout] 742 + ..Default::default() [INFO] [stdout] 743 + }); [INFO] [stdout] 744 ~ }, [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/block_document/pdf_writer.rs:586:68 [INFO] [stdout] | [INFO] [stdout] 586 | Style::TextOutlineStyle(text_outline_style) => match text_outline_style { [INFO] [stdout] | ____________________________________________________________________^ [INFO] [stdout] 587 | | TextOutlineStyle::Dash(i) => { [INFO] [stdout] 588 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 589 | | dash_1: Some(*i), [INFO] [stdout] ... | [INFO] [stdout] 593 | | _ => {} [INFO] [stdout] 594 | | }, [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] 586 ~ Style::TextOutlineStyle(text_outline_style) => if let TextOutlineStyle::Dash(i) = text_outline_style { [INFO] [stdout] 587 + layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 588 + dash_1: Some(*i), [INFO] [stdout] 589 + ..Default::default() [INFO] [stdout] 590 + }); [INFO] [stdout] 591 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/pdf_writer.rs:695:5 [INFO] [stdout] | [INFO] [stdout] 695 | / if let Some(frame) = &block_image.frame { [INFO] [stdout] 696 | | if frame.point.is_some() { [INFO] [stdout] 697 | | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... | [INFO] [stdout] 776 | | } [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] 695 ~ if let Some(frame) = &block_image.frame [INFO] [stdout] 696 ~ && frame.point.is_some() { [INFO] [stdout] 697 | let lb_frame = frame.transform(geo_frame); [INFO] [stdout] ... [INFO] [stdout] 774 | } [INFO] [stdout] 775 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/pdf_writer.rs:738:57 [INFO] [stdout] | [INFO] [stdout] 738 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 739 | | BorderStyle::Dash(i) => { [INFO] [stdout] 740 | | border_required = true; [INFO] [stdout] 741 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 746 | | _ => {} [INFO] [stdout] 747 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/block_document/pdf_writer.rs:738:40 [INFO] [stdout] | [INFO] [stdout] 738 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | ^^^^^^^^^^^^ replace this binding [INFO] [stdout] 739 | BorderStyle::Dash(i) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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/block_document/pdf_writer.rs:738:57 [INFO] [stdout] | [INFO] [stdout] 738 | Style::BorderStyle(border_style) => match border_style { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 739 | | BorderStyle::Dash(i) => { [INFO] [stdout] 740 | | border_required = true; [INFO] [stdout] 741 | | layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] ... | [INFO] [stdout] 746 | | _ => {} [INFO] [stdout] 747 | | }, [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] 738 ~ Style::BorderStyle(border_style) => if let BorderStyle::Dash(i) = border_style { [INFO] [stdout] 739 + border_required = true; [INFO] [stdout] 740 + layer2.set_line_dash_pattern(LineDashPattern { [INFO] [stdout] 741 + dash_1: Some(*i), [INFO] [stdout] 742 + ..Default::default() [INFO] [stdout] 743 + }); [INFO] [stdout] 744 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/text.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if let Some(frame) = &self.frame { [INFO] [stdout] 65 | | if frame.size.is_some() { [INFO] [stdout] 66 | | let wrap = self.get_text_wrap(); [INFO] [stdout] 67 | | return !matches!(wrap.mode, crate::block_document::style::TextWrapMode::None); [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [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] 64 ~ if let Some(frame) = &self.frame [INFO] [stdout] 65 ~ && frame.size.is_some() { [INFO] [stdout] 66 | let wrap = self.get_text_wrap(); [INFO] [stdout] 67 | return !matches!(wrap.mode, crate::block_document::style::TextWrapMode::None); [INFO] [stdout] 68 ~ } [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/block_document/text_renderer.rs:23:27 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn measure_text(text: &String, font_size: f32, font_path: &String) -> GeoSize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - pub fn measure_text(text: &String, font_size: f32, font_path: &String) -> GeoSize { [INFO] [stdout] 23 + pub fn measure_text(text: &str, font_size: f32, font_path: &String) -> GeoSize { [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/block_document/text_renderer.rs:83:11 [INFO] [stdout] | [INFO] [stdout] 83 | text: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 83 - text: &String, [INFO] [stdout] 83 + text: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/text.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / if let Some(frame) = &self.frame { [INFO] [stdout] 65 | | if frame.size.is_some() { [INFO] [stdout] 66 | | let wrap = self.get_text_wrap(); [INFO] [stdout] 67 | | return !matches!(wrap.mode, crate::block_document::style::TextWrapMode::None); [INFO] [stdout] 68 | | } [INFO] [stdout] 69 | | } [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] 64 ~ if let Some(frame) = &self.frame [INFO] [stdout] 65 ~ && frame.size.is_some() { [INFO] [stdout] 66 | let wrap = self.get_text_wrap(); [INFO] [stdout] 67 | return !matches!(wrap.mode, crate::block_document::style::TextWrapMode::None); [INFO] [stdout] 68 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/block_document/text_renderer.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / if matches!(text_wrap.overflow, TextOverflow::Ellipsis) && !lines.is_empty() { [INFO] [stdout] 191 | | if let Some(last_line) = lines.last_mut() { [INFO] [stdout] 192 | | last_line.text = truncate_with_ellipsis( [INFO] [stdout] 193 | | &last_line.text, [INFO] [stdout] ... | [INFO] [stdout] 200 | | } [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] 190 ~ if matches!(text_wrap.overflow, TextOverflow::Ellipsis) && !lines.is_empty() [INFO] [stdout] 191 ~ && let Some(last_line) = lines.last_mut() { [INFO] [stdout] 192 | last_line.text = truncate_with_ellipsis( [INFO] [stdout] ... [INFO] [stdout] 198 | last_line.size = measure_text(&last_line.text, font_size, font_path); [INFO] [stdout] 199 ~ } [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/block_document/text_renderer.rs:23:27 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn measure_text(text: &String, font_size: f32, font_path: &String) -> GeoSize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - pub fn measure_text(text: &String, font_size: f32, font_path: &String) -> GeoSize { [INFO] [stdout] 23 + pub fn measure_text(text: &str, font_size: f32, font_path: &String) -> GeoSize { [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/block_document/text_renderer.rs:83:11 [INFO] [stdout] | [INFO] [stdout] 83 | text: &String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 83 - text: &String, [INFO] [stdout] 83 + text: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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` statement can be collapsed [INFO] [stdout] --> src/block_document/text_renderer.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / if matches!(text_wrap.overflow, TextOverflow::Ellipsis) && !lines.is_empty() { [INFO] [stdout] 191 | | if let Some(last_line) = lines.last_mut() { [INFO] [stdout] 192 | | last_line.text = truncate_with_ellipsis( [INFO] [stdout] 193 | | &last_line.text, [INFO] [stdout] ... | [INFO] [stdout] 200 | | } [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] 190 ~ if matches!(text_wrap.overflow, TextOverflow::Ellipsis) && !lines.is_empty() [INFO] [stdout] 191 ~ && let Some(last_line) = lines.last_mut() { [INFO] [stdout] 192 | last_line.text = truncate_with_ellipsis( [INFO] [stdout] ... [INFO] [stdout] 198 | last_line.size = measure_text(&last_line.text, font_size, font_path); [INFO] [stdout] 199 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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/block_document/dynamic_page.rs:163:12 [INFO] [stdout] | [INFO] [stdout] 163 | if content_blocks.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!content_blocks.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: called `unwrap` on `block_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/dynamic_page.rs:194:29 [INFO] [stdout] | [INFO] [stdout] 185 | if block_container.frame.is_some() [INFO] [stdout] | ------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 194 | block_container.frame.as_ref().unwrap(), // NOTE: 合ってないかも... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/dynamic_page.rs:352:29 [INFO] [stdout] | [INFO] [stdout] 348 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 352 | width = flexible_container.frame.as_ref().unwrap().width(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/dynamic_page.rs:353:30 [INFO] [stdout] | [INFO] [stdout] 348 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 353 | height = flexible_container.frame.as_ref().unwrap().height(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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/block_document/dynamic_page.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | / match style { [INFO] [stdout] 291 | | Style::Space(space) => { [INFO] [stdout] 292 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 295 | | } [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] 290 ~ if let Style::Space(space) = style { [INFO] [stdout] 291 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 292 + } [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/block_document/dynamic_page.rs:328:25 [INFO] [stdout] | [INFO] [stdout] 328 | / match style { [INFO] [stdout] 329 | | Style::Space(space) => { [INFO] [stdout] 330 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 333 | | } [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] 328 ~ if let Style::Space(space) = style { [INFO] [stdout] 329 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 330 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | &parent_frame, [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `parent_frame` [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/block_document/dynamic_page.rs:365:21 [INFO] [stdout] | [INFO] [stdout] 365 | / match block { [INFO] [stdout] 366 | | Block::FlexibleItem(flexible_item) => { [INFO] [stdout] 367 | | if let Some(basis) = flexible_item.basis { [INFO] [stdout] 368 | | item_width = width * (basis / 100.0); [INFO] [stdout] ... | [INFO] [stdout] 391 | | _ => {} [INFO] [stdout] 392 | | } [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] 365 ~ if let Block::FlexibleItem(flexible_item) = block { [INFO] [stdout] 366 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 367 + item_width = width * (basis / 100.0); [INFO] [stdout] 368 + } [INFO] [stdout] 369 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 370 + item_height = height * (basis / 100.0); [INFO] [stdout] 371 + } [INFO] [stdout] 372 + [INFO] [stdout] 373 + flexible_item.set_frame(match flexible_container.direction { [INFO] [stdout] 374 + Direction::Horizontal => GeoRect { [INFO] [stdout] 375 + point: Some(GeoPoint { x: item_x, y: 0.0 }), [INFO] [stdout] 376 + size: Some(GeoSize { [INFO] [stdout] 377 + width: item_width, [INFO] [stdout] 378 + height: 0.0, [INFO] [stdout] 379 + }), [INFO] [stdout] 380 + }, [INFO] [stdout] 381 + Direction::Vertical => GeoRect { [INFO] [stdout] 382 + point: Some(GeoPoint { x: 0.0, y: item_y }), [INFO] [stdout] 383 + size: Some(GeoSize { [INFO] [stdout] 384 + width: 0.0, [INFO] [stdout] 385 + height: item_height, [INFO] [stdout] 386 + }), [INFO] [stdout] 387 + }, [INFO] [stdout] 388 + }); [INFO] [stdout] 389 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/block_document/dynamic_page.rs:163:12 [INFO] [stdout] | [INFO] [stdout] 163 | if content_blocks.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!content_blocks.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: called `unwrap` on `block_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/dynamic_page.rs:194:29 [INFO] [stdout] | [INFO] [stdout] 185 | if block_container.frame.is_some() [INFO] [stdout] | ------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 194 | block_container.frame.as_ref().unwrap(), // NOTE: 合ってないかも... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/dynamic_page.rs:352:29 [INFO] [stdout] | [INFO] [stdout] 348 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 352 | width = flexible_container.frame.as_ref().unwrap().width(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `flexible_container.frame` after checking its variant with `is_some` [INFO] [stdout] --> src/block_document/dynamic_page.rs:353:30 [INFO] [stdout] | [INFO] [stdout] 348 | if flexible_container.frame.is_some() [INFO] [stdout] | ---------------------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 353 | height = flexible_container.frame.as_ref().unwrap().height(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/block_document/dynamic_page.rs:461:21 [INFO] [stdout] | [INFO] [stdout] 461 | / match block { [INFO] [stdout] 462 | | Block::Text(block_text) => { [INFO] [stdout] 463 | | let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 464 | | match text_wrap.mode { [INFO] [stdout] ... | [INFO] [stdout] 478 | | _ => {} [INFO] [stdout] 479 | | } [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] 461 ~ if let Block::Text(block_text) = block { [INFO] [stdout] 462 + let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 463 + match text_wrap.mode { [INFO] [stdout] 464 + TextWrapMode::Word => { [INFO] [stdout] 465 + if block_text.frame.is_none() { [INFO] [stdout] 466 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 467 + } [INFO] [stdout] 468 + } [INFO] [stdout] 469 + TextWrapMode::Character => { [INFO] [stdout] 470 + if block_text.frame.is_none() { [INFO] [stdout] 471 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 472 + } [INFO] [stdout] 473 + } [INFO] [stdout] 474 + _ => {} [INFO] [stdout] 475 + } [INFO] [stdout] 476 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/dynamic_page.rs:466:37 [INFO] [stdout] | [INFO] [stdout] 466 | / ... if block_text.frame.is_none() { [INFO] [stdout] 467 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 468 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 465 ~ TextWrapMode::Word [INFO] [stdout] 466 ~ if block_text.frame.is_none() => { [INFO] [stdout] 467 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/dynamic_page.rs:471:37 [INFO] [stdout] | [INFO] [stdout] 471 | / ... if block_text.frame.is_none() { [INFO] [stdout] 472 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 473 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 470 ~ TextWrapMode::Character [INFO] [stdout] 471 ~ if block_text.frame.is_none() => { [INFO] [stdout] 472 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 473 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | &drawn_frame, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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/block_document/dynamic_page.rs:588:68 [INFO] [stdout] | [INFO] [stdout] 588 | Self::calculate_image_constraints(block_image, &drawn_frame, direction); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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/block_document/dynamic_page.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | / match style { [INFO] [stdout] 291 | | Style::Space(space) => { [INFO] [stdout] 292 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 295 | | } [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] 290 ~ if let Style::Space(space) = style { [INFO] [stdout] 291 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 292 + } [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/block_document/dynamic_page.rs:602:25 [INFO] [stdout] | [INFO] [stdout] 602 | / match style { [INFO] [stdout] 603 | | Style::Space(space) => { [INFO] [stdout] 604 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 607 | | } [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] 602 ~ if let Style::Space(space) = style { [INFO] [stdout] 603 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 604 + } [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/block_document/dynamic_page.rs:328:25 [INFO] [stdout] | [INFO] [stdout] 328 | / match style { [INFO] [stdout] 329 | | Style::Space(space) => { [INFO] [stdout] 330 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 333 | | } [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] 328 ~ if let Style::Space(space) = style { [INFO] [stdout] 329 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 330 + } [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/block_document/dynamic_page.rs:630:21 [INFO] [stdout] | [INFO] [stdout] 630 | / match style { [INFO] [stdout] 631 | | Style::Space(space) => { [INFO] [stdout] 632 | | frame = frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 635 | | } [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] 630 ~ if let Style::Space(space) = style { [INFO] [stdout] 631 + frame = frame.padding(space); [INFO] [stdout] 632 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `image::ImageError` [INFO] [stdout] --> src/block_document/dynamic_page.rs:649:45 [INFO] [stdout] | [INFO] [stdout] 649 | .map(|image| image.dimensions()) [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] | |_____________________________________________| [INFO] [stdout] 650 | || .map_err(ImageError::from) [INFO] [stdout] | ||______________________________________^ [INFO] [stdout] 651 | | } [INFO] [stdout] | |_____- help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/block_document/dynamic_page.rs:647:22 [INFO] [stdout] | [INFO] [stdout] 647 | .map_err(|e| ImageError::from(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ImageError::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/block_document/dynamic_page.rs:365:21 [INFO] [stdout] | [INFO] [stdout] 365 | / match block { [INFO] [stdout] 366 | | Block::FlexibleItem(flexible_item) => { [INFO] [stdout] 367 | | if let Some(basis) = flexible_item.basis { [INFO] [stdout] 368 | | item_width = width * (basis / 100.0); [INFO] [stdout] ... | [INFO] [stdout] 391 | | _ => {} [INFO] [stdout] 392 | | } [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] 365 ~ if let Block::FlexibleItem(flexible_item) = block { [INFO] [stdout] 366 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 367 + item_width = width * (basis / 100.0); [INFO] [stdout] 368 + } [INFO] [stdout] 369 + if let Some(basis) = flexible_item.basis { [INFO] [stdout] 370 + item_height = height * (basis / 100.0); [INFO] [stdout] 371 + } [INFO] [stdout] 372 + [INFO] [stdout] 373 + flexible_item.set_frame(match flexible_container.direction { [INFO] [stdout] 374 + Direction::Horizontal => GeoRect { [INFO] [stdout] 375 + point: Some(GeoPoint { x: item_x, y: 0.0 }), [INFO] [stdout] 376 + size: Some(GeoSize { [INFO] [stdout] 377 + width: item_width, [INFO] [stdout] 378 + height: 0.0, [INFO] [stdout] 379 + }), [INFO] [stdout] 380 + }, [INFO] [stdout] 381 + Direction::Vertical => GeoRect { [INFO] [stdout] 382 + point: Some(GeoPoint { x: 0.0, y: item_y }), [INFO] [stdout] 383 + size: Some(GeoSize { [INFO] [stdout] 384 + width: 0.0, [INFO] [stdout] 385 + height: item_height, [INFO] [stdout] 386 + }), [INFO] [stdout] 387 + }, [INFO] [stdout] 388 + }); [INFO] [stdout] 389 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:681:12 [INFO] [stdout] | [INFO] [stdout] 681 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 682 | | .frame [INFO] [stdout] 683 | | .as_ref() [INFO] [stdout] 684 | | .map_or(true, |b| b.size.is_none()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 684 - .map_or(true, |b| b.size.is_none()) [INFO] [stdout] 684 + .is_none_or(|b| b.size.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:701:12 [INFO] [stdout] | [INFO] [stdout] 701 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 702 | | .frame [INFO] [stdout] 703 | | .as_ref() [INFO] [stdout] 704 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 704 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 704 + .is_none_or(|b| b.point.is_none()) [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/block_document/dynamic_page.rs:461:21 [INFO] [stdout] | [INFO] [stdout] 461 | / match block { [INFO] [stdout] 462 | | Block::Text(block_text) => { [INFO] [stdout] 463 | | let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 464 | | match text_wrap.mode { [INFO] [stdout] ... | [INFO] [stdout] 478 | | _ => {} [INFO] [stdout] 479 | | } [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] 461 ~ if let Block::Text(block_text) = block { [INFO] [stdout] 462 + let text_wrap = block_text.get_text_wrap(); [INFO] [stdout] 463 + match text_wrap.mode { [INFO] [stdout] 464 + TextWrapMode::Word => { [INFO] [stdout] 465 + if block_text.frame.is_none() { [INFO] [stdout] 466 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 467 + } [INFO] [stdout] 468 + } [INFO] [stdout] 469 + TextWrapMode::Character => { [INFO] [stdout] 470 + if block_text.frame.is_none() { [INFO] [stdout] 471 + block_text.set_wrap_width(frame.width()); [INFO] [stdout] 472 + } [INFO] [stdout] 473 + } [INFO] [stdout] 474 + _ => {} [INFO] [stdout] 475 + } [INFO] [stdout] 476 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/dynamic_page.rs:466:37 [INFO] [stdout] | [INFO] [stdout] 466 | / ... if block_text.frame.is_none() { [INFO] [stdout] 467 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 468 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 465 ~ TextWrapMode::Word [INFO] [stdout] 466 ~ if block_text.frame.is_none() => { [INFO] [stdout] 467 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/block_document/dynamic_page.rs:471:37 [INFO] [stdout] | [INFO] [stdout] 471 | / ... if block_text.frame.is_none() { [INFO] [stdout] 472 | | ... block_text.set_wrap_width(frame.width()); [INFO] [stdout] 473 | | ... } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 470 ~ TextWrapMode::Character [INFO] [stdout] 471 ~ if block_text.frame.is_none() => { [INFO] [stdout] 472 | block_text.set_wrap_width(frame.width()); [INFO] [stdout] 473 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:808:12 [INFO] [stdout] | [INFO] [stdout] 808 | if block_text.frame.as_ref().map_or(true, |b| b.size.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 808 - if block_text.frame.as_ref().map_or(true, |b| b.size.is_none()) { [INFO] [stdout] 808 + if block_text.frame.as_ref().is_none_or(|b| b.size.is_none()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:554:21 [INFO] [stdout] | [INFO] [stdout] 554 | &drawn_frame, [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:814:12 [INFO] [stdout] | [INFO] [stdout] 814 | if block_text [INFO] [stdout] | ____________^ [INFO] [stdout] 815 | | .frame [INFO] [stdout] 816 | | .as_ref() [INFO] [stdout] 817 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 817 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 817 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_document/dynamic_page.rs:588:68 [INFO] [stdout] | [INFO] [stdout] 588 | Self::calculate_image_constraints(block_image, &drawn_frame, direction); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `drawn_frame` [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/block_document/dynamic_page.rs:602:25 [INFO] [stdout] | [INFO] [stdout] 602 | / match style { [INFO] [stdout] 603 | | Style::Space(space) => { [INFO] [stdout] 604 | | inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 607 | | } [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] 602 ~ if let Style::Space(space) = style { [INFO] [stdout] 603 + inner_drawn_frame = inner_drawn_frame.padding(space); [INFO] [stdout] 604 + } [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/block_document/dynamic_page.rs:630:21 [INFO] [stdout] | [INFO] [stdout] 630 | / match style { [INFO] [stdout] 631 | | Style::Space(space) => { [INFO] [stdout] 632 | | frame = frame.padding(space); [INFO] [stdout] ... | [INFO] [stdout] 635 | | } [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] 630 ~ if let Style::Space(space) = style { [INFO] [stdout] 631 + frame = frame.padding(space); [INFO] [stdout] 632 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `image::ImageError` [INFO] [stdout] --> src/block_document/dynamic_page.rs:649:45 [INFO] [stdout] | [INFO] [stdout] 649 | .map(|image| image.dimensions()) [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] | |_____________________________________________| [INFO] [stdout] 650 | || .map_err(ImageError::from) [INFO] [stdout] | ||______________________________________^ [INFO] [stdout] 651 | | } [INFO] [stdout] | |_____- help: consider removing [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/block_document/dynamic_page.rs:647:22 [INFO] [stdout] | [INFO] [stdout] 647 | .map_err(|e| ImageError::from(e))? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `ImageError::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:681:12 [INFO] [stdout] | [INFO] [stdout] 681 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 682 | | .frame [INFO] [stdout] 683 | | .as_ref() [INFO] [stdout] 684 | | .map_or(true, |b| b.size.is_none()) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 684 - .map_or(true, |b| b.size.is_none()) [INFO] [stdout] 684 + .is_none_or(|b| b.size.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:701:12 [INFO] [stdout] | [INFO] [stdout] 701 | if block_image [INFO] [stdout] | ____________^ [INFO] [stdout] 702 | | .frame [INFO] [stdout] 703 | | .as_ref() [INFO] [stdout] 704 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 704 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 704 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:808:12 [INFO] [stdout] | [INFO] [stdout] 808 | if block_text.frame.as_ref().map_or(true, |b| b.size.is_none()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 808 - if block_text.frame.as_ref().map_or(true, |b| b.size.is_none()) { [INFO] [stdout] 808 + if block_text.frame.as_ref().is_none_or(|b| b.size.is_none()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/block_document/dynamic_page.rs:814:12 [INFO] [stdout] | [INFO] [stdout] 814 | if block_text [INFO] [stdout] | ____________^ [INFO] [stdout] 815 | | .frame [INFO] [stdout] 816 | | .as_ref() [INFO] [stdout] 817 | | .map_or(true, |b| b.point.is_none()) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 817 - .map_or(true, |b| b.point.is_none()) [INFO] [stdout] 817 + .is_none_or(|b| b.point.is_none()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 31.42s [INFO] running `Command { std: "docker" "inspect" "b2acacda3ae5bc0439387464c9eb365e7641fcae4b858fabd82cab407f1d958f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b2acacda3ae5bc0439387464c9eb365e7641fcae4b858fabd82cab407f1d958f", kill_on_drop: false }` [INFO] [stdout] b2acacda3ae5bc0439387464c9eb365e7641fcae4b858fabd82cab407f1d958f