[INFO] cloning repository https://github.com/eroncastro/rust-linked-list [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/eroncastro/rust-linked-list" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feroncastro%2Frust-linked-list", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feroncastro%2Frust-linked-list'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0db436e7da1c316d8fc8fb4b4450cf638a33fada [INFO] linting eroncastro/rust-linked-list against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feroncastro%2Frust-linked-list" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/eroncastro/rust-linked-list [INFO] finished tweaking git repo https://github.com/eroncastro/rust-linked-list [INFO] tweaked toml for git repo https://github.com/eroncastro/rust-linked-list written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/eroncastro/rust-linked-list 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/eroncastro/rust-linked-list 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] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2d5e46c9799a94c5f72617675af9571dbc57db15a708bd8d80e6e0298b0ae78b [INFO] running `Command { std: "docker" "start" "-a" "2d5e46c9799a94c5f72617675af9571dbc57db15a708bd8d80e6e0298b0ae78b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2d5e46c9799a94c5f72617675af9571dbc57db15a708bd8d80e6e0298b0ae78b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2d5e46c9799a94c5f72617675af9571dbc57db15a708bd8d80e6e0298b0ae78b", kill_on_drop: false }` [INFO] [stdout] 2d5e46c9799a94c5f72617675af9571dbc57db15a708bd8d80e6e0298b0ae78b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ad499210ad9bab43ce09a8fb5c2ee22436f74e563b3f0492c7556a8389e8085d [INFO] running `Command { std: "docker" "start" "-a" "ad499210ad9bab43ce09a8fb5c2ee22436f74e563b3f0492c7556a8389e8085d", kill_on_drop: false }` [INFO] [stderr] Checking linked_list v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/main.rs:117:1 [INFO] [stdout] | [INFO] [stdout] 117 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 161 | fn main() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LinkedList` [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | LinkedList { [INFO] [stdout] 17 | | head: None, [INFO] [stdout] 18 | | tail: None, [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 + impl Default for LinkedList { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 54 | if !self.tail.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.tail.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: called `unwrap` on `self.tail` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 54 | if !self.tail.is_none() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 55 | self.tail.as_mut().unwrap().borrow_mut().next = Some(node.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/main.rs:162:19 [INFO] [stdout] | [INFO] [stdout] 162 | let numbers = vec![1, 2, 3, 4, 5, 6]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3, 4, 5, 6]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | data: data, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `LinkedList` [INFO] [stdout] --> src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | LinkedList { [INFO] [stdout] 17 | | head: None, [INFO] [stdout] 18 | | tail: None, [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 14 + impl Default for LinkedList { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 54 | if !self.tail.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.tail.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: called `unwrap` on `self.tail` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 54 | if !self.tail.is_none() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 55 | self.tail.as_mut().unwrap().borrow_mut().next = Some(node.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/main.rs:162:19 [INFO] [stdout] | [INFO] [stdout] 162 | let numbers = vec![1, 2, 3, 4, 5, 6]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3, 4, 5, 6]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.21s [INFO] running `Command { std: "docker" "inspect" "ad499210ad9bab43ce09a8fb5c2ee22436f74e563b3f0492c7556a8389e8085d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ad499210ad9bab43ce09a8fb5c2ee22436f74e563b3f0492c7556a8389e8085d", kill_on_drop: false }` [INFO] [stdout] ad499210ad9bab43ce09a8fb5c2ee22436f74e563b3f0492c7556a8389e8085d