[INFO] cloning repository https://github.com/Cicolas/rust-DOM [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Cicolas/rust-DOM" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCicolas%2Frust-DOM", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCicolas%2Frust-DOM'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] dc831cf374b42ab4eeb84564a56926b7b721c3f3 [INFO] linting Cicolas/rust-DOM against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCicolas%2Frust-DOM" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Cicolas/rust-DOM [INFO] finished tweaking git repo https://github.com/Cicolas/rust-DOM [INFO] tweaked toml for git repo https://github.com/Cicolas/rust-DOM written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Cicolas/rust-DOM 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/Cicolas/rust-DOM already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded xml-rs v0.8.13 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 31b7d777d5ee225ae18d38dc3b15763cc73358b4de751c7b5e2b1cf940c19624 [INFO] running `Command { std: "docker" "start" "-a" "31b7d777d5ee225ae18d38dc3b15763cc73358b4de751c7b5e2b1cf940c19624", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "31b7d777d5ee225ae18d38dc3b15763cc73358b4de751c7b5e2b1cf940c19624", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "31b7d777d5ee225ae18d38dc3b15763cc73358b4de751c7b5e2b1cf940c19624", kill_on_drop: false }` [INFO] [stdout] 31b7d777d5ee225ae18d38dc3b15763cc73358b4de751c7b5e2b1cf940c19624 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] a9d4c0759e64bdd0e315dd4ca5b77742aa6d9e708782bb9d54de6228fa143fb8 [INFO] running `Command { std: "docker" "start" "-a" "a9d4c0759e64bdd0e315dd4ca5b77742aa6d9e708782bb9d54de6228fa143fb8", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.144 [INFO] [stderr] Checking xml-rs v0.8.13 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking text-viewer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `components::section::*` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use components::section::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `components::content::list::*` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use components::content::list::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_vector` and `add_in_position` are never used [INFO] [stdout] --> src/components/content.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub trait ContentDependency { [INFO] [stdout] | ----------------- methods in this trait [INFO] [stdout] 7 | fn get_vector(&self) -> &Vec; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | fn add_in_position(&mut self, index: usize, elem: T) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/components/content.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | let should_prefix: bool; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `should_prefix` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 52 ~ [INFO] [stdout] 53 | [INFO] [stdout] 54 ~ let should_prefix: bool = match elem { [INFO] [stdout] 55 ~ Content::Text(_) => true, [INFO] [stdout] 56 ~ Content::List(_) => false, [INFO] [stdout] 57 | // other => assert!(false, "undefined should prefix") [INFO] [stdout] 58 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/components/page.rs:39:32 [INFO] [stdout] | [INFO] [stdout] 39 | ... if !page.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `page.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/components/page.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | ... if !actual_section.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `actual_section.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/components/page.rs:102:97 [INFO] [stdout] | [INFO] [stdout] 102 | ... panic!("{} is not a valid list type", attr.value.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/components/page.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | / match content_to_add { [INFO] [stdout] 152 | | Some(content) => { [INFO] [stdout] 153 | | add_in_context(&mut actual_list, &mut actual_section, content); [INFO] [stdout] 154 | | }, [INFO] [stdout] 155 | | None => {} [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 ~ if let Some(content) = content_to_add { [INFO] [stdout] 152 + add_in_context(&mut actual_list, &mut actual_section, content); [INFO] [stdout] 153 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/components/page.rs:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | str.push_str(format!("{}", " ".repeat(MAX_TEXT_LEN/2-title_len/2)).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" ".repeat(MAX_TEXT_LEN/2-title_len/2).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_vector` and `add_in_position` are never used [INFO] [stdout] --> src/components/content.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub trait ContentDependency { [INFO] [stdout] | ----------------- methods in this trait [INFO] [stdout] 7 | fn get_vector(&self) -> &Vec; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | fn add_in_position(&mut self, index: usize, elem: T) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/components/content.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | let should_prefix: bool; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `should_prefix` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 52 ~ [INFO] [stdout] 53 | [INFO] [stdout] 54 ~ let should_prefix: bool = match elem { [INFO] [stdout] 55 ~ Content::Text(_) => true, [INFO] [stdout] 56 ~ Content::List(_) => false, [INFO] [stdout] 57 | // other => assert!(false, "undefined should prefix") [INFO] [stdout] 58 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/components/page.rs:39:32 [INFO] [stdout] | [INFO] [stdout] 39 | ... if !page.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `page.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/components/page.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | ... if !actual_section.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `actual_section.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `panic!` args [INFO] [stdout] --> src/components/page.rs:102:97 [INFO] [stdout] | [INFO] [stdout] 102 | ... panic!("{} is not a valid list type", attr.value.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/components/page.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | / match content_to_add { [INFO] [stdout] 152 | | Some(content) => { [INFO] [stdout] 153 | | add_in_context(&mut actual_list, &mut actual_section, content); [INFO] [stdout] 154 | | }, [INFO] [stdout] 155 | | None => {} [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 ~ if let Some(content) = content_to_add { [INFO] [stdout] 152 + add_in_context(&mut actual_list, &mut actual_section, content); [INFO] [stdout] 153 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/components/page.rs:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | str.push_str(format!("{}", " ".repeat(MAX_TEXT_LEN/2-title_len/2)).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" ".repeat(MAX_TEXT_LEN/2-title_len/2).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.44s [INFO] running `Command { std: "docker" "inspect" "a9d4c0759e64bdd0e315dd4ca5b77742aa6d9e708782bb9d54de6228fa143fb8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a9d4c0759e64bdd0e315dd4ca5b77742aa6d9e708782bb9d54de6228fa143fb8", kill_on_drop: false }` [INFO] [stdout] a9d4c0759e64bdd0e315dd4ca5b77742aa6d9e708782bb9d54de6228fa143fb8