[INFO] cloning repository https://github.com/cdm114514/pdf_convert [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cdm114514/pdf_convert" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdm114514%2Fpdf_convert", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdm114514%2Fpdf_convert'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a3eeeb4b2ee5e63127cc15294aebb66dca535d8d [INFO] linting cdm114514/pdf_convert against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdm114514%2Fpdf_convert" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-5-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/cdm114514/pdf_convert [INFO] finished tweaking git repo https://github.com/cdm114514/pdf_convert [INFO] tweaked toml for git repo https://github.com/cdm114514/pdf_convert written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cdm114514/pdf_convert 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/cdm114514/pdf_convert 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 jiff-tzdb v0.1.4 [INFO] [stderr] Downloaded ecb v0.1.2 [INFO] [stderr] Downloaded nom_locate v5.0.0 [INFO] [stderr] Downloaded xmp-writer v0.3.2 [INFO] [stderr] Downloaded subsetter v0.2.1 [INFO] [stderr] Downloaded font-types v0.8.4 [INFO] [stderr] Downloaded krilla v0.4.0 [INFO] [stderr] Downloaded skrifa v0.30.0 [INFO] [stderr] Downloaded read-fonts v0.28.0 [INFO] [stderr] Downloaded pdf-writer v0.13.0 [INFO] [stderr] Downloaded pdfium-render v0.8.33 [INFO] [stderr] Downloaded lopdf v0.36.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 19c906612f81d0abe427e48f0a643aaf1d8fa599cd33823748f80f10d4feecad [INFO] running `Command { std: "docker" "start" "-a" "19c906612f81d0abe427e48f0a643aaf1d8fa599cd33823748f80f10d4feecad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "19c906612f81d0abe427e48f0a643aaf1d8fa599cd33823748f80f10d4feecad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "19c906612f81d0abe427e48f0a643aaf1d8fa599cd33823748f80f10d4feecad", kill_on_drop: false }` [INFO] [stdout] 19c906612f81d0abe427e48f0a643aaf1d8fa599cd33823748f80f10d4feecad [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 2fd4d59a4e6ce40d4d978109ff8c2b62c9193120f6228ed490013e016c749c32 [INFO] running `Command { std: "docker" "start" "-a" "2fd4d59a4e6ce40d4d978109ff8c2b62c9193120f6228ed490013e016c749c32", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking zlib-rs v0.5.1 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking byteorder-lite v0.1.0 [INFO] [stderr] Checking zune-core v0.4.12 [INFO] [stderr] Checking block-padding v0.3.3 [INFO] [stderr] Checking tinyvec v1.9.0 [INFO] [stderr] Checking unicode-script v0.5.7 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Checking weezl v0.1.10 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking zune-jpeg v0.4.18 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking piston-float v1.0.1 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Compiling pdfium-render v0.8.33 [INFO] [stderr] Checking quick-error v2.0.1 [INFO] [stderr] Checking unicode-ccc v0.4.0 [INFO] [stderr] Checking unicode-bidi-mirroring v0.4.0 [INFO] [stderr] Checking pdf-writer v0.13.0 [INFO] [stderr] Checking image-webp v0.2.3 [INFO] [stderr] Checking gif v0.13.3 [INFO] [stderr] Checking vecmath v1.0.0 [INFO] [stderr] Checking clap_builder v4.5.40 [INFO] [stderr] Checking cbc v0.1.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking ecb v0.1.2 [INFO] [stderr] Checking subsetter v0.2.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Checking float-cmp v0.10.0 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking utf16string v0.2.0 [INFO] [stderr] Checking core_maths v0.1.1 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Checking libloading v0.8.8 [INFO] [stderr] Checking siphasher v1.0.1 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking jiff v0.2.15 [INFO] [stderr] Checking rangemap v1.5.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking libz-rs-sys v0.5.1 [INFO] [stderr] Checking stringprep v0.1.5 [INFO] [stderr] Checking xmp-writer v0.3.2 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking ttf-parser v0.19.2 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking imagesize v0.13.0 [INFO] [stderr] Checking bumpalo v3.18.1 [INFO] [stderr] Checking maybe-owned v0.3.4 [INFO] [stderr] Checking base16ct v0.2.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking nom_locate v5.0.0 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling bytemuck_derive v1.9.3 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling clap_derive v4.5.40 [INFO] [stderr] Checking bytemuck v1.23.1 [INFO] [stderr] Checking thiserror v2.0.12 [INFO] [stderr] Checking lopdf v0.36.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking font-types v0.8.4 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking image v0.25.6 [INFO] [stderr] Checking rustybuzz v0.20.1 [INFO] [stderr] Checking rustybuzz v0.10.0 [INFO] [stderr] Checking read-fonts v0.28.0 [INFO] [stderr] Checking clap v4.5.40 [INFO] [stderr] Checking skrifa v0.30.0 [INFO] [stderr] Checking krilla v0.4.0 [INFO] [stderr] Checking pdf_convert v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Transform` [INFO] [stdout] --> src/main.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | geom::{Point, Transform}, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `regex::Regex` [INFO] [stdout] --> src/main.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use regex::Regex; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lopdf::Object::*` [INFO] [stdout] --> src/main.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | use lopdf::Object::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `StringFormat` [INFO] [stdout] --> src/main.rs:817:21 [INFO] [stdout] | [INFO] [stdout] 817 | use lopdf::{Stream, StringFormat}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Transform` [INFO] [stdout] --> src/main.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | geom::{Point, Transform}, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `regex::Regex` [INFO] [stdout] --> src/main.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use regex::Regex; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lopdf::Object::*` [INFO] [stdout] --> src/main.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | use lopdf::Object::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `StringFormat` [INFO] [stdout] --> src/main.rs:817:21 [INFO] [stdout] | [INFO] [stdout] 817 | use lopdf::{Stream, StringFormat}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_id` [INFO] [stdout] --> src/main.rs:73:31 [INFO] [stdout] | [INFO] [stdout] 73 | Reference(ref_id) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_id` [INFO] [stdout] --> src/main.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | Reference(ref_id) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_id` [INFO] [stdout] --> src/main.rs:161:53 [INFO] [stdout] | [INFO] [stdout] 161 | let new_cs_id = if let lopdf::Object::Reference(ref_id) = d65gray_obj { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_id` [INFO] [stdout] --> src/main.rs:73:31 [INFO] [stdout] | [INFO] [stdout] 73 | Reference(ref_id) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_id` [INFO] [stdout] --> src/main.rs:89:31 [INFO] [stdout] | [INFO] [stdout] 89 | Reference(ref_id) => { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_id` [INFO] [stdout] --> src/main.rs:161:53 [INFO] [stdout] | [INFO] [stdout] 161 | let new_cs_id = if let lopdf::Object::Reference(ref_id) = d65gray_obj { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_one_line` is never used [INFO] [stdout] --> src/main.rs:433:4 [INFO] [stdout] | [INFO] [stdout] 433 | fn draw_one_line<'a>( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 | | } [INFO] [stdout] 189 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:184:19 [INFO] [stdout] | [INFO] [stdout] 184 | if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] | ^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 185 | if let Object::Dictionary(orig_res_dict) = orig_resources { [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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | / if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] 185 | | if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] ... | [INFO] [stdout] 190 | | } [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] 184 ~ if let Ok(orig_resources) = original_page.get(b"Resources") [INFO] [stdout] 185 ~ && let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 | } [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 | | } [INFO] [stdout] 189 | | } [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 let Object::Dictionary(orig_res_dict) = orig_resources [INFO] [stdout] 186 ~ && let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 | | } [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:266:19 [INFO] [stdout] | [INFO] [stdout] 266 | if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] | ^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 267 | if let Object::Dictionary(orig_res_dict) = orig_resources { [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/main.rs:266:9 [INFO] [stdout] | [INFO] [stdout] 266 | / if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] 267 | | if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] ... | [INFO] [stdout] 272 | | } [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] 266 ~ if let Ok(orig_resources) = original_page.get(b"Resources") [INFO] [stdout] 267 ~ && let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 | } [INFO] [stdout] 271 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 | | } [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] 267 ~ if let Object::Dictionary(orig_res_dict) = orig_resources [INFO] [stdout] 268 ~ && let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:361:21 [INFO] [stdout] | [INFO] [stdout] 361 | let w = bbox.width().value as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bbox.width().value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:364:20 [INFO] [stdout] | [INFO] [stdout] 364 | x: bbox.left().value as f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bbox.left().value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:365:20 [INFO] [stdout] | [INFO] [stdout] 365 | y: bbox.bottom().value as f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bbox.bottom().value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:367:23 [INFO] [stdout] | [INFO] [stdout] 367 | size: size.value as f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `size.value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:404:38 [INFO] [stdout] | [INFO] [stdout] 404 | (font, font_bytes.unwrap_or_else(|| vec![])) [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:482:37 [INFO] [stdout] | [INFO] [stdout] 482 | let parts: Vec<&str> = line.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:495:37 [INFO] [stdout] | [INFO] [stdout] 495 | let parts: Vec<&str> = line.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:521:5 [INFO] [stdout] | [INFO] [stdout] 521 | / if let Some(last) = lines.last() { [INFO] [stdout] 522 | | if last.trim_start().starts_with("Q") { [INFO] [stdout] 523 | | lines.pop(); [INFO] [stdout] 524 | | } [INFO] [stdout] 525 | | } [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] 521 ~ if let Some(last) = lines.last() [INFO] [stdout] 522 ~ && last.trim_start().starts_with("Q") { [INFO] [stdout] 523 | lines.pop(); [INFO] [stdout] 524 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:542:13 [INFO] [stdout] | [INFO] [stdout] 542 | !(t.starts_with("1 0 0 1") && t.ends_with("cm")) && !(t.starts_with("1 0 0 -1") && t.ends_with("Tm")) && *i != block_tm... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(t.starts_with("1 0 0 1") && t.ends_with("cm") || t.starts_with("1 0 0 -1") && t.ends_with("Tm"))` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:574:45 [INFO] [stdout] | [INFO] [stdout] 574 | let parts: Vec<&str> = font.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:615:13 [INFO] [stdout] | [INFO] [stdout] 615 | / if let Some(ref last) = last_font { [INFO] [stdout] 616 | | if last == l { [INFO] [stdout] 617 | | continue; // Skip duplicate font [INFO] [stdout] 618 | | } [INFO] [stdout] 619 | | } [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] 615 ~ if let Some(ref last) = last_font [INFO] [stdout] 616 ~ && last == l { [INFO] [stdout] 617 | continue; // Skip duplicate font [INFO] [stdout] 618 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:623:13 [INFO] [stdout] | [INFO] [stdout] 623 | / if let Some((ref last_cs, ref last_scn)) = last_color { [INFO] [stdout] 624 | | if (l == "/d65gray cs" && last_cs == l) || (l == "0 scn" && last_scn == l) { [INFO] [stdout] 625 | | continue; // Skip duplicate color [INFO] [stdout] 626 | | } [INFO] [stdout] 627 | | } [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] 623 ~ if let Some((ref last_cs, ref last_scn)) = last_color [INFO] [stdout] 624 ~ && ((l == "/d65gray cs" && last_cs == l) || (l == "0 scn" && last_scn == l)) { [INFO] [stdout] 625 | continue; // Skip duplicate color [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:667:21 [INFO] [stdout] | [INFO] [stdout] 667 | final_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `final_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:675:25 [INFO] [stdout] | [INFO] [stdout] 675 | final_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `final_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `draw_one_line` is never used [INFO] [stdout] --> src/main.rs:433:4 [INFO] [stdout] | [INFO] [stdout] 433 | fn draw_one_line<'a>( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:694:25 [INFO] [stdout] | [INFO] [stdout] 694 | page_body.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `page_body.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:721:48 [INFO] [stdout] | [INFO] [stdout] 721 | for (_page_num, lines) in pages.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 721 - for (_page_num, lines) in pages.into_iter().enumerate() { [INFO] [stdout] 721 + for lines in pages.into_iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 | | } [INFO] [stdout] 189 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:184:19 [INFO] [stdout] | [INFO] [stdout] 184 | if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] | ^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 185 | if let Object::Dictionary(orig_res_dict) = orig_resources { [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] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | / if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] 185 | | if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] ... | [INFO] [stdout] 190 | | } [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] 184 ~ if let Ok(orig_resources) = original_page.get(b"Resources") [INFO] [stdout] 185 ~ && let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 | } [INFO] [stdout] 189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 186 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 | | } [INFO] [stdout] 189 | | } [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 let Object::Dictionary(orig_res_dict) = orig_resources [INFO] [stdout] 186 ~ && let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 187 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 188 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/main.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 | | } [INFO] [stdout] 271 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/main.rs:266:19 [INFO] [stdout] | [INFO] [stdout] 266 | if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] | ^^^^^^^^^^^^^^ replace this binding [INFO] [stdout] 267 | if let Object::Dictionary(orig_res_dict) = orig_resources { [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/main.rs:266:9 [INFO] [stdout] | [INFO] [stdout] 266 | / if let Ok(orig_resources) = original_page.get(b"Resources") { [INFO] [stdout] 267 | | if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] ... | [INFO] [stdout] 272 | | } [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] 266 ~ if let Ok(orig_resources) = original_page.get(b"Resources") [INFO] [stdout] 267 ~ && let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 | } [INFO] [stdout] 271 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Object::Dictionary(orig_res_dict) = orig_resources { [INFO] [stdout] 268 | | if let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 | | } [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] 267 ~ if let Object::Dictionary(orig_res_dict) = orig_resources [INFO] [stdout] 268 ~ && let Ok(font_obj) = orig_res_dict.get(b"Font") { [INFO] [stdout] 269 | original_font_obj = Some(font_obj.clone()); [INFO] [stdout] 270 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:361:21 [INFO] [stdout] | [INFO] [stdout] 361 | let w = bbox.width().value as f32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bbox.width().value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:364:20 [INFO] [stdout] | [INFO] [stdout] 364 | x: bbox.left().value as f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bbox.left().value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:365:20 [INFO] [stdout] | [INFO] [stdout] 365 | y: bbox.bottom().value as f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bbox.bottom().value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/main.rs:367:23 [INFO] [stdout] | [INFO] [stdout] 367 | size: size.value as f32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `size.value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/main.rs:404:38 [INFO] [stdout] | [INFO] [stdout] 404 | (font, font_bytes.unwrap_or_else(|| vec![])) [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::new` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:482:37 [INFO] [stdout] | [INFO] [stdout] 482 | let parts: Vec<&str> = line.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:495:37 [INFO] [stdout] | [INFO] [stdout] 495 | let parts: Vec<&str> = line.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:521:5 [INFO] [stdout] | [INFO] [stdout] 521 | / if let Some(last) = lines.last() { [INFO] [stdout] 522 | | if last.trim_start().starts_with("Q") { [INFO] [stdout] 523 | | lines.pop(); [INFO] [stdout] 524 | | } [INFO] [stdout] 525 | | } [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] 521 ~ if let Some(last) = lines.last() [INFO] [stdout] 522 ~ && last.trim_start().starts_with("Q") { [INFO] [stdout] 523 | lines.pop(); [INFO] [stdout] 524 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:542:13 [INFO] [stdout] | [INFO] [stdout] 542 | !(t.starts_with("1 0 0 1") && t.ends_with("cm")) && !(t.starts_with("1 0 0 -1") && t.ends_with("Tm")) && *i != block_tm... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(t.starts_with("1 0 0 1") && t.ends_with("cm") || t.starts_with("1 0 0 -1") && t.ends_with("Tm"))` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:574:45 [INFO] [stdout] | [INFO] [stdout] 574 | let parts: Vec<&str> = font.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:846:29 [INFO] [stdout] | [INFO] [stdout] 846 | / ... if let Ok(fonts) = resources_dict.get_mut(b"Font")?.as_dict_mut() { [INFO] [stdout] 847 | | ... if let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 848 | | ... fonts.set(b"F0", v); [INFO] [stdout] 849 | | ... } [INFO] [stdout] 850 | | ... } [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] 846 ~ if let Ok(fonts) = resources_dict.get_mut(b"Font")?.as_dict_mut() [INFO] [stdout] 847 ~ && let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 848 | fonts.set(b"F0", v); [INFO] [stdout] 849 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:856:21 [INFO] [stdout] | [INFO] [stdout] 856 | / if let Ok(fonts) = doc.get_object_mut(font_id)?.as_dict_mut() { [INFO] [stdout] 857 | | if let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 858 | | fonts.set(b"F0", v); [INFO] [stdout] 859 | | } [INFO] [stdout] 860 | | } [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] 856 ~ if let Ok(fonts) = doc.get_object_mut(font_id)?.as_dict_mut() [INFO] [stdout] 857 ~ && let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 858 | fonts.set(b"F0", v); [INFO] [stdout] 859 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:615:13 [INFO] [stdout] | [INFO] [stdout] 615 | / if let Some(ref last) = last_font { [INFO] [stdout] 616 | | if last == l { [INFO] [stdout] 617 | | continue; // Skip duplicate font [INFO] [stdout] 618 | | } [INFO] [stdout] 619 | | } [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] 615 ~ if let Some(ref last) = last_font [INFO] [stdout] 616 ~ && last == l { [INFO] [stdout] 617 | continue; // Skip duplicate font [INFO] [stdout] 618 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:623:13 [INFO] [stdout] | [INFO] [stdout] 623 | / if let Some((ref last_cs, ref last_scn)) = last_color { [INFO] [stdout] 624 | | if (l == "/d65gray cs" && last_cs == l) || (l == "0 scn" && last_scn == l) { [INFO] [stdout] 625 | | continue; // Skip duplicate color [INFO] [stdout] 626 | | } [INFO] [stdout] 627 | | } [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] 623 ~ if let Some((ref last_cs, ref last_scn)) = last_color [INFO] [stdout] 624 ~ && ((l == "/d65gray cs" && last_cs == l) || (l == "0 scn" && last_scn == l)) { [INFO] [stdout] 625 | continue; // Skip duplicate color [INFO] [stdout] 626 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:667:21 [INFO] [stdout] | [INFO] [stdout] 667 | final_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `final_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:675:25 [INFO] [stdout] | [INFO] [stdout] 675 | final_content.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `final_content.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/main.rs:694:25 [INFO] [stdout] | [INFO] [stdout] 694 | page_body.push_str("\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `page_body.push('\n')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `promote_f0_to_F0` should have a snake case name [INFO] [stdout] --> src/main.rs:825:4 [INFO] [stdout] | [INFO] [stdout] 825 | fn promote_f0_to_F0(doc: &mut lopdf::Document) -> lopdf::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `promote_f0_to_f0` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/main.rs:721:48 [INFO] [stdout] | [INFO] [stdout] 721 | for (_page_num, lines) in pages.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 721 - for (_page_num, lines) in pages.into_iter().enumerate() { [INFO] [stdout] 721 + for lines in pages.into_iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:846:29 [INFO] [stdout] | [INFO] [stdout] 846 | / ... if let Ok(fonts) = resources_dict.get_mut(b"Font")?.as_dict_mut() { [INFO] [stdout] 847 | | ... if let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 848 | | ... fonts.set(b"F0", v); [INFO] [stdout] 849 | | ... } [INFO] [stdout] 850 | | ... } [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] 846 ~ if let Ok(fonts) = resources_dict.get_mut(b"Font")?.as_dict_mut() [INFO] [stdout] 847 ~ && let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 848 | fonts.set(b"F0", v); [INFO] [stdout] 849 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:856:21 [INFO] [stdout] | [INFO] [stdout] 856 | / if let Ok(fonts) = doc.get_object_mut(font_id)?.as_dict_mut() { [INFO] [stdout] 857 | | if let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 858 | | fonts.set(b"F0", v); [INFO] [stdout] 859 | | } [INFO] [stdout] 860 | | } [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] 856 ~ if let Ok(fonts) = doc.get_object_mut(font_id)?.as_dict_mut() [INFO] [stdout] 857 ~ && let Some(v) = fonts.remove(b"f0") { [INFO] [stdout] 858 | fonts.set(b"F0", v); [INFO] [stdout] 859 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `promote_f0_to_F0` should have a snake case name [INFO] [stdout] --> src/main.rs:825:4 [INFO] [stdout] | [INFO] [stdout] 825 | fn promote_f0_to_F0(doc: &mut lopdf::Document) -> lopdf::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `promote_f0_to_f0` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 44.88s [INFO] running `Command { std: "docker" "inspect" "2fd4d59a4e6ce40d4d978109ff8c2b62c9193120f6228ed490013e016c749c32", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2fd4d59a4e6ce40d4d978109ff8c2b62c9193120f6228ed490013e016c749c32", kill_on_drop: false }` [INFO] [stdout] 2fd4d59a4e6ce40d4d978109ff8c2b62c9193120f6228ed490013e016c749c32