[INFO] cloning repository https://github.com/huyuneko0212/rust-browser-engine [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/huyuneko0212/rust-browser-engine" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhuyuneko0212%2Frust-browser-engine", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhuyuneko0212%2Frust-browser-engine'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b06a36bc5c646f43882eb814e26416e658772fd2 [INFO] linting huyuneko0212/rust-browser-engine against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhuyuneko0212%2Frust-browser-engine" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/huyuneko0212/rust-browser-engine [INFO] finished tweaking git repo https://github.com/huyuneko0212/rust-browser-engine [INFO] tweaked toml for git repo https://github.com/huyuneko0212/rust-browser-engine written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/huyuneko0212/rust-browser-engine 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/huyuneko0212/rust-browser-engine 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 2f2b6663125d914f653be35d2d0fa26e0772b58498a5868c53f46f0e0353eaaf [INFO] running `Command { std: "docker" "start" "-a" "2f2b6663125d914f653be35d2d0fa26e0772b58498a5868c53f46f0e0353eaaf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2f2b6663125d914f653be35d2d0fa26e0772b58498a5868c53f46f0e0353eaaf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2f2b6663125d914f653be35d2d0fa26e0772b58498a5868c53f46f0e0353eaaf", kill_on_drop: false }` [INFO] [stdout] 2f2b6663125d914f653be35d2d0fa26e0772b58498a5868c53f46f0e0353eaaf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] e04588a0f777d44966deda4737ec22104da792734455d50fcb9ff29ef78d5000 [INFO] running `Command { std: "docker" "start" "-a" "e04588a0f777d44966deda4737ec22104da792734455d50fcb9ff29ef78d5000", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling memchr v2.8.0 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Checking rustix v1.1.3 [INFO] [stderr] Compiling wayland-backend v0.3.12 [INFO] [stderr] Checking rustix v0.38.44 [INFO] [stderr] Checking as-slice v0.2.1 [INFO] [stderr] Compiling ash v0.37.3+1.3.251 [INFO] [stderr] Checking bit-vec v0.6.3 [INFO] [stderr] Compiling built v0.8.0 [INFO] [stderr] Compiling av-scenechange v0.14.1 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Checking core2 v0.4.0 [INFO] [stderr] Compiling wgpu-hal v0.19.5 [INFO] [stderr] Checking gpu-descriptor-types v0.1.2 [INFO] [stderr] Checking aligned v0.4.3 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Compiling pastey v0.1.1 [INFO] [stderr] Checking y4m v0.8.0 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Checking bitstream-io v4.9.0 [INFO] [stderr] Checking flate2 v1.1.9 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Compiling wgpu-core v0.19.4 [INFO] [stderr] Checking wgpu-types v0.19.2 [INFO] [stderr] Checking bit-set v0.5.3 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Checking imgref v1.12.0 [INFO] [stderr] Checking weezl v0.1.12 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Checking loop9 v0.1.5 [INFO] [stderr] Compiling rav1e v0.8.1 [INFO] [stderr] Checking zune-jpeg v0.4.21 [INFO] [stderr] Checking zune-inflate v0.2.54 [INFO] [stderr] Compiling wgpu v0.19.4 [INFO] [stderr] Compiling quick-xml v0.38.4 [INFO] [stderr] Checking avif-serialize v0.8.8 [INFO] [stderr] Checking bit_field v0.10.3 [INFO] [stderr] Checking lebe v0.5.3 [INFO] [stderr] Checking zune-core v0.5.1 [INFO] [stderr] Checking rgb v0.8.52 [INFO] [stderr] Checking image-webp v0.2.4 [INFO] [stderr] Checking gif v0.14.1 [INFO] [stderr] Checking png v0.18.0 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking pxfm v0.1.27 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking brotli-decompressor v4.0.3 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking zune-jpeg v0.5.12 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking pollster v0.3.0 [INFO] [stderr] Compiling wayland-scanner v0.31.8 [INFO] [stderr] Checking brotli v6.0.0 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking moxcms v0.7.11 [INFO] [stderr] Compiling zerocopy-derive v0.8.39 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling equator-macro v0.4.2 [INFO] [stderr] Compiling profiling-procmacros v1.0.17 [INFO] [stderr] Compiling bytemuck_derive v1.10.2 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Compiling fax_derive v0.2.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Checking openssl v0.10.75 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Checking fax v0.2.6 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking calloop v0.12.4 [INFO] [stderr] Checking naga v0.19.2 [INFO] [stderr] Checking equator v0.4.2 [INFO] [stderr] Checking wayland-client v0.31.12 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Checking zerocopy v0.8.39 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Checking aligned-vec v0.6.4 [INFO] [stderr] Checking v_frame v0.3.9 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Checking av1-grain v0.2.5 [INFO] [stderr] Checking wayland-protocols v0.31.2 [INFO] [stderr] Checking calloop-wayland-source v0.2.0 [INFO] [stderr] Checking wayland-cursor v0.31.12 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking native-tls v0.2.14 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking tiff v0.10.3 [INFO] [stderr] Checking exr v1.74.0 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking wayland-protocols-wlr v0.2.0 [INFO] [stderr] Checking wayland-protocols-plasma v0.2.0 [INFO] [stderr] Checking gpu-descriptor v0.2.4 [INFO] [stderr] Checking fontdue v0.8.0 [INFO] [stderr] Checking smithay-client-toolkit v0.18.1 [INFO] [stderr] Checking ravif v0.12.0 [INFO] [stderr] Checking sctk-adwaita v0.8.3 [INFO] [stderr] Checking image v0.25.9 [INFO] [stderr] Checking winit v0.29.15 [INFO] [stderr] Checking rust_web_browser_engineering v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `radius` is never read [INFO] [stdout] --> src/display.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct DrawRect { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | pub radius: f32, // ★ 追加: border-radius 用 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DrawRect` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `radius` is never read [INFO] [stdout] --> src/display.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct DrawBorder { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 35 | pub radius: f32, // 角丸枠用 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DrawBorder` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `alt` is never read [INFO] [stdout] --> src/display.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 57 | pub struct DrawImage { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 66 | pub alt: Option, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DrawImage` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `viewport_width` is never used [INFO] [stdout] --> src/gpu.rs:636:12 [INFO] [stdout] | [INFO] [stdout] 196 | impl<'a> GPU<'a> { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 636 | pub fn viewport_width(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/css.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | /// それ以外はそのまま 1 件の Declaration にする。 [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 341 | /// それ以外はそのまま 1 件の Declaration にする。 [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/dom.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | .unwrap_or_else(Vec::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/html.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|h| take_children(h)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `take_children` [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: redundant closure [INFO] [stdout] --> src/html.rs:80:14 [INFO] [stdout] | [INFO] [stdout] 80 | .map(|b| take_children(b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `take_children` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:400:17 [INFO] [stdout] | [INFO] [stdout] 400 | / if parent_tag == Some("body") { [INFO] [stdout] 401 | | if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 402 | | if end == "html" { [INFO] [stdout] 403 | | break; [INFO] [stdout] ... | [INFO] [stdout] 406 | | } [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] 400 ~ if parent_tag == Some("body") [INFO] [stdout] 401 ~ && let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 402 | if end == "html" { [INFO] [stdout] 403 | break; [INFO] [stdout] 404 | } [INFO] [stdout] 405 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:401:21 [INFO] [stdout] | [INFO] [stdout] 401 | / if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 402 | | if end == "html" { [INFO] [stdout] 403 | | break; [INFO] [stdout] 404 | | } [INFO] [stdout] 405 | | } [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] 401 ~ if let Some(end) = self.peek_end_tag_name() [INFO] [stdout] 402 ~ && end == "html" { [INFO] [stdout] 403 | break; [INFO] [stdout] 404 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:408:17 [INFO] [stdout] | [INFO] [stdout] 408 | / if parent_tag == Some("html") { [INFO] [stdout] 409 | | if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 410 | | if end == "html" { [INFO] [stdout] 411 | | break; [INFO] [stdout] ... | [INFO] [stdout] 414 | | } [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] 408 ~ if parent_tag == Some("html") [INFO] [stdout] 409 ~ && let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 410 | if end == "html" { [INFO] [stdout] 411 | break; [INFO] [stdout] 412 | } [INFO] [stdout] 413 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:409:21 [INFO] [stdout] | [INFO] [stdout] 409 | / if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 410 | | if end == "html" { [INFO] [stdout] 411 | | break; [INFO] [stdout] 412 | | } [INFO] [stdout] 413 | | } [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] 409 ~ if let Some(end) = self.peek_end_tag_name() [INFO] [stdout] 410 ~ && end == "html" { [INFO] [stdout] 411 | break; [INFO] [stdout] 412 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | / if parent_tag == Some("p") && self.next_char() == '<' { [INFO] [stdout] 420 | | if let Some(next_tag) = self.peek_start_tag_name() { [INFO] [stdout] 421 | | // next_tag は小文字 [INFO] [stdout] 422 | | if is_block_tag(&next_tag) { [INFO] [stdout] ... | [INFO] [stdout] 426 | | } [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] 419 ~ if parent_tag == Some("p") && self.next_char() == '<' [INFO] [stdout] 420 ~ && let Some(next_tag) = self.peek_start_tag_name() { [INFO] [stdout] 421 | // next_tag は小文字 [INFO] [stdout] ... [INFO] [stdout] 424 | } [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/http.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / if matches!(resp.status_code, 301 | 302 | 303 | 307 | 308) { [INFO] [stdout] 120 | | if let Some(loc) = resp.header("location").map(str::to_string) { [INFO] [stdout] 121 | | current = current.resolve_location(&loc); [INFO] [stdout] 122 | | continue; [INFO] [stdout] 123 | | } [INFO] [stdout] 124 | | } [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] 119 ~ if matches!(resp.status_code, 301 | 302 | 303 | 307 | 308) [INFO] [stdout] 120 ~ && let Some(loc) = resp.header("location").map(str::to_string) { [INFO] [stdout] 121 | current = current.resolve_location(&loc); [INFO] [stdout] 122 | continue; [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 - d.content.height = ih.max(1.0); [INFO] [stdout] 176 - return; [INFO] [stdout] 175 + d.content.height = ih.max(1.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | / if let Some(v) = ml_s.as_deref() { [INFO] [stdout] 247 | | if v.trim() != "auto" { [INFO] [stdout] 248 | | ml = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 249 | | } [INFO] [stdout] 250 | | } [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] 246 ~ if let Some(v) = ml_s.as_deref() [INFO] [stdout] 247 ~ && v.trim() != "auto" { [INFO] [stdout] 248 | ml = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | / if let Some(v) = mr_s.as_deref() { [INFO] [stdout] 252 | | if v.trim() != "auto" { [INFO] [stdout] 253 | | mr = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 254 | | } [INFO] [stdout] 255 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 251 ~ if let Some(v) = mr_s.as_deref() [INFO] [stdout] 252 ~ && v.trim() != "auto" { [INFO] [stdout] 253 | mr = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:292:9 [INFO] [stdout] | [INFO] [stdout] 292 | / if ml_s.is_none() && mr_s.is_none() && mt_s.is_none() && mb_s.is_none() { [INFO] [stdout] 293 | | if let Some(sh) = margin_sh.as_deref() { [INFO] [stdout] 294 | | let m = parse_4len(sh); [INFO] [stdout] 295 | | if let Some(top) = m.0.as_deref() { [INFO] [stdout] ... | [INFO] [stdout] 312 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 292 ~ if ml_s.is_none() && mr_s.is_none() && mt_s.is_none() && mb_s.is_none() [INFO] [stdout] 293 ~ && let Some(sh) = margin_sh.as_deref() { [INFO] [stdout] 294 | let m = parse_4len(sh); [INFO] [stdout] ... [INFO] [stdout] 310 | } [INFO] [stdout] 311 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:298:17 [INFO] [stdout] | [INFO] [stdout] 298 | / if let Some(right) = m.1.as_deref() { [INFO] [stdout] 299 | | if right.trim() != "auto" { [INFO] [stdout] 300 | | mr = parse_length(right, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 301 | | } [INFO] [stdout] 302 | | } [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] 298 ~ if let Some(right) = m.1.as_deref() [INFO] [stdout] 299 ~ && right.trim() != "auto" { [INFO] [stdout] 300 | mr = parse_length(right, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:306:17 [INFO] [stdout] | [INFO] [stdout] 306 | / if let Some(left) = m.3.as_deref() { [INFO] [stdout] 307 | | if left.trim() != "auto" { [INFO] [stdout] 308 | | ml = parse_length(left, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 309 | | } [INFO] [stdout] 310 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ if let Some(left) = m.3.as_deref() [INFO] [stdout] 307 ~ && left.trim() != "auto" { [INFO] [stdout] 308 | ml = parse_length(left, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:315:9 [INFO] [stdout] | [INFO] [stdout] 315 | / if pl_s.is_none() && pr_s.is_none() && pt_s.is_none() && pb_s.is_none() { [INFO] [stdout] 316 | | if let Some(sh) = padding_sh.as_deref() { [INFO] [stdout] 317 | | let p = parse_4len(sh); [INFO] [stdout] 318 | | if let Some(top) = p.0.as_deref() { [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [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] 315 ~ if pl_s.is_none() && pr_s.is_none() && pt_s.is_none() && pb_s.is_none() [INFO] [stdout] 316 ~ && let Some(sh) = padding_sh.as_deref() { [INFO] [stdout] 317 | let p = parse_4len(sh); [INFO] [stdout] ... [INFO] [stdout] 329 | } [INFO] [stdout] 330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | / if blw_s.is_none() && brw_s.is_none() && btw_s.is_none() && bbw_s.is_none() { [INFO] [stdout] 335 | | if let Some(sh) = border_width_sh.as_deref() { [INFO] [stdout] 336 | | let b = parse_4len(sh); [INFO] [stdout] 337 | | if let Some(top) = b.0.as_deref() { [INFO] [stdout] ... | [INFO] [stdout] 350 | | } [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] 334 ~ if blw_s.is_none() && brw_s.is_none() && btw_s.is_none() && bbw_s.is_none() [INFO] [stdout] 335 ~ && let Some(sh) = border_width_sh.as_deref() { [INFO] [stdout] 336 | let b = parse_4len(sh); [INFO] [stdout] ... [INFO] [stdout] 348 | } [INFO] [stdout] 349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:354:9 [INFO] [stdout] | [INFO] [stdout] 354 | / if let Some(v) = border_radius_s.as_deref() { [INFO] [stdout] 355 | | if let Some(r) = parse_length(v, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 356 | | border_radius = r.max(0.0); [INFO] [stdout] 357 | | } [INFO] [stdout] 358 | | } [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] 354 ~ if let Some(v) = border_radius_s.as_deref() [INFO] [stdout] 355 ~ && let Some(r) = parse_length(v, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 356 | border_radius = r.max(0.0); [INFO] [stdout] 357 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:402:17 [INFO] [stdout] | [INFO] [stdout] 402 | / if (!la || !ra) [INFO] [stdout] 403 | | && s.value("margin-left").is_none() [INFO] [stdout] 404 | | && s.value("margin-right").is_none() [INFO] [stdout] ... | [INFO] [stdout] 419 | | } [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 ~ && s.value("margin-right").is_none() [INFO] [stdout] 405 ~ && let Some(m) = s.value("margin") { [INFO] [stdout] 406 | let m4 = parse_4len(m); [INFO] [stdout] ... [INFO] [stdout] 416 | } [INFO] [stdout] 417 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:408:25 [INFO] [stdout] | [INFO] [stdout] 408 | / if let Some(r) = m4.1.as_deref() { [INFO] [stdout] 409 | | if r.trim() == "auto" { [INFO] [stdout] 410 | | ra = true; [INFO] [stdout] 411 | | } [INFO] [stdout] 412 | | } [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] 408 ~ if let Some(r) = m4.1.as_deref() [INFO] [stdout] 409 ~ && r.trim() == "auto" { [INFO] [stdout] 410 | ra = true; [INFO] [stdout] 411 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:413:25 [INFO] [stdout] | [INFO] [stdout] 413 | / if let Some(l) = m4.3.as_deref() { [INFO] [stdout] 414 | | if l.trim() == "auto" { [INFO] [stdout] 415 | | la = true; [INFO] [stdout] 416 | | } [INFO] [stdout] 417 | | } [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] 413 ~ if let Some(l) = m4.3.as_deref() [INFO] [stdout] 414 ~ && l.trim() == "auto" { [INFO] [stdout] 415 | la = true; [INFO] [stdout] 416 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 426 | / if let Some(ws) = width_str.as_deref() { [INFO] [stdout] 427 | | if let Some(w) = parse_length(ws, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 428 | | d.content.width = w.max(0.0); [INFO] [stdout] 429 | | } [INFO] [stdout] 430 | | } [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] 426 ~ if let Some(ws) = width_str.as_deref() [INFO] [stdout] 427 ~ && let Some(w) = parse_length(ws, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 428 | d.content.width = w.max(0.0); [INFO] [stdout] 429 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:498:9 [INFO] [stdout] | [INFO] [stdout] 498 | / if let Some(hs) = h_str.as_deref() { [INFO] [stdout] 499 | | if let Some(h) = parse_length(hs, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 500 | | self.dimensions.content.height = h.max(0.0); [INFO] [stdout] 501 | | return; [INFO] [stdout] 502 | | } [INFO] [stdout] 503 | | } [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] 498 ~ if let Some(hs) = h_str.as_deref() [INFO] [stdout] 499 ~ && let Some(h) = parse_length(hs, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 500 | self.dimensions.content.height = h.max(0.0); [INFO] [stdout] 501 | return; [INFO] [stdout] 502 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:506:9 [INFO] [stdout] | [INFO] [stdout] 506 | / if !has_any_child { [INFO] [stdout] 507 | | if let Some(sn) = self.get_style_node() { [INFO] [stdout] 508 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 509 | | if ed.tag_name == "img" { [INFO] [stdout] ... | [INFO] [stdout] 530 | | } [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] 506 ~ if !has_any_child [INFO] [stdout] 507 ~ && let Some(sn) = self.get_style_node() { [INFO] [stdout] 508 | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] ... [INFO] [stdout] 528 | } [INFO] [stdout] 529 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | / if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 509 | | if ed.tag_name == "img" { [INFO] [stdout] 510 | | let (_iw, ih) = img_intrinsic_size_px(sn, img_cache); [INFO] [stdout] 511 | | self.dimensions.content.height = ih.max(1.0); [INFO] [stdout] ... | [INFO] [stdout] 514 | | } [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] 508 ~ if let crate::dom::NodeType::Element(ed) = &sn.node.node_type [INFO] [stdout] 509 ~ && ed.tag_name == "img" { [INFO] [stdout] 510 | let (_iw, ih) = img_intrinsic_size_px(sn, img_cache); [INFO] [stdout] 511 | self.dimensions.content.height = ih.max(1.0); [INFO] [stdout] 512 | return; [INFO] [stdout] 513 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/layout.rs:543:9 [INFO] [stdout] | [INFO] [stdout] 543 | / fn walk_inline( [INFO] [stdout] 544 | | node: &mut LayoutBox, [INFO] [stdout] 545 | | font: &Font, [INFO] [stdout] 546 | | img_cache: &dyn ImageSizeProvider, [INFO] [stdout] ... | [INFO] [stdout] 551 | | current_line_h: &mut f32, [INFO] [stdout] 552 | | ) { [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` statement can be collapsed [INFO] [stdout] --> src/layout.rs:882:9 [INFO] [stdout] | [INFO] [stdout] 882 | / if let Some((nw, nh)) = natural { [INFO] [stdout] 883 | | if nw > 0 && nh > 0 { [INFO] [stdout] 884 | | let ratio = (nh as f32) / (nw as f32); [INFO] [stdout] 885 | | return (w.max(1.0), (w * ratio).max(1.0)); [INFO] [stdout] 886 | | } [INFO] [stdout] 887 | | } [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] 882 ~ if let Some((nw, nh)) = natural [INFO] [stdout] 883 ~ && nw > 0 && nh > 0 { [INFO] [stdout] 884 | let ratio = (nh as f32) / (nw as f32); [INFO] [stdout] 885 | return (w.max(1.0), (w * ratio).max(1.0)); [INFO] [stdout] 886 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:892:9 [INFO] [stdout] | [INFO] [stdout] 892 | / if let Some((nw, nh)) = natural { [INFO] [stdout] 893 | | if nw > 0 && nh > 0 { [INFO] [stdout] 894 | | let ratio = (nw as f32) / (nh as f32); [INFO] [stdout] 895 | | return ((h * ratio).max(1.0), h.max(1.0)); [INFO] [stdout] 896 | | } [INFO] [stdout] 897 | | } [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] 892 ~ if let Some((nw, nh)) = natural [INFO] [stdout] 893 ~ && nw > 0 && nh > 0 { [INFO] [stdout] 894 | let ratio = (nw as f32) / (nh as f32); [INFO] [stdout] 895 | return ((h * ratio).max(1.0), h.max(1.0)); [INFO] [stdout] 896 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/style.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | ancestors: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 178 ~ ancestors: &[Ancestor], [INFO] [stdout] 179 | inherited_values: &HashMap, [INFO] [stdout] ... [INFO] [stdout] 209 | // 子へ渡す ancestor stack [INFO] [stdout] 210 ~ let mut next_ancestors = ancestors.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/style.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | / if let NodeType::Element(ref e) = root.node_type { [INFO] [stdout] 195 | | if e.tag_name == "a" { [INFO] [stdout] 196 | | if let Some(href) = e.attributes.get("href") { [INFO] [stdout] 197 | | let h = href.trim(); [INFO] [stdout] ... | [INFO] [stdout] 207 | | } [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] 194 ~ if let NodeType::Element(ref e) = root.node_type [INFO] [stdout] 195 ~ && e.tag_name == "a" { [INFO] [stdout] 196 | if let Some(href) = e.attributes.get("href") { [INFO] [stdout] ... [INFO] [stdout] 205 | } [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/style.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | / if e.tag_name == "a" { [INFO] [stdout] 196 | | if let Some(href) = e.attributes.get("href") { [INFO] [stdout] 197 | | let h = href.trim(); [INFO] [stdout] 198 | | if !h.is_empty() [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] 195 ~ if e.tag_name == "a" [INFO] [stdout] 196 ~ && let Some(href) = e.attributes.get("href") { [INFO] [stdout] 197 | let h = href.trim(); [INFO] [stdout] ... [INFO] [stdout] 204 | } [INFO] [stdout] 205 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/style.rs:342:16 [INFO] [stdout] | [INFO] [stdout] 342 | return elem.classes().iter().any(|c| *c == class); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.classes().contains(&class)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/style.rs:350:16 [INFO] [stdout] | [INFO] [stdout] 350 | return elem.classes().iter().any(|c| *c == class); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.classes().contains(&class)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/style.rs:390:37 [INFO] [stdout] | [INFO] [stdout] 390 | let parts: Vec<&str> = selector.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: name `URL` contains a capitalized acronym [INFO] [stdout] --> src/url.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct URL { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `copied` [INFO] [stdout] --> src/url.rs:222:16 [INFO] [stdout] | [INFO] [stdout] 222 | for seg in parts.iter().copied() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 222 - for seg in parts.iter().copied() { [INFO] [stdout] 222 + for seg in parts.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 88 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 89 | | match ed.tag_name.as_str() { [INFO] [stdout] 90 | | "style" | "script" | "head" | "title" | "meta" | "link" => return, [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [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] 87 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 88 ~ && let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 89 | match ed.tag_name.as_str() { [INFO] [stdout] ... [INFO] [stdout] 92 | } [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / if matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 101 | | if let Some(sn) = node.get_style_node() { [INFO] [stdout] 102 | | if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | | if let Some(bg) = sn.background_color() { [INFO] [stdout] ... | [INFO] [stdout] 128 | | } [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] 100 ~ if matches!(node.box_type, BoxType::InlineNode(_)) [INFO] [stdout] 101 ~ && let Some(sn) = node.get_style_node() { [INFO] [stdout] 102 | if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] ... [INFO] [stdout] 126 | } [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 102 | | if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | | if let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] ... | [INFO] [stdout] 127 | | } [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] 101 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 102 ~ && matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | if let Some(bg) = sn.background_color() { [INFO] [stdout] ... [INFO] [stdout] 125 | } [INFO] [stdout] 126 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | / if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | | if let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] 105 | | let (pt, pr, pb, pl) = padding_trbl(sn); [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [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] 102 ~ if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) [INFO] [stdout] 103 ~ && let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] 125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | / if let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] 105 | | let (pt, pr, pb, pl) = padding_trbl(sn); [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [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] 103 ~ if let Some(bg) = sn.background_color() [INFO] [stdout] 104 ~ && let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] 105 | let (pt, pr, pb, pl) = padding_trbl(sn); [INFO] [stdout] ... [INFO] [stdout] 123 | } [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:152:9 [INFO] [stdout] | [INFO] [stdout] 152 | / if border_box.width > 0.0 && border_box.height > 0.0 { [INFO] [stdout] 153 | | if let Some(sn) = node.get_style_node() { [INFO] [stdout] 154 | | let radius = d.border_radius.max(0.0); [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [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] 152 ~ if border_box.width > 0.0 && border_box.height > 0.0 [INFO] [stdout] 153 ~ && let Some(sn) = node.get_style_node() { [INFO] [stdout] 154 | let radius = d.border_radius.max(0.0); [INFO] [stdout] ... [INFO] [stdout] 194 | } [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 200 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 201 | | if ed.tag_name == "li" { [INFO] [stdout] 202 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 230 | | } [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 let Some(sn) = node.get_style_node() [INFO] [stdout] 200 ~ && let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 201 | if ed.tag_name == "li" { [INFO] [stdout] ... [INFO] [stdout] 228 | } [INFO] [stdout] 229 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | / if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 201 | | if ed.tag_name == "li" { [INFO] [stdout] 202 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 229 | | } [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] 200 ~ if let crate::dom::NodeType::Element(ed) = &sn.node.node_type [INFO] [stdout] 201 ~ && ed.tag_name == "li" { [INFO] [stdout] 202 | let c = &node.dimensions.content; [INFO] [stdout] ... [INFO] [stdout] 227 | })); [INFO] [stdout] 228 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 235 | | if matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 236 | | if let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] 237 | | let collapsed = collapse_whitespace(t); [INFO] [stdout] ... | [INFO] [stdout] 281 | | } [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] 234 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 235 ~ && matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 236 | if let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] ... [INFO] [stdout] 279 | } [INFO] [stdout] 280 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:235:9 [INFO] [stdout] | [INFO] [stdout] 235 | / if matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 236 | | if let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] 237 | | let collapsed = collapse_whitespace(t); [INFO] [stdout] 238 | | let txt = collapsed.trim(); [INFO] [stdout] ... | [INFO] [stdout] 280 | | } [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] 235 ~ if matches!(node.box_type, BoxType::InlineNode(_)) [INFO] [stdout] 236 ~ && let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] 237 | let collapsed = collapse_whitespace(t); [INFO] [stdout] ... [INFO] [stdout] 278 | } [INFO] [stdout] 279 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 285 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 286 | | if ed.tag_name == "img" { [INFO] [stdout] 287 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 333 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 284 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 285 ~ && let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 286 | if ed.tag_name == "img" { [INFO] [stdout] ... [INFO] [stdout] 331 | } [INFO] [stdout] 332 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | / if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 286 | | if ed.tag_name == "img" { [INFO] [stdout] 287 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 332 | | } [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] 285 ~ if let crate::dom::NodeType::Element(ed) = &sn.node.node_type [INFO] [stdout] 286 ~ && ed.tag_name == "img" { [INFO] [stdout] 287 | let c = &node.dimensions.content; [INFO] [stdout] ... [INFO] [stdout] 330 | } [INFO] [stdout] 331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/display.rs:85:55 [INFO] [stdout] | [INFO] [stdout] 85 | fn walk(node: &LayoutBox, out: &mut Vec, font: &Font, base_url: &crate::url::URL) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_font` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/display.rs:336:26 [INFO] [stdout] | [INFO] [stdout] 336 | walk(child, out, font, base_url); [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:422:9 [INFO] [stdout] | [INFO] [stdout] 422 | / if let Some(sn) = ch.get_style_node() { [INFO] [stdout] 423 | | if matches!(sn.node.node_type, crate::dom::NodeType::Text(_)) { [INFO] [stdout] 424 | | let c = &ch.dimensions.content; [INFO] [stdout] 425 | | if c.width > 0.0 && c.height > 0.0 { [INFO] [stdout] ... | [INFO] [stdout] 433 | | } [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] 422 ~ if let Some(sn) = ch.get_style_node() [INFO] [stdout] 423 ~ && matches!(sn.node.node_type, crate::dom::NodeType::Text(_)) { [INFO] [stdout] 424 | let c = &ch.dimensions.content; [INFO] [stdout] ... [INFO] [stdout] 431 | } [INFO] [stdout] 432 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:444:5 [INFO] [stdout] | [INFO] [stdout] 444 | / if let Some(v) = sn.value("padding") { [INFO] [stdout] 445 | | if let Some((a, b, c, d)) = parse_trbl_px(v) { [INFO] [stdout] 446 | | pt = a; [INFO] [stdout] 447 | | pr = b; [INFO] [stdout] ... | [INFO] [stdout] 451 | | } [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] 444 ~ if let Some(v) = sn.value("padding") [INFO] [stdout] 445 ~ && let Some((a, b, c, d)) = parse_trbl_px(v) { [INFO] [stdout] 446 | pt = a; [INFO] [stdout] ... [INFO] [stdout] 449 | pl = d; [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GPU` contains a capitalized acronym [INFO] [stdout] --> src/gpu.rs:157:12 [INFO] [stdout] | [INFO] [stdout] 157 | pub struct GPU<'a> { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Gpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/render.rs:4:37 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn render(gpu: &mut GPU, items: &Vec, scroll_y: f32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - pub fn render(gpu: &mut GPU, items: &Vec, scroll_y: f32) { [INFO] [stdout] 4 + pub fn render(gpu: &mut GPU, items: &[DisplayItem], scroll_y: f32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | / if rel.contains("stylesheet") { [INFO] [stdout] 88 | | if let Some(href) = ed.attributes.get("href") { [INFO] [stdout] 89 | | let h = href.trim(); [INFO] [stdout] 90 | | if !h.is_empty() [INFO] [stdout] ... | [INFO] [stdout] 98 | | } [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] 87 ~ if rel.contains("stylesheet") [INFO] [stdout] 88 ~ && let Some(href) = ed.attributes.get("href") { [INFO] [stdout] 89 | let h = href.trim(); [INFO] [stdout] ... [INFO] [stdout] 96 | } [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | / if ed.tag_name == "img" { [INFO] [stdout] 308 | | if let Some(src) = ed.attributes.get("src") { [INFO] [stdout] 309 | | let s = src.trim(); [INFO] [stdout] 310 | | if !s.is_empty() [INFO] [stdout] ... | [INFO] [stdout] 317 | | } [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] 307 ~ if ed.tag_name == "img" [INFO] [stdout] 308 ~ && let Some(src) = ed.attributes.get("src") { [INFO] [stdout] 309 | let s = src.trim(); [INFO] [stdout] ... [INFO] [stdout] 315 | } [INFO] [stdout] 316 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:329:53 [INFO] [stdout] | [INFO] [stdout] 329 | let response = crate::http::request_allow_error(&url); [INFO] [stdout] | ^^^^ help: change this to: `url` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:531:25 [INFO] [stdout] | [INFO] [stdout] 531 | / if button == MouseButton::Left && st == ElementState::Pressed { [INFO] [stdout] 532 | | if let Some(href) = [INFO] [stdout] 533 | | hit_test_link(&state.display_list, mouse_x, mouse_y, scroll_y) [INFO] [stdout] ... | [INFO] [stdout] 545 | | } [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] 530 ~ } [INFO] [stdout] 531 ~ if button == MouseButton::Left && st == ElementState::Pressed => { [INFO] [stdout] 532 | if let Some(href) = [INFO] [stdout] ... [INFO] [stdout] 544 | } [INFO] [stdout] 545 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:531:25 [INFO] [stdout] | [INFO] [stdout] 531 | / if button == MouseButton::Left && st == ElementState::Pressed { [INFO] [stdout] 532 | | if let Some(href) = [INFO] [stdout] 533 | | hit_test_link(&state.display_list, mouse_x, mouse_y, scroll_y) [INFO] [stdout] ... | [INFO] [stdout] 545 | | } [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] 531 ~ if button == MouseButton::Left && st == ElementState::Pressed [INFO] [stdout] 532 ~ && let Some(href) = [INFO] [stdout] 533 | hit_test_link(&state.display_list, mouse_x, mouse_y, scroll_y) [INFO] [stdout] ... [INFO] [stdout] 543 | clamp_scroll(scroll_y, state.doc_height, gpu.viewport_height()); [INFO] [stdout] 544 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `radius` is never read [INFO] [stdout] --> src/display.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct DrawRect { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 21 | pub radius: f32, // ★ 追加: border-radius 用 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DrawRect` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `radius` is never read [INFO] [stdout] --> src/display.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct DrawBorder { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 35 | pub radius: f32, // 角丸枠用 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DrawBorder` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `alt` is never read [INFO] [stdout] --> src/display.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 57 | pub struct DrawImage { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 66 | pub alt: Option, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DrawImage` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `viewport_width` is never used [INFO] [stdout] --> src/gpu.rs:636:12 [INFO] [stdout] | [INFO] [stdout] 196 | impl<'a> GPU<'a> { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 636 | pub fn viewport_width(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/css.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | /// それ以外はそのまま 1 件の Declaration にする。 [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 341 | /// それ以外はそのまま 1 件の Declaration にする。 [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or_else` to construct default value [INFO] [stdout] --> src/dom.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | .unwrap_or_else(Vec::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/html.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|h| take_children(h)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `take_children` [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: redundant closure [INFO] [stdout] --> src/html.rs:80:14 [INFO] [stdout] | [INFO] [stdout] 80 | .map(|b| take_children(b)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `take_children` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:400:17 [INFO] [stdout] | [INFO] [stdout] 400 | / if parent_tag == Some("body") { [INFO] [stdout] 401 | | if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 402 | | if end == "html" { [INFO] [stdout] 403 | | break; [INFO] [stdout] ... | [INFO] [stdout] 406 | | } [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] 400 ~ if parent_tag == Some("body") [INFO] [stdout] 401 ~ && let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 402 | if end == "html" { [INFO] [stdout] 403 | break; [INFO] [stdout] 404 | } [INFO] [stdout] 405 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:401:21 [INFO] [stdout] | [INFO] [stdout] 401 | / if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 402 | | if end == "html" { [INFO] [stdout] 403 | | break; [INFO] [stdout] 404 | | } [INFO] [stdout] 405 | | } [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] 401 ~ if let Some(end) = self.peek_end_tag_name() [INFO] [stdout] 402 ~ && end == "html" { [INFO] [stdout] 403 | break; [INFO] [stdout] 404 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:408:17 [INFO] [stdout] | [INFO] [stdout] 408 | / if parent_tag == Some("html") { [INFO] [stdout] 409 | | if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 410 | | if end == "html" { [INFO] [stdout] 411 | | break; [INFO] [stdout] ... | [INFO] [stdout] 414 | | } [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] 408 ~ if parent_tag == Some("html") [INFO] [stdout] 409 ~ && let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 410 | if end == "html" { [INFO] [stdout] 411 | break; [INFO] [stdout] 412 | } [INFO] [stdout] 413 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:409:21 [INFO] [stdout] | [INFO] [stdout] 409 | / if let Some(end) = self.peek_end_tag_name() { [INFO] [stdout] 410 | | if end == "html" { [INFO] [stdout] 411 | | break; [INFO] [stdout] 412 | | } [INFO] [stdout] 413 | | } [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] 409 ~ if let Some(end) = self.peek_end_tag_name() [INFO] [stdout] 410 ~ && end == "html" { [INFO] [stdout] 411 | break; [INFO] [stdout] 412 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/html.rs:419:13 [INFO] [stdout] | [INFO] [stdout] 419 | / if parent_tag == Some("p") && self.next_char() == '<' { [INFO] [stdout] 420 | | if let Some(next_tag) = self.peek_start_tag_name() { [INFO] [stdout] 421 | | // next_tag は小文字 [INFO] [stdout] 422 | | if is_block_tag(&next_tag) { [INFO] [stdout] ... | [INFO] [stdout] 426 | | } [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] 419 ~ if parent_tag == Some("p") && self.next_char() == '<' [INFO] [stdout] 420 ~ && let Some(next_tag) = self.peek_start_tag_name() { [INFO] [stdout] 421 | // next_tag は小文字 [INFO] [stdout] ... [INFO] [stdout] 424 | } [INFO] [stdout] 425 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/http.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | / if matches!(resp.status_code, 301 | 302 | 303 | 307 | 308) { [INFO] [stdout] 120 | | if let Some(loc) = resp.header("location").map(str::to_string) { [INFO] [stdout] 121 | | current = current.resolve_location(&loc); [INFO] [stdout] 122 | | continue; [INFO] [stdout] 123 | | } [INFO] [stdout] 124 | | } [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] 119 ~ if matches!(resp.status_code, 301 | 302 | 303 | 307 | 308) [INFO] [stdout] 120 ~ && let Some(loc) = resp.header("location").map(str::to_string) { [INFO] [stdout] 121 | current = current.resolve_location(&loc); [INFO] [stdout] 122 | continue; [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/layout.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 - d.content.height = ih.max(1.0); [INFO] [stdout] 176 - return; [INFO] [stdout] 175 + d.content.height = ih.max(1.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | / if let Some(v) = ml_s.as_deref() { [INFO] [stdout] 247 | | if v.trim() != "auto" { [INFO] [stdout] 248 | | ml = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 249 | | } [INFO] [stdout] 250 | | } [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] 246 ~ if let Some(v) = ml_s.as_deref() [INFO] [stdout] 247 ~ && v.trim() != "auto" { [INFO] [stdout] 248 | ml = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | / if let Some(v) = mr_s.as_deref() { [INFO] [stdout] 252 | | if v.trim() != "auto" { [INFO] [stdout] 253 | | mr = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 254 | | } [INFO] [stdout] 255 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 251 ~ if let Some(v) = mr_s.as_deref() [INFO] [stdout] 252 ~ && v.trim() != "auto" { [INFO] [stdout] 253 | mr = parse_length(v, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:292:9 [INFO] [stdout] | [INFO] [stdout] 292 | / if ml_s.is_none() && mr_s.is_none() && mt_s.is_none() && mb_s.is_none() { [INFO] [stdout] 293 | | if let Some(sh) = margin_sh.as_deref() { [INFO] [stdout] 294 | | let m = parse_4len(sh); [INFO] [stdout] 295 | | if let Some(top) = m.0.as_deref() { [INFO] [stdout] ... | [INFO] [stdout] 312 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 292 ~ if ml_s.is_none() && mr_s.is_none() && mt_s.is_none() && mb_s.is_none() [INFO] [stdout] 293 ~ && let Some(sh) = margin_sh.as_deref() { [INFO] [stdout] 294 | let m = parse_4len(sh); [INFO] [stdout] ... [INFO] [stdout] 310 | } [INFO] [stdout] 311 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:298:17 [INFO] [stdout] | [INFO] [stdout] 298 | / if let Some(right) = m.1.as_deref() { [INFO] [stdout] 299 | | if right.trim() != "auto" { [INFO] [stdout] 300 | | mr = parse_length(right, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 301 | | } [INFO] [stdout] 302 | | } [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] 298 ~ if let Some(right) = m.1.as_deref() [INFO] [stdout] 299 ~ && right.trim() != "auto" { [INFO] [stdout] 300 | mr = parse_length(right, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:306:17 [INFO] [stdout] | [INFO] [stdout] 306 | / if let Some(left) = m.3.as_deref() { [INFO] [stdout] 307 | | if left.trim() != "auto" { [INFO] [stdout] 308 | | ml = parse_length(left, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 309 | | } [INFO] [stdout] 310 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 306 ~ if let Some(left) = m.3.as_deref() [INFO] [stdout] 307 ~ && left.trim() != "auto" { [INFO] [stdout] 308 | ml = parse_length(left, parent_w, viewport_w, viewport_h).unwrap_or(0.0); [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:315:9 [INFO] [stdout] | [INFO] [stdout] 315 | / if pl_s.is_none() && pr_s.is_none() && pt_s.is_none() && pb_s.is_none() { [INFO] [stdout] 316 | | if let Some(sh) = padding_sh.as_deref() { [INFO] [stdout] 317 | | let p = parse_4len(sh); [INFO] [stdout] 318 | | if let Some(top) = p.0.as_deref() { [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [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] 315 ~ if pl_s.is_none() && pr_s.is_none() && pt_s.is_none() && pb_s.is_none() [INFO] [stdout] 316 ~ && let Some(sh) = padding_sh.as_deref() { [INFO] [stdout] 317 | let p = parse_4len(sh); [INFO] [stdout] ... [INFO] [stdout] 329 | } [INFO] [stdout] 330 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | / if blw_s.is_none() && brw_s.is_none() && btw_s.is_none() && bbw_s.is_none() { [INFO] [stdout] 335 | | if let Some(sh) = border_width_sh.as_deref() { [INFO] [stdout] 336 | | let b = parse_4len(sh); [INFO] [stdout] 337 | | if let Some(top) = b.0.as_deref() { [INFO] [stdout] ... | [INFO] [stdout] 350 | | } [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] 334 ~ if blw_s.is_none() && brw_s.is_none() && btw_s.is_none() && bbw_s.is_none() [INFO] [stdout] 335 ~ && let Some(sh) = border_width_sh.as_deref() { [INFO] [stdout] 336 | let b = parse_4len(sh); [INFO] [stdout] ... [INFO] [stdout] 348 | } [INFO] [stdout] 349 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:354:9 [INFO] [stdout] | [INFO] [stdout] 354 | / if let Some(v) = border_radius_s.as_deref() { [INFO] [stdout] 355 | | if let Some(r) = parse_length(v, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 356 | | border_radius = r.max(0.0); [INFO] [stdout] 357 | | } [INFO] [stdout] 358 | | } [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] 354 ~ if let Some(v) = border_radius_s.as_deref() [INFO] [stdout] 355 ~ && let Some(r) = parse_length(v, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 356 | border_radius = r.max(0.0); [INFO] [stdout] 357 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:402:17 [INFO] [stdout] | [INFO] [stdout] 402 | / if (!la || !ra) [INFO] [stdout] 403 | | && s.value("margin-left").is_none() [INFO] [stdout] 404 | | && s.value("margin-right").is_none() [INFO] [stdout] ... | [INFO] [stdout] 419 | | } [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 ~ && s.value("margin-right").is_none() [INFO] [stdout] 405 ~ && let Some(m) = s.value("margin") { [INFO] [stdout] 406 | let m4 = parse_4len(m); [INFO] [stdout] ... [INFO] [stdout] 416 | } [INFO] [stdout] 417 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:408:25 [INFO] [stdout] | [INFO] [stdout] 408 | / if let Some(r) = m4.1.as_deref() { [INFO] [stdout] 409 | | if r.trim() == "auto" { [INFO] [stdout] 410 | | ra = true; [INFO] [stdout] 411 | | } [INFO] [stdout] 412 | | } [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] 408 ~ if let Some(r) = m4.1.as_deref() [INFO] [stdout] 409 ~ && r.trim() == "auto" { [INFO] [stdout] 410 | ra = true; [INFO] [stdout] 411 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:413:25 [INFO] [stdout] | [INFO] [stdout] 413 | / if let Some(l) = m4.3.as_deref() { [INFO] [stdout] 414 | | if l.trim() == "auto" { [INFO] [stdout] 415 | | la = true; [INFO] [stdout] 416 | | } [INFO] [stdout] 417 | | } [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] 413 ~ if let Some(l) = m4.3.as_deref() [INFO] [stdout] 414 ~ && l.trim() == "auto" { [INFO] [stdout] 415 | la = true; [INFO] [stdout] 416 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:426:9 [INFO] [stdout] | [INFO] [stdout] 426 | / if let Some(ws) = width_str.as_deref() { [INFO] [stdout] 427 | | if let Some(w) = parse_length(ws, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 428 | | d.content.width = w.max(0.0); [INFO] [stdout] 429 | | } [INFO] [stdout] 430 | | } [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] 426 ~ if let Some(ws) = width_str.as_deref() [INFO] [stdout] 427 ~ && let Some(w) = parse_length(ws, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 428 | d.content.width = w.max(0.0); [INFO] [stdout] 429 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:498:9 [INFO] [stdout] | [INFO] [stdout] 498 | / if let Some(hs) = h_str.as_deref() { [INFO] [stdout] 499 | | if let Some(h) = parse_length(hs, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 500 | | self.dimensions.content.height = h.max(0.0); [INFO] [stdout] 501 | | return; [INFO] [stdout] 502 | | } [INFO] [stdout] 503 | | } [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] 498 ~ if let Some(hs) = h_str.as_deref() [INFO] [stdout] 499 ~ && let Some(h) = parse_length(hs, parent_w, viewport_w, viewport_h) { [INFO] [stdout] 500 | self.dimensions.content.height = h.max(0.0); [INFO] [stdout] 501 | return; [INFO] [stdout] 502 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:506:9 [INFO] [stdout] | [INFO] [stdout] 506 | / if !has_any_child { [INFO] [stdout] 507 | | if let Some(sn) = self.get_style_node() { [INFO] [stdout] 508 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 509 | | if ed.tag_name == "img" { [INFO] [stdout] ... | [INFO] [stdout] 530 | | } [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] 506 ~ if !has_any_child [INFO] [stdout] 507 ~ && let Some(sn) = self.get_style_node() { [INFO] [stdout] 508 | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] ... [INFO] [stdout] 528 | } [INFO] [stdout] 529 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | / if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 509 | | if ed.tag_name == "img" { [INFO] [stdout] 510 | | let (_iw, ih) = img_intrinsic_size_px(sn, img_cache); [INFO] [stdout] 511 | | self.dimensions.content.height = ih.max(1.0); [INFO] [stdout] ... | [INFO] [stdout] 514 | | } [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] 508 ~ if let crate::dom::NodeType::Element(ed) = &sn.node.node_type [INFO] [stdout] 509 ~ && ed.tag_name == "img" { [INFO] [stdout] 510 | let (_iw, ih) = img_intrinsic_size_px(sn, img_cache); [INFO] [stdout] 511 | self.dimensions.content.height = ih.max(1.0); [INFO] [stdout] 512 | return; [INFO] [stdout] 513 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/layout.rs:543:9 [INFO] [stdout] | [INFO] [stdout] 543 | / fn walk_inline( [INFO] [stdout] 544 | | node: &mut LayoutBox, [INFO] [stdout] 545 | | font: &Font, [INFO] [stdout] 546 | | img_cache: &dyn ImageSizeProvider, [INFO] [stdout] ... | [INFO] [stdout] 551 | | current_line_h: &mut f32, [INFO] [stdout] 552 | | ) { [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` statement can be collapsed [INFO] [stdout] --> src/layout.rs:882:9 [INFO] [stdout] | [INFO] [stdout] 882 | / if let Some((nw, nh)) = natural { [INFO] [stdout] 883 | | if nw > 0 && nh > 0 { [INFO] [stdout] 884 | | let ratio = (nh as f32) / (nw as f32); [INFO] [stdout] 885 | | return (w.max(1.0), (w * ratio).max(1.0)); [INFO] [stdout] 886 | | } [INFO] [stdout] 887 | | } [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] 882 ~ if let Some((nw, nh)) = natural [INFO] [stdout] 883 ~ && nw > 0 && nh > 0 { [INFO] [stdout] 884 | let ratio = (nh as f32) / (nw as f32); [INFO] [stdout] 885 | return (w.max(1.0), (w * ratio).max(1.0)); [INFO] [stdout] 886 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/layout.rs:892:9 [INFO] [stdout] | [INFO] [stdout] 892 | / if let Some((nw, nh)) = natural { [INFO] [stdout] 893 | | if nw > 0 && nh > 0 { [INFO] [stdout] 894 | | let ratio = (nw as f32) / (nh as f32); [INFO] [stdout] 895 | | return ((h * ratio).max(1.0), h.max(1.0)); [INFO] [stdout] 896 | | } [INFO] [stdout] 897 | | } [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] 892 ~ if let Some((nw, nh)) = natural [INFO] [stdout] 893 ~ && nw > 0 && nh > 0 { [INFO] [stdout] 894 | let ratio = (nw as f32) / (nh as f32); [INFO] [stdout] 895 | return ((h * ratio).max(1.0), h.max(1.0)); [INFO] [stdout] 896 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/style.rs:178:16 [INFO] [stdout] | [INFO] [stdout] 178 | ancestors: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 178 ~ ancestors: &[Ancestor], [INFO] [stdout] 179 | inherited_values: &HashMap, [INFO] [stdout] ... [INFO] [stdout] 209 | // 子へ渡す ancestor stack [INFO] [stdout] 210 ~ let mut next_ancestors = ancestors.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/style.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | / if let NodeType::Element(ref e) = root.node_type { [INFO] [stdout] 195 | | if e.tag_name == "a" { [INFO] [stdout] 196 | | if let Some(href) = e.attributes.get("href") { [INFO] [stdout] 197 | | let h = href.trim(); [INFO] [stdout] ... | [INFO] [stdout] 207 | | } [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] 194 ~ if let NodeType::Element(ref e) = root.node_type [INFO] [stdout] 195 ~ && e.tag_name == "a" { [INFO] [stdout] 196 | if let Some(href) = e.attributes.get("href") { [INFO] [stdout] ... [INFO] [stdout] 205 | } [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/style.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | / if e.tag_name == "a" { [INFO] [stdout] 196 | | if let Some(href) = e.attributes.get("href") { [INFO] [stdout] 197 | | let h = href.trim(); [INFO] [stdout] 198 | | if !h.is_empty() [INFO] [stdout] ... | [INFO] [stdout] 206 | | } [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] 195 ~ if e.tag_name == "a" [INFO] [stdout] 196 ~ && let Some(href) = e.attributes.get("href") { [INFO] [stdout] 197 | let h = href.trim(); [INFO] [stdout] ... [INFO] [stdout] 204 | } [INFO] [stdout] 205 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/style.rs:342:16 [INFO] [stdout] | [INFO] [stdout] 342 | return elem.classes().iter().any(|c| *c == class); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.classes().contains(&class)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/style.rs:350:16 [INFO] [stdout] | [INFO] [stdout] 350 | return elem.classes().iter().any(|c| *c == class); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elem.classes().contains(&class)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/style.rs:390:37 [INFO] [stdout] | [INFO] [stdout] 390 | let parts: Vec<&str> = selector.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: name `URL` contains a capitalized acronym [INFO] [stdout] --> src/url.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct URL { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Url` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `copied` [INFO] [stdout] --> src/url.rs:222:16 [INFO] [stdout] | [INFO] [stdout] 222 | for seg in parts.iter().copied() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 222 - for seg in parts.iter().copied() { [INFO] [stdout] 222 + for seg in parts.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 88 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 89 | | match ed.tag_name.as_str() { [INFO] [stdout] 90 | | "style" | "script" | "head" | "title" | "meta" | "link" => return, [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [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] 87 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 88 ~ && let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 89 | match ed.tag_name.as_str() { [INFO] [stdout] ... [INFO] [stdout] 92 | } [INFO] [stdout] 93 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / if matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 101 | | if let Some(sn) = node.get_style_node() { [INFO] [stdout] 102 | | if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | | if let Some(bg) = sn.background_color() { [INFO] [stdout] ... | [INFO] [stdout] 128 | | } [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] 100 ~ if matches!(node.box_type, BoxType::InlineNode(_)) [INFO] [stdout] 101 ~ && let Some(sn) = node.get_style_node() { [INFO] [stdout] 102 | if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] ... [INFO] [stdout] 126 | } [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 102 | | if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | | if let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] ... | [INFO] [stdout] 127 | | } [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] 101 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 102 ~ && matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | if let Some(bg) = sn.background_color() { [INFO] [stdout] ... [INFO] [stdout] 125 | } [INFO] [stdout] 126 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | / if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) { [INFO] [stdout] 103 | | if let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] 105 | | let (pt, pr, pb, pl) = padding_trbl(sn); [INFO] [stdout] ... | [INFO] [stdout] 126 | | } [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] 102 ~ if matches!(sn.node.node_type, crate::dom::NodeType::Element(_)) [INFO] [stdout] 103 ~ && let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] 125 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | / if let Some(bg) = sn.background_color() { [INFO] [stdout] 104 | | if let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] 105 | | let (pt, pr, pb, pl) = padding_trbl(sn); [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [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] 103 ~ if let Some(bg) = sn.background_color() [INFO] [stdout] 104 ~ && let Some(mut bounds) = collect_descendant_text_bounds(node) { [INFO] [stdout] 105 | let (pt, pr, pb, pl) = padding_trbl(sn); [INFO] [stdout] ... [INFO] [stdout] 123 | } [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:152:9 [INFO] [stdout] | [INFO] [stdout] 152 | / if border_box.width > 0.0 && border_box.height > 0.0 { [INFO] [stdout] 153 | | if let Some(sn) = node.get_style_node() { [INFO] [stdout] 154 | | let radius = d.border_radius.max(0.0); [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [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] 152 ~ if border_box.width > 0.0 && border_box.height > 0.0 [INFO] [stdout] 153 ~ && let Some(sn) = node.get_style_node() { [INFO] [stdout] 154 | let radius = d.border_radius.max(0.0); [INFO] [stdout] ... [INFO] [stdout] 194 | } [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 200 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 201 | | if ed.tag_name == "li" { [INFO] [stdout] 202 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 230 | | } [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 let Some(sn) = node.get_style_node() [INFO] [stdout] 200 ~ && let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 201 | if ed.tag_name == "li" { [INFO] [stdout] ... [INFO] [stdout] 228 | } [INFO] [stdout] 229 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | / if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 201 | | if ed.tag_name == "li" { [INFO] [stdout] 202 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 229 | | } [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] 200 ~ if let crate::dom::NodeType::Element(ed) = &sn.node.node_type [INFO] [stdout] 201 ~ && ed.tag_name == "li" { [INFO] [stdout] 202 | let c = &node.dimensions.content; [INFO] [stdout] ... [INFO] [stdout] 227 | })); [INFO] [stdout] 228 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 235 | | if matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 236 | | if let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] 237 | | let collapsed = collapse_whitespace(t); [INFO] [stdout] ... | [INFO] [stdout] 281 | | } [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] 234 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 235 ~ && matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 236 | if let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] ... [INFO] [stdout] 279 | } [INFO] [stdout] 280 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:235:9 [INFO] [stdout] | [INFO] [stdout] 235 | / if matches!(node.box_type, BoxType::InlineNode(_)) { [INFO] [stdout] 236 | | if let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] 237 | | let collapsed = collapse_whitespace(t); [INFO] [stdout] 238 | | let txt = collapsed.trim(); [INFO] [stdout] ... | [INFO] [stdout] 280 | | } [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] 235 ~ if matches!(node.box_type, BoxType::InlineNode(_)) [INFO] [stdout] 236 ~ && let crate::dom::NodeType::Text(t) = &sn.node.node_type { [INFO] [stdout] 237 | let collapsed = collapse_whitespace(t); [INFO] [stdout] ... [INFO] [stdout] 278 | } [INFO] [stdout] 279 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | / if let Some(sn) = node.get_style_node() { [INFO] [stdout] 285 | | if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 286 | | if ed.tag_name == "img" { [INFO] [stdout] 287 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 333 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 284 ~ if let Some(sn) = node.get_style_node() [INFO] [stdout] 285 ~ && let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 286 | if ed.tag_name == "img" { [INFO] [stdout] ... [INFO] [stdout] 331 | } [INFO] [stdout] 332 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 285 | / if let crate::dom::NodeType::Element(ed) = &sn.node.node_type { [INFO] [stdout] 286 | | if ed.tag_name == "img" { [INFO] [stdout] 287 | | let c = &node.dimensions.content; [INFO] [stdout] ... | [INFO] [stdout] 332 | | } [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] 285 ~ if let crate::dom::NodeType::Element(ed) = &sn.node.node_type [INFO] [stdout] 286 ~ && ed.tag_name == "img" { [INFO] [stdout] 287 | let c = &node.dimensions.content; [INFO] [stdout] ... [INFO] [stdout] 330 | } [INFO] [stdout] 331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/display.rs:85:55 [INFO] [stdout] | [INFO] [stdout] 85 | fn walk(node: &LayoutBox, out: &mut Vec, font: &Font, base_url: &crate::url::URL) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_font` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/display.rs:336:26 [INFO] [stdout] | [INFO] [stdout] 336 | walk(child, out, font, base_url); [INFO] [stdout] | ^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:422:9 [INFO] [stdout] | [INFO] [stdout] 422 | / if let Some(sn) = ch.get_style_node() { [INFO] [stdout] 423 | | if matches!(sn.node.node_type, crate::dom::NodeType::Text(_)) { [INFO] [stdout] 424 | | let c = &ch.dimensions.content; [INFO] [stdout] 425 | | if c.width > 0.0 && c.height > 0.0 { [INFO] [stdout] ... | [INFO] [stdout] 433 | | } [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] 422 ~ if let Some(sn) = ch.get_style_node() [INFO] [stdout] 423 ~ && matches!(sn.node.node_type, crate::dom::NodeType::Text(_)) { [INFO] [stdout] 424 | let c = &ch.dimensions.content; [INFO] [stdout] ... [INFO] [stdout] 431 | } [INFO] [stdout] 432 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/display.rs:444:5 [INFO] [stdout] | [INFO] [stdout] 444 | / if let Some(v) = sn.value("padding") { [INFO] [stdout] 445 | | if let Some((a, b, c, d)) = parse_trbl_px(v) { [INFO] [stdout] 446 | | pt = a; [INFO] [stdout] 447 | | pr = b; [INFO] [stdout] ... | [INFO] [stdout] 451 | | } [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] 444 ~ if let Some(v) = sn.value("padding") [INFO] [stdout] 445 ~ && let Some((a, b, c, d)) = parse_trbl_px(v) { [INFO] [stdout] 446 | pt = a; [INFO] [stdout] ... [INFO] [stdout] 449 | pl = d; [INFO] [stdout] 450 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GPU` contains a capitalized acronym [INFO] [stdout] --> src/gpu.rs:157:12 [INFO] [stdout] | [INFO] [stdout] 157 | pub struct GPU<'a> { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Gpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/render.rs:4:37 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn render(gpu: &mut GPU, items: &Vec, scroll_y: f32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - pub fn render(gpu: &mut GPU, items: &Vec, scroll_y: f32) { [INFO] [stdout] 4 + pub fn render(gpu: &mut GPU, items: &[DisplayItem], scroll_y: f32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | / if rel.contains("stylesheet") { [INFO] [stdout] 88 | | if let Some(href) = ed.attributes.get("href") { [INFO] [stdout] 89 | | let h = href.trim(); [INFO] [stdout] 90 | | if !h.is_empty() [INFO] [stdout] ... | [INFO] [stdout] 98 | | } [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] 87 ~ if rel.contains("stylesheet") [INFO] [stdout] 88 ~ && let Some(href) = ed.attributes.get("href") { [INFO] [stdout] 89 | let h = href.trim(); [INFO] [stdout] ... [INFO] [stdout] 96 | } [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:307:13 [INFO] [stdout] | [INFO] [stdout] 307 | / if ed.tag_name == "img" { [INFO] [stdout] 308 | | if let Some(src) = ed.attributes.get("src") { [INFO] [stdout] 309 | | let s = src.trim(); [INFO] [stdout] 310 | | if !s.is_empty() [INFO] [stdout] ... | [INFO] [stdout] 317 | | } [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] 307 ~ if ed.tag_name == "img" [INFO] [stdout] 308 ~ && let Some(src) = ed.attributes.get("src") { [INFO] [stdout] 309 | let s = src.trim(); [INFO] [stdout] ... [INFO] [stdout] 315 | } [INFO] [stdout] 316 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:329:53 [INFO] [stdout] | [INFO] [stdout] 329 | let response = crate::http::request_allow_error(&url); [INFO] [stdout] | ^^^^ help: change this to: `url` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:531:25 [INFO] [stdout] | [INFO] [stdout] 531 | / if button == MouseButton::Left && st == ElementState::Pressed { [INFO] [stdout] 532 | | if let Some(href) = [INFO] [stdout] 533 | | hit_test_link(&state.display_list, mouse_x, mouse_y, scroll_y) [INFO] [stdout] ... | [INFO] [stdout] 545 | | } [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] 530 ~ } [INFO] [stdout] 531 ~ if button == MouseButton::Left && st == ElementState::Pressed => { [INFO] [stdout] 532 | if let Some(href) = [INFO] [stdout] ... [INFO] [stdout] 544 | } [INFO] [stdout] 545 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:531:25 [INFO] [stdout] | [INFO] [stdout] 531 | / if button == MouseButton::Left && st == ElementState::Pressed { [INFO] [stdout] 532 | | if let Some(href) = [INFO] [stdout] 533 | | hit_test_link(&state.display_list, mouse_x, mouse_y, scroll_y) [INFO] [stdout] ... | [INFO] [stdout] 545 | | } [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] 531 ~ if button == MouseButton::Left && st == ElementState::Pressed [INFO] [stdout] 532 ~ && let Some(href) = [INFO] [stdout] 533 | hit_test_link(&state.display_list, mouse_x, mouse_y, scroll_y) [INFO] [stdout] ... [INFO] [stdout] 543 | clamp_scroll(scroll_y, state.doc_height, gpu.viewport_height()); [INFO] [stdout] 544 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 13s [INFO] running `Command { std: "docker" "inspect" "e04588a0f777d44966deda4737ec22104da792734455d50fcb9ff29ef78d5000", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e04588a0f777d44966deda4737ec22104da792734455d50fcb9ff29ef78d5000", kill_on_drop: false }` [INFO] [stdout] e04588a0f777d44966deda4737ec22104da792734455d50fcb9ff29ef78d5000