[INFO] cloning repository https://github.com/lzm0x219/vrain_rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lzm0x219/vrain_rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flzm0x219%2Fvrain_rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flzm0x219%2Fvrain_rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8ece41b10180dfb19d1ab7c90b33160bf5a42f56 [INFO] linting lzm0x219/vrain_rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flzm0x219%2Fvrain_rs" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lzm0x219/vrain_rs [INFO] finished tweaking git repo https://github.com/lzm0x219/vrain_rs [INFO] tweaked toml for git repo https://github.com/lzm0x219/vrain_rs written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lzm0x219/vrain_rs 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/lzm0x219/vrain_rs 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 vergen v8.3.2 [INFO] [stderr] Downloaded wasm-bindgen-futures v0.4.55 [INFO] [stderr] Downloaded daachorse v1.0.0 [INFO] [stderr] Downloaded azul-simplecss v0.1.1 [INFO] [stderr] Downloaded gl-context-loader v0.1.10 [INFO] [stderr] Downloaded clap v4.5.52 [INFO] [stderr] Downloaded glyph-names v0.2.0 [INFO] [stderr] Downloaded azul-layout v0.0.5 [INFO] [stderr] Downloaded azul-css v0.0.5 [INFO] [stderr] Downloaded html5ever v0.25.2 [INFO] [stderr] Downloaded subsetter v0.2.3 [INFO] [stderr] Downloaded ruzstd v0.8.2 [INFO] [stderr] Downloaded clap_builder v4.5.52 [INFO] [stderr] Downloaded rangemap v1.7.0 [INFO] [stderr] Downloaded azul-core v0.0.5 [INFO] [stderr] Downloaded unicode-general-category v0.6.0 [INFO] [stderr] Downloaded rust-fontconfig v1.0.3 [INFO] [stderr] Downloaded svg2pdf v0.13.0 [INFO] [stderr] Downloaded highway v0.8.1 [INFO] [stderr] Downloaded kuchiki v0.8.1 [INFO] [stderr] Downloaded allsorts-subset-browser v0.16.0 [INFO] [stderr] Downloaded nom_locate v4.2.0 [INFO] [stderr] Downloaded unicode-joining-type v0.7.0 [INFO] [stderr] Downloaded mmapio v0.9.1 [INFO] [stderr] Downloaded twox-hash v2.1.2 [INFO] [stderr] Downloaded bitreader v0.3.11 [INFO] [stderr] Downloaded unicode-canonical-combining-class v0.5.0 [INFO] [stderr] Downloaded cc v1.2.46 [INFO] [stderr] Downloaded pdf-writer v0.12.1 [INFO] [stderr] Downloaded printpdf v0.8.2 [INFO] [stderr] Downloaded zhconv v0.3.3 [INFO] [stderr] Downloaded lopdf v0.35.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] 48eb7b48f9d7722a41a63d3020ddc86a71dadfa9a97f18c85e77923b7f68563b [INFO] running `Command { std: "docker" "start" "-a" "48eb7b48f9d7722a41a63d3020ddc86a71dadfa9a97f18c85e77923b7f68563b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "48eb7b48f9d7722a41a63d3020ddc86a71dadfa9a97f18c85e77923b7f68563b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "48eb7b48f9d7722a41a63d3020ddc86a71dadfa9a97f18c85e77923b7f68563b", kill_on_drop: false }` [INFO] [stdout] 48eb7b48f9d7722a41a63d3020ddc86a71dadfa9a97f18c85e77923b7f68563b [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] 9f115465473f6d92189ad9e8d38d1580a9249deb67a5fa526e6b9d9fb39b9680 [INFO] running `Command { std: "docker" "start" "-a" "9f115465473f6d92189ad9e8d38d1580a9249deb67a5fa526e6b9d9fb39b9680", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Checking log v0.4.28 [INFO] [stderr] Compiling zerocopy v0.8.27 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Compiling syn v2.0.110 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking tinyvec v1.10.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling phf_shared v0.11.3 [INFO] [stderr] Compiling pathfinder_simd v0.5.5 [INFO] [stderr] Compiling unicode-canonical-combining-class v0.5.0 [INFO] [stderr] Compiling unicode-general-category v0.6.0 [INFO] [stderr] Compiling unicode-joining-type v0.7.0 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Checking block-padding v0.3.3 [INFO] [stderr] Checking hashbrown v0.16.0 [INFO] [stderr] Compiling phf_generator v0.11.3 [INFO] [stderr] Checking aliasable v0.1.3 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Compiling powerfmt v0.2.0 [INFO] [stderr] Compiling aho-corasick v1.1.4 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Compiling string_cache_codegen v0.5.4 [INFO] [stderr] Compiling deranged v0.5.5 [INFO] [stderr] Checking fontconfig-parser v0.5.8 [INFO] [stderr] Checking brotli-decompressor v4.0.3 [INFO] [stderr] Checking indexmap v2.12.0 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Compiling vergen v8.3.2 [INFO] [stderr] Checking pxfm v0.1.25 [INFO] [stderr] Checking kurbo v0.11.3 [INFO] [stderr] Checking bitreader v0.3.11 [INFO] [stderr] Checking dtoa v1.0.10 [INFO] [stderr] Checking zune-core v0.5.0 [INFO] [stderr] Checking glyph-names v0.2.0 [INFO] [stderr] Checking core_maths v0.1.1 [INFO] [stderr] Compiling time-core v0.1.6 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling getrandom v0.1.16 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking ucd-trie v0.1.7 [INFO] [stderr] Checking unicode-script v0.5.7 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking memmap2 v0.9.9 [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling num_threads v0.1.7 [INFO] [stderr] Checking xmlparser v0.13.6 [INFO] [stderr] Compiling time v0.3.44 [INFO] [stderr] Compiling cc v1.2.46 [INFO] [stderr] Compiling rand_pcg v0.2.1 [INFO] [stderr] Checking mmapio v0.9.1 [INFO] [stderr] Checking zune-jpeg v0.5.5 [INFO] [stderr] Checking dtoa-short v0.3.5 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Compiling regex-automata v0.4.13 [INFO] [stderr] Checking simplecss v0.2.2 [INFO] [stderr] Checking svgtypes v0.15.3 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Checking gif v0.14.0 [INFO] [stderr] Checking kurbo v0.12.0 [INFO] [stderr] Checking imagesize v0.13.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Checking azul-simplecss v0.1.1 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking zune-jpeg v0.4.21 [INFO] [stderr] Checking azul-css v0.0.5 [INFO] [stderr] Checking servo_arc v0.1.1 [INFO] [stderr] Checking gif v0.13.3 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking gl-context-loader v0.1.10 [INFO] [stderr] Checking fontdb v0.23.0 [INFO] [stderr] Compiling daachorse v1.0.0 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Compiling hex-literal v0.4.1 [INFO] [stderr] Checking highway v0.8.1 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Compiling phf_generator v0.8.0 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Checking pdf-writer v0.12.1 [INFO] [stderr] Checking cbc v0.1.2 [INFO] [stderr] Compiling phf_codegen v0.8.0 [INFO] [stderr] Compiling zstd-sys v2.0.16+zstd.1.5.7 [INFO] [stderr] Checking roxmltree v0.14.1 [INFO] [stderr] Compiling markup5ever v0.10.1 [INFO] [stderr] Compiling selectors v0.22.0 [INFO] [stderr] Checking unicode-normalization v0.1.25 [INFO] [stderr] Checking twox-hash v2.1.2 [INFO] [stderr] Checking ttf-parser v0.15.2 [INFO] [stderr] Checking moxcms v0.7.9 [INFO] [stderr] Checking clap_lex v0.7.6 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking nom_locate v4.2.0 [INFO] [stderr] Checking rangemap v1.7.0 [INFO] [stderr] Checking ruzstd v0.8.2 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking serde_json v1.0.145 [INFO] [stderr] Checking clap_builder v4.5.52 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking ttf-parser v0.21.1 [INFO] [stderr] Compiling regex v1.12.2 [INFO] [stderr] Compiling phf_macros v0.8.0 [INFO] [stderr] Compiling cssparser v0.27.2 [INFO] [stderr] Compiling html5ever v0.25.2 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling ouroboros_macro v0.17.2 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Checking phf v0.8.0 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking fontdue v0.9.3 [INFO] [stderr] Checking bytemuck v1.24.0 [INFO] [stderr] Checking ouroboros v0.17.2 [INFO] [stderr] Checking font-types v0.10.1 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking rustybuzz v0.20.1 [INFO] [stderr] Checking allsorts-subset-browser v0.16.0 [INFO] [stderr] Checking rgb v0.8.52 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking read-fonts v0.35.0 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking clap v4.5.52 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking usvg v0.45.1 [INFO] [stderr] Compiling zstd v0.13.3 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Compiling zhconv v0.3.3 [INFO] [stderr] Checking resvg v0.45.1 [INFO] [stderr] Checking lopdf v0.35.0 [INFO] [stderr] Checking kuchiki v0.8.1 [INFO] [stderr] Checking rust-fontconfig v1.0.3 [INFO] [stderr] Checking azul-core v0.0.5 [INFO] [stderr] Checking write-fonts v0.43.0 [INFO] [stderr] Checking skrifa v0.37.0 [INFO] [stderr] Checking azul-layout v0.0.5 [INFO] [stderr] Checking subsetter v0.2.3 [INFO] [stderr] Checking svg2pdf v0.13.0 [INFO] [stderr] Checking printpdf v0.8.2 [INFO] [stderr] Checking vrain_rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/config.rs:78:10 [INFO] [stdout] | [INFO] [stdout] 78 | .unwrap_or_else(String::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/config.rs:269:22 [INFO] [stdout] | [INFO] [stdout] 269 | .map(|s| RgbColor::parse(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RgbColor::parse` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/config.rs:379:28 [INFO] [stdout] | [INFO] [stdout] 379 | .filter(|&idx| idx >= 1 && idx <= 5) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=5).contains(&idx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/fonts.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / if self.has_glyph(idx, ch) { [INFO] [stdout] 67 | | if let Some(font) = self.font(idx) { [INFO] [stdout] 68 | | return Some(FontPick { [INFO] [stdout] 69 | | font, [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [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] 66 ~ if self.has_glyph(idx, ch) [INFO] [stdout] 67 ~ && let Some(font) = self.font(idx) { [INFO] [stdout] 68 | return Some(FontPick { [INFO] [stdout] ... [INFO] [stdout] 71 | }); [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/layout.rs:54:33 [INFO] [stdout] | [INFO] [stdout] 54 | if rows == 0 || row_num % rows != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!row_num.is_multiple_of(rows)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/layout_engine.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn process_entry( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | entry: &str, [INFO] [stdout] 23 | | title_text: &str, [INFO] [stdout] ... | [INFO] [stdout] 29 | | bookline_active: &mut bool, [INFO] [stdout] 30 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/layout_engine.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | / if self.layout.multirows_bands > 1 { [INFO] [stdout] 73 | | let band = self.layout.columns * self.layout.rows_per_column; [INFO] [stdout] 74 | | let next_band_start = ((*pcnt) / band + 1) * band; [INFO] [stdout] 75 | | if next_band_start < self.layout.per_page { [INFO] [stdout] ... | [INFO] [stdout] 81 | | continue; [INFO] [stdout] 82 | | } [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] 71 ~ '^' [INFO] [stdout] 72 ~ if self.layout.multirows_bands > 1 => { [INFO] [stdout] 73 | let band = self.layout.columns * self.layout.rows_per_column; [INFO] [stdout] ... [INFO] [stdout] 81 | continue; [INFO] [stdout] 82 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout_engine.rs:45:25 [INFO] [stdout] | [INFO] [stdout] 45 | &mut current_page, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `current_page` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/layout_engine.rs:110:21 [INFO] [stdout] | [INFO] [stdout] 110 | while let Some(next) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in chars.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` 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/layout_engine.rs:118:29 [INFO] [stdout] | [INFO] [stdout] 118 | ... &mut current_page, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `current_page` [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/layout_engine.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | &mut current_page, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `current_page` [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/layout_engine.rs:159:21 [INFO] [stdout] | [INFO] [stdout] 159 | / if *bookline_active && self.book.book_line_flag && ch != ' ' { [INFO] [stdout] 160 | | if let Some(bline) = &self.book.bookline { [INFO] [stdout] 161 | | current_page.lines.push(LineSpec { [INFO] [stdout] 162 | | x1: pos.x - bline.width, [INFO] [stdout] ... | [INFO] [stdout] 171 | | } [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] 159 ~ if *bookline_active && self.book.book_line_flag && ch != ' ' [INFO] [stdout] 160 ~ && let Some(bline) = &self.book.bookline { [INFO] [stdout] 161 | current_page.lines.push(LineSpec { [INFO] [stdout] ... [INFO] [stdout] 169 | }); [INFO] [stdout] 170 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | / if *bookline_active && self.book.book_line_flag && ch != ' ' { [INFO] [stdout] 200 | | if let Some(bline) = &self.book.bookline { [INFO] [stdout] 201 | | current_page.lines.push(LineSpec { [INFO] [stdout] 202 | | x1: pos.x - bline.width, [INFO] [stdout] ... | [INFO] [stdout] 211 | | } [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] 199 ~ if *bookline_active && self.book.book_line_flag && ch != ' ' [INFO] [stdout] 200 ~ && let Some(bline) = &self.book.bookline { [INFO] [stdout] 201 | current_page.lines.push(LineSpec { [INFO] [stdout] ... [INFO] [stdout] 209 | }); [INFO] [stdout] 210 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:214:13 [INFO] [stdout] | [INFO] [stdout] 214 | / if *pcnt == self.layout.per_page { [INFO] [stdout] 215 | | if let Some(&next) = chars.peek() { [INFO] [stdout] 216 | | if self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] 217 | | chars.next(); [INFO] [stdout] ... | [INFO] [stdout] 226 | | } [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] 214 ~ if *pcnt == self.layout.per_page [INFO] [stdout] 215 ~ && let Some(&next) = chars.peek() { [INFO] [stdout] 216 | if self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] ... [INFO] [stdout] 224 | } [INFO] [stdout] 225 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:215:17 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(&next) = chars.peek() { [INFO] [stdout] 216 | | if self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] 217 | | chars.next(); [INFO] [stdout] 218 | | let pos_prev = last_pos.unwrap_or(pos); [INFO] [stdout] ... | [INFO] [stdout] 225 | | } [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] 215 ~ if let Some(&next) = chars.peek() [INFO] [stdout] 216 ~ && self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] 217 | chars.next(); [INFO] [stdout] ... [INFO] [stdout] 223 | } [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/layout_engine.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | / fn render_comments( [INFO] [stdout] 232 | | &self, [INFO] [stdout] 233 | | current_page: &mut PagePlan, [INFO] [stdout] 234 | | pages: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 239 | | title_text: &str, [INFO] [stdout] 240 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/layout_engine.rs:248:27 [INFO] [stdout] | [INFO] [stdout] 248 | 'outer: while let Some(_) = remaining.front() { [INFO] [stdout] | ------------------^^^^^^^-------------------- help: try: `while remaining.front().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:283:21 [INFO] [stdout] | [INFO] [stdout] 283 | / if let Some(last) = comment_last_slot { [INFO] [stdout] 284 | | if self.book.punctuation.comment_nop.chars.contains(&ch) { [INFO] [stdout] 285 | | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | | current_page.glyphs.push(spec); [INFO] [stdout] ... | [INFO] [stdout] 289 | | } [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] 283 ~ if let Some(last) = comment_last_slot [INFO] [stdout] 284 ~ && self.book.punctuation.comment_nop.chars.contains(&ch) { [INFO] [stdout] 285 | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | current_page.glyphs.push(spec); [INFO] [stdout] 287 | } [INFO] [stdout] 288 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | / if self.book.punctuation.comment_nop.chars.contains(&ch) { [INFO] [stdout] 285 | | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | | current_page.glyphs.push(spec); [INFO] [stdout] 287 | | } [INFO] [stdout] 288 | | } [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] 284 ~ if self.book.punctuation.comment_nop.chars.contains(&ch) [INFO] [stdout] 285 ~ && let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | current_page.glyphs.push(spec); [INFO] [stdout] 287 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:377:21 [INFO] [stdout] | [INFO] [stdout] 377 | / if let Some(last) = last_pos { [INFO] [stdout] 378 | | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 379 | | current_page.glyphs.push(spec); [INFO] [stdout] 380 | | } [INFO] [stdout] 381 | | } [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] 377 ~ if let Some(last) = last_pos [INFO] [stdout] 378 ~ && let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 379 | current_page.glyphs.push(spec); [INFO] [stdout] 380 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/config.rs:78:10 [INFO] [stdout] | [INFO] [stdout] 78 | .unwrap_or_else(String::new); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:404:17 [INFO] [stdout] | [INFO] [stdout] 404 | / if comment_bookline_active && self.book.book_line_flag && ch != ' ' { [INFO] [stdout] 405 | | if let Some(bline) = &self.book.bookline { [INFO] [stdout] 406 | | current_page.lines.push(LineSpec { [INFO] [stdout] 407 | | x1: pos.x - bline.width, [INFO] [stdout] ... | [INFO] [stdout] 416 | | } [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] 404 ~ if comment_bookline_active && self.book.book_line_flag && ch != ' ' [INFO] [stdout] 405 ~ && let Some(bline) = &self.book.bookline { [INFO] [stdout] 406 | current_page.lines.push(LineSpec { [INFO] [stdout] ... [INFO] [stdout] 414 | }); [INFO] [stdout] 415 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/layout_engine.rs:422:30 [INFO] [stdout] | [INFO] [stdout] 422 | let slots_used = (non_nop_count + 1) / 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `non_nop_count.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/layout_engine.rs:427:26 [INFO] [stdout] | [INFO] [stdout] 427 | queue.extend(remaining.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:416:17 [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] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 427 - queue.extend(remaining.into_iter()); [INFO] [stdout] 427 + queue.extend(remaining); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/layout_engine.rs:607:9 [INFO] [stdout] | [INFO] [stdout] 607 | (consuming + 1) / 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `consuming.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/config.rs:269:22 [INFO] [stdout] | [INFO] [stdout] 269 | .map(|s| RgbColor::parse(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RgbColor::parse` [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: the loop variable `c` is only used to index `p` [INFO] [stdout] --> src/background.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | for c in 0..3 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 158 - for c in 0..3 { [INFO] [stdout] 158 + for in p.iter_mut().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/numerals.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | / if let (Some(key), Some(value)) = (parts.next(), parts.next()) { [INFO] [stdout] 24 | | if let Ok(num) = key.parse::() { [INFO] [stdout] 25 | | map.insert(num, value.to_string()); [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [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] 23 ~ if let (Some(key), Some(value)) = (parts.next(), parts.next()) [INFO] [stdout] 24 ~ && let Ok(num) = key.parse::() { [INFO] [stdout] 25 | map.insert(num, value.to_string()); [INFO] [stdout] 26 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/config.rs:379:28 [INFO] [stdout] | [INFO] [stdout] 379 | .filter(|&idx| idx >= 1 && idx <= 5) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=5).contains(&idx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/fonts.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / if self.has_glyph(idx, ch) { [INFO] [stdout] 67 | | if let Some(font) = self.font(idx) { [INFO] [stdout] 68 | | return Some(FontPick { [INFO] [stdout] 69 | | font, [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [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] 66 ~ if self.has_glyph(idx, ch) [INFO] [stdout] 67 ~ && let Some(font) = self.font(idx) { [INFO] [stdout] 68 | return Some(FontPick { [INFO] [stdout] ... [INFO] [stdout] 71 | }); [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/layout.rs:54:33 [INFO] [stdout] | [INFO] [stdout] 54 | if rows == 0 || row_num % rows != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!row_num.is_multiple_of(rows)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/layout_engine.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn process_entry( [INFO] [stdout] 21 | | &self, [INFO] [stdout] 22 | | entry: &str, [INFO] [stdout] 23 | | title_text: &str, [INFO] [stdout] ... | [INFO] [stdout] 29 | | bookline_active: &mut bool, [INFO] [stdout] 30 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/layout_engine.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | / if self.layout.multirows_bands > 1 { [INFO] [stdout] 73 | | let band = self.layout.columns * self.layout.rows_per_column; [INFO] [stdout] 74 | | let next_band_start = ((*pcnt) / band + 1) * band; [INFO] [stdout] 75 | | if next_band_start < self.layout.per_page { [INFO] [stdout] ... | [INFO] [stdout] 81 | | continue; [INFO] [stdout] 82 | | } [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] 71 ~ '^' [INFO] [stdout] 72 ~ if self.layout.multirows_bands > 1 => { [INFO] [stdout] 73 | let band = self.layout.columns * self.layout.rows_per_column; [INFO] [stdout] ... [INFO] [stdout] 81 | continue; [INFO] [stdout] 82 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/layout_engine.rs:45:25 [INFO] [stdout] | [INFO] [stdout] 45 | &mut current_page, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `current_page` [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 loop could be written as a `while let` loop [INFO] [stdout] --> src/preprocess.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | / loop { [INFO] [stdout] 192 | | let start = match temp.find('【') { [INFO] [stdout] 193 | | Some(idx) => idx, [INFO] [stdout] 194 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 209 | | temp.replace_range(start..remove_end, ""); [INFO] [stdout] 210 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 191 ~ while let Some(idx) = temp.find('【') { [INFO] [stdout] 192 + let start = idx; [INFO] [stdout] 193 + .. [INFO] [stdout] 194 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/preprocess.rs:203:12 [INFO] [stdout] | [INFO] [stdout] 203 | if len % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/preprocess.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / loop { [INFO] [stdout] 216 | | let start = match text.find('【') { [INFO] [stdout] 217 | | Some(idx) => idx, [INFO] [stdout] 218 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 226 | | text.replace_range(start..remove_end, ""); [INFO] [stdout] 227 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 215 ~ while let Some(idx) = text.find('【') { [INFO] [stdout] 216 + let start = idx; [INFO] [stdout] 217 + .. [INFO] [stdout] 218 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/layout_engine.rs:110:21 [INFO] [stdout] | [INFO] [stdout] 110 | while let Some(next) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next in chars.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` 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/layout_engine.rs:118:29 [INFO] [stdout] | [INFO] [stdout] 118 | ... &mut current_page, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `current_page` [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/layout_engine.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | &mut current_page, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `current_page` [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/layout_engine.rs:159:21 [INFO] [stdout] | [INFO] [stdout] 159 | / if *bookline_active && self.book.book_line_flag && ch != ' ' { [INFO] [stdout] 160 | | if let Some(bline) = &self.book.bookline { [INFO] [stdout] 161 | | current_page.lines.push(LineSpec { [INFO] [stdout] 162 | | x1: pos.x - bline.width, [INFO] [stdout] ... | [INFO] [stdout] 171 | | } [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] 159 ~ if *bookline_active && self.book.book_line_flag && ch != ' ' [INFO] [stdout] 160 ~ && let Some(bline) = &self.book.bookline { [INFO] [stdout] 161 | current_page.lines.push(LineSpec { [INFO] [stdout] ... [INFO] [stdout] 169 | }); [INFO] [stdout] 170 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/renderer.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | let background_image_id = if let Some(image) = ctx.background.as_ref() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 40 | | Some(register_image(&mut doc, image)) [INFO] [stdout] 41 | | } else { [INFO] [stdout] 42 | | None [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ help: try: `ctx.background.as_ref().map(|image| register_image(&mut doc, image))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | / if *bookline_active && self.book.book_line_flag && ch != ' ' { [INFO] [stdout] 200 | | if let Some(bline) = &self.book.bookline { [INFO] [stdout] 201 | | current_page.lines.push(LineSpec { [INFO] [stdout] 202 | | x1: pos.x - bline.width, [INFO] [stdout] ... | [INFO] [stdout] 211 | | } [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] 199 ~ if *bookline_active && self.book.book_line_flag && ch != ' ' [INFO] [stdout] 200 ~ && let Some(bline) = &self.book.bookline { [INFO] [stdout] 201 | current_page.lines.push(LineSpec { [INFO] [stdout] ... [INFO] [stdout] 209 | }); [INFO] [stdout] 210 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:214:13 [INFO] [stdout] | [INFO] [stdout] 214 | / if *pcnt == self.layout.per_page { [INFO] [stdout] 215 | | if let Some(&next) = chars.peek() { [INFO] [stdout] 216 | | if self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] 217 | | chars.next(); [INFO] [stdout] ... | [INFO] [stdout] 226 | | } [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] 214 ~ if *pcnt == self.layout.per_page [INFO] [stdout] 215 ~ && let Some(&next) = chars.peek() { [INFO] [stdout] 216 | if self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] ... [INFO] [stdout] 224 | } [INFO] [stdout] 225 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:215:17 [INFO] [stdout] | [INFO] [stdout] 215 | / if let Some(&next) = chars.peek() { [INFO] [stdout] 216 | | if self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] 217 | | chars.next(); [INFO] [stdout] 218 | | let pos_prev = last_pos.unwrap_or(pos); [INFO] [stdout] ... | [INFO] [stdout] 225 | | } [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] 215 ~ if let Some(&next) = chars.peek() [INFO] [stdout] 216 ~ && self.book.punctuation.text_nop.chars.contains(&next) { [INFO] [stdout] 217 | chars.next(); [INFO] [stdout] ... [INFO] [stdout] 223 | } [INFO] [stdout] 224 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/layout_engine.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | / fn render_comments( [INFO] [stdout] 232 | | &self, [INFO] [stdout] 233 | | current_page: &mut PagePlan, [INFO] [stdout] 234 | | pages: &mut Vec, [INFO] [stdout] ... | [INFO] [stdout] 239 | | title_text: &str, [INFO] [stdout] 240 | | ) -> Result<()> { [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/layout_engine.rs:248:27 [INFO] [stdout] | [INFO] [stdout] 248 | 'outer: while let Some(_) = remaining.front() { [INFO] [stdout] | ------------------^^^^^^^-------------------- help: try: `while remaining.front().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:283:21 [INFO] [stdout] | [INFO] [stdout] 283 | / if let Some(last) = comment_last_slot { [INFO] [stdout] 284 | | if self.book.punctuation.comment_nop.chars.contains(&ch) { [INFO] [stdout] 285 | | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | | current_page.glyphs.push(spec); [INFO] [stdout] ... | [INFO] [stdout] 289 | | } [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] 283 ~ if let Some(last) = comment_last_slot [INFO] [stdout] 284 ~ && self.book.punctuation.comment_nop.chars.contains(&ch) { [INFO] [stdout] 285 | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | current_page.glyphs.push(spec); [INFO] [stdout] 287 | } [INFO] [stdout] 288 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | / if self.book.punctuation.comment_nop.chars.contains(&ch) { [INFO] [stdout] 285 | | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | | current_page.glyphs.push(spec); [INFO] [stdout] 287 | | } [INFO] [stdout] 288 | | } [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] 284 ~ if self.book.punctuation.comment_nop.chars.contains(&ch) [INFO] [stdout] 285 ~ && let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 286 | current_page.glyphs.push(spec); [INFO] [stdout] 287 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | / if let Some(font_idx) = ctx.fonts.text_stack.first().copied() { [INFO] [stdout] 189 | | if let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 190 | | for (idx, ch) in ctx.book.title.chars().enumerate() { [INFO] [stdout] 191 | | let x = ctx.book.cover.title_font_size; [INFO] [stdout] ... | [INFO] [stdout] 223 | | } [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] 188 ~ if let Some(font_idx) = ctx.fonts.text_stack.first().copied() [INFO] [stdout] 189 ~ && let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 190 | for (idx, ch) in ctx.book.title.chars().enumerate() { [INFO] [stdout] ... [INFO] [stdout] 221 | } [INFO] [stdout] 222 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:233:5 [INFO] [stdout] | [INFO] [stdout] 233 | / if let Some(font_idx) = ctx.fonts.text_stack.first().copied() { [INFO] [stdout] 234 | | if let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 235 | | for (idx, ch) in title.chars().enumerate() { [INFO] [stdout] 236 | | let x = if ctx.book.title_style.center { [INFO] [stdout] ... | [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] 233 ~ if let Some(font_idx) = ctx.fonts.text_stack.first().copied() [INFO] [stdout] 234 ~ && let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 235 | for (idx, ch) in title.chars().enumerate() { [INFO] [stdout] ... [INFO] [stdout] 253 | } [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:264:5 [INFO] [stdout] | [INFO] [stdout] 264 | / if let Some(font_idx) = ctx.fonts.text_stack.first().copied() { [INFO] [stdout] 265 | | if let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 266 | | let text = ctx.numerals.render(number); [INFO] [stdout] 267 | | for (idx, ch) in text.chars().enumerate() { [INFO] [stdout] ... | [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] 264 ~ if let Some(font_idx) = ctx.fonts.text_stack.first().copied() [INFO] [stdout] 265 ~ && let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 266 | let text = ctx.numerals.render(number); [INFO] [stdout] ... [INFO] [stdout] 281 | } [INFO] [stdout] 282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:377:21 [INFO] [stdout] | [INFO] [stdout] 377 | / if let Some(last) = last_pos { [INFO] [stdout] 378 | | if let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 379 | | current_page.glyphs.push(spec); [INFO] [stdout] 380 | | } [INFO] [stdout] 381 | | } [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] 377 ~ if let Some(last) = last_pos [INFO] [stdout] 378 ~ && let Some(spec) = self.build_text_glyph(last, ch, true, true, false) { [INFO] [stdout] 379 | current_page.glyphs.push(spec); [INFO] [stdout] 380 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout_engine.rs:404:17 [INFO] [stdout] | [INFO] [stdout] 404 | / if comment_bookline_active && self.book.book_line_flag && ch != ' ' { [INFO] [stdout] 405 | | if let Some(bline) = &self.book.bookline { [INFO] [stdout] 406 | | current_page.lines.push(LineSpec { [INFO] [stdout] 407 | | x1: pos.x - bline.width, [INFO] [stdout] ... | [INFO] [stdout] 416 | | } [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] 404 ~ if comment_bookline_active && self.book.book_line_flag && ch != ' ' [INFO] [stdout] 405 ~ && let Some(bline) = &self.book.bookline { [INFO] [stdout] 406 | current_page.lines.push(LineSpec { [INFO] [stdout] ... [INFO] [stdout] 414 | }); [INFO] [stdout] 415 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/layout_engine.rs:422:30 [INFO] [stdout] | [INFO] [stdout] 422 | let slots_used = (non_nop_count + 1) / 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `non_nop_count.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/layout_engine.rs:427:26 [INFO] [stdout] | [INFO] [stdout] 427 | queue.extend(remaining.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:416:17 [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] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 427 - queue.extend(remaining.into_iter()); [INFO] [stdout] 427 + queue.extend(remaining); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/renderer.rs:291:5 [INFO] [stdout] | [INFO] [stdout] 291 | / let mut points = Vec::with_capacity(2); [INFO] [stdout] 292 | | points.push(LinePoint { [INFO] [stdout] 293 | | p: Point::new(px_to_mm(line.x1), px_to_mm(line.y1)), [INFO] [stdout] 294 | | bezier: false, [INFO] [stdout] ... | [INFO] [stdout] 298 | | bezier: false, [INFO] [stdout] 299 | | }); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let points = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/renderer.rs:359:1 [INFO] [stdout] | [INFO] [stdout] 359 | / fn push_text_ops( [INFO] [stdout] 360 | | ops: &mut Vec, [INFO] [stdout] 361 | | font_id: &FontId, [INFO] [stdout] 362 | | color: &RgbColor, [INFO] [stdout] ... | [INFO] [stdout] 367 | | text: &str, [INFO] [stdout] 368 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/layout_engine.rs:607:9 [INFO] [stdout] | [INFO] [stdout] 607 | (consuming + 1) / 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `consuming.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/renderer.rs:633:13 [INFO] [stdout] | [INFO] [stdout] 633 | bytes.len() > 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bytes.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: the loop variable `c` is only used to index `p` [INFO] [stdout] --> src/background.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | for c in 0..3 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 158 - for c in 0..3 { [INFO] [stdout] 158 + for in p.iter_mut().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/numerals.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | / if let (Some(key), Some(value)) = (parts.next(), parts.next()) { [INFO] [stdout] 24 | | if let Ok(num) = key.parse::() { [INFO] [stdout] 25 | | map.insert(num, value.to_string()); [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [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] 23 ~ if let (Some(key), Some(value)) = (parts.next(), parts.next()) [INFO] [stdout] 24 ~ && let Ok(num) = key.parse::() { [INFO] [stdout] 25 | map.insert(num, value.to_string()); [INFO] [stdout] 26 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | / if cli.compress { [INFO] [stdout] 135 | | if let Err(err) = compress_pdf(&output_path) { [INFO] [stdout] 136 | | eprintln!("PDF compression failed: {err}"); [INFO] [stdout] 137 | | } [INFO] [stdout] 138 | | } [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] 134 ~ if cli.compress [INFO] [stdout] 135 ~ && let Err(err) = compress_pdf(&output_path) { [INFO] [stdout] 136 | eprintln!("PDF compression failed: {err}"); [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/preprocess.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | / loop { [INFO] [stdout] 192 | | let start = match temp.find('【') { [INFO] [stdout] 193 | | Some(idx) => idx, [INFO] [stdout] 194 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 209 | | temp.replace_range(start..remove_end, ""); [INFO] [stdout] 210 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 191 ~ while let Some(idx) = temp.find('【') { [INFO] [stdout] 192 + let start = idx; [INFO] [stdout] 193 + .. [INFO] [stdout] 194 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/preprocess.rs:203:12 [INFO] [stdout] | [INFO] [stdout] 203 | if len % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/preprocess.rs:215:5 [INFO] [stdout] | [INFO] [stdout] 215 | / loop { [INFO] [stdout] 216 | | let start = match text.find('【') { [INFO] [stdout] 217 | | Some(idx) => idx, [INFO] [stdout] 218 | | None => break, [INFO] [stdout] ... | [INFO] [stdout] 226 | | text.replace_range(start..remove_end, ""); [INFO] [stdout] 227 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 215 ~ while let Some(idx) = text.find('【') { [INFO] [stdout] 216 + let start = idx; [INFO] [stdout] 217 + .. [INFO] [stdout] 218 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/renderer.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 39 | let background_image_id = if let Some(image) = ctx.background.as_ref() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 40 | | Some(register_image(&mut doc, image)) [INFO] [stdout] 41 | | } else { [INFO] [stdout] 42 | | None [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ help: try: `ctx.background.as_ref().map(|image| register_image(&mut doc, image))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | / if let Some(font_idx) = ctx.fonts.text_stack.first().copied() { [INFO] [stdout] 189 | | if let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 190 | | for (idx, ch) in ctx.book.title.chars().enumerate() { [INFO] [stdout] 191 | | let x = ctx.book.cover.title_font_size; [INFO] [stdout] ... | [INFO] [stdout] 223 | | } [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] 188 ~ if let Some(font_idx) = ctx.fonts.text_stack.first().copied() [INFO] [stdout] 189 ~ && let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 190 | for (idx, ch) in ctx.book.title.chars().enumerate() { [INFO] [stdout] ... [INFO] [stdout] 221 | } [INFO] [stdout] 222 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:233:5 [INFO] [stdout] | [INFO] [stdout] 233 | / if let Some(font_idx) = ctx.fonts.text_stack.first().copied() { [INFO] [stdout] 234 | | if let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 235 | | for (idx, ch) in title.chars().enumerate() { [INFO] [stdout] 236 | | let x = if ctx.book.title_style.center { [INFO] [stdout] ... | [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] 233 ~ if let Some(font_idx) = ctx.fonts.text_stack.first().copied() [INFO] [stdout] 234 ~ && let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 235 | for (idx, ch) in title.chars().enumerate() { [INFO] [stdout] ... [INFO] [stdout] 253 | } [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/renderer.rs:264:5 [INFO] [stdout] | [INFO] [stdout] 264 | / if let Some(font_idx) = ctx.fonts.text_stack.first().copied() { [INFO] [stdout] 265 | | if let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 266 | | let text = ctx.numerals.render(number); [INFO] [stdout] 267 | | for (idx, ch) in text.chars().enumerate() { [INFO] [stdout] ... | [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] 264 ~ if let Some(font_idx) = ctx.fonts.text_stack.first().copied() [INFO] [stdout] 265 ~ && let Some(font_id) = font_id(font_ids, font_idx) { [INFO] [stdout] 266 | let text = ctx.numerals.render(number); [INFO] [stdout] ... [INFO] [stdout] 281 | } [INFO] [stdout] 282 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/renderer.rs:291:5 [INFO] [stdout] | [INFO] [stdout] 291 | / let mut points = Vec::with_capacity(2); [INFO] [stdout] 292 | | points.push(LinePoint { [INFO] [stdout] 293 | | p: Point::new(px_to_mm(line.x1), px_to_mm(line.y1)), [INFO] [stdout] 294 | | bezier: false, [INFO] [stdout] ... | [INFO] [stdout] 298 | | bezier: false, [INFO] [stdout] 299 | | }); [INFO] [stdout] | |_______^ help: consider using the `vec![]` macro: `let points = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/renderer.rs:359:1 [INFO] [stdout] | [INFO] [stdout] 359 | / fn push_text_ops( [INFO] [stdout] 360 | | ops: &mut Vec, [INFO] [stdout] 361 | | font_id: &FontId, [INFO] [stdout] 362 | | color: &RgbColor, [INFO] [stdout] ... | [INFO] [stdout] 367 | | text: &str, [INFO] [stdout] 368 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | / if cli.compress { [INFO] [stdout] 135 | | if let Err(err) = compress_pdf(&output_path) { [INFO] [stdout] 136 | | eprintln!("PDF compression failed: {err}"); [INFO] [stdout] 137 | | } [INFO] [stdout] 138 | | } [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] 134 ~ if cli.compress [INFO] [stdout] 135 ~ && let Err(err) = compress_pdf(&output_path) { [INFO] [stdout] 136 | eprintln!("PDF compression failed: {err}"); [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 10s [INFO] running `Command { std: "docker" "inspect" "9f115465473f6d92189ad9e8d38d1580a9249deb67a5fa526e6b9d9fb39b9680", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9f115465473f6d92189ad9e8d38d1580a9249deb67a5fa526e6b9d9fb39b9680", kill_on_drop: false }` [INFO] [stdout] 9f115465473f6d92189ad9e8d38d1580a9249deb67a5fa526e6b9d9fb39b9680