[INFO] cloning repository https://github.com/klausbegnis/rust-polkadot-preparation-1 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/klausbegnis/rust-polkadot-preparation-1" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fklausbegnis%2Frust-polkadot-preparation-1", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fklausbegnis%2Frust-polkadot-preparation-1'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 24568437219ed10af92cddd96bd9cbaa02f51a53 [INFO] linting klausbegnis/rust-polkadot-preparation-1 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fklausbegnis%2Frust-polkadot-preparation-1" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/klausbegnis/rust-polkadot-preparation-1 [INFO] finished tweaking git repo https://github.com/klausbegnis/rust-polkadot-preparation-1 [INFO] tweaked toml for git repo https://github.com/klausbegnis/rust-polkadot-preparation-1 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/klausbegnis/rust-polkadot-preparation-1 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/klausbegnis/rust-polkadot-preparation-1 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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 47dec9eb8ec129b0905ad61e4e0c87870e2469a3b221a75fe1428a3caa62c317 [INFO] running `Command { std: "docker" "start" "-a" "47dec9eb8ec129b0905ad61e4e0c87870e2469a3b221a75fe1428a3caa62c317", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "47dec9eb8ec129b0905ad61e4e0c87870e2469a3b221a75fe1428a3caa62c317", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47dec9eb8ec129b0905ad61e4e0c87870e2469a3b221a75fe1428a3caa62c317", kill_on_drop: false }` [INFO] [stdout] 47dec9eb8ec129b0905ad61e4e0c87870e2469a3b221a75fe1428a3caa62c317 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] dfee7bf3d1101938021ecf00dc892e0d1d08789afb2760ee3c0de16076258ec6 [INFO] running `Command { std: "docker" "start" "-a" "dfee7bf3d1101938021ecf00dc892e0d1d08789afb2760ee3c0de16076258ec6", kill_on_drop: false }` [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking rust-polkadot-preparation-1 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `btree_map::Entry` [INFO] [stdout] --> src/proof_of_existence.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{btree_map::Entry, BTreeMap}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function cannot return without recursing [INFO] [stdout] --> src/proof_of_existence.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn get_claim(&self, claim: &T::Content) -> Option<&T::AccountId> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing [INFO] [stdout] 22 | self.get_claim(claim) [INFO] [stdout] | --------------------- recursive call site [INFO] [stdout] | [INFO] [stdout] = help: a `loop` may express intention better if this is on purpose [INFO] [stdout] = note: `#[warn(unconditional_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_nonce` is never used [INFO] [stdout] --> src/system.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl Pallet{ [INFO] [stdout] | ------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn get_nonce(&self, user: &T::AccountId) -> T::Nonce { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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/balances.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | / match destination_exists { [INFO] [stdout] 64 | | None => { [INFO] [stdout] 65 | | return Err("Account doesn't exist."); [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [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] 63 ~ if let None = destination_exists { [INFO] [stdout] 64 + return Err("Account doesn't exist."); [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/system.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return *self.nonce.get(user).unwrap_or(&T::Nonce::zero()); [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] 37 - return *self.nonce.get(user).unwrap_or(&T::Nonce::zero()); [INFO] [stdout] 37 + *self.nonce.get(user).unwrap_or(&T::Nonce::zero()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/proof_of_existence.rs:21:29 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn get_claim(&self, claim: &T::Content) -> Option<&T::AccountId> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_claim` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/proof_of_existence.rs:22:24 [INFO] [stdout] | [INFO] [stdout] 22 | self.get_claim(claim) [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 boolean expression can be simplified [INFO] [stdout] --> src/proof_of_existence.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | if !(*owner == caller) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(*owner != caller)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:129:101 [INFO] [stdout] | [INFO] [stdout] 129 | call : RuntimeCall::ProofOfExistence(proof_of_existence::Call::CreateClaim {claim : &"Test"}) [INFO] [stdout] | ^^^^^^^ help: change this to: `"Test"` [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 let-binding has unit value [INFO] [stdout] --> src/main.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | let _res = runtime.execute_block(new_block).expect("invalid block"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 134 - let _res = runtime.execute_block(new_block).expect("invalid block"); [INFO] [stdout] 134 + runtime.execute_block(new_block).expect("invalid block"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `btree_map::Entry` [INFO] [stdout] --> src/proof_of_existence.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{btree_map::Entry, BTreeMap}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function cannot return without recursing [INFO] [stdout] --> src/proof_of_existence.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn get_claim(&self, claim: &T::Content) -> Option<&T::AccountId> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing [INFO] [stdout] 22 | self.get_claim(claim) [INFO] [stdout] | --------------------- recursive call site [INFO] [stdout] | [INFO] [stdout] = help: a `loop` may express intention better if this is on purpose [INFO] [stdout] = note: `#[warn(unconditional_recursion)]` 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/balances.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | / match destination_exists { [INFO] [stdout] 64 | | None => { [INFO] [stdout] 65 | | return Err("Account doesn't exist."); [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [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] 63 ~ if let None = destination_exists { [INFO] [stdout] 64 + return Err("Account doesn't exist."); [INFO] [stdout] 65 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/system.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return *self.nonce.get(user).unwrap_or(&T::Nonce::zero()); [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] 37 - return *self.nonce.get(user).unwrap_or(&T::Nonce::zero()); [INFO] [stdout] 37 + *self.nonce.get(user).unwrap_or(&T::Nonce::zero()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: parameter is only used in recursion [INFO] [stdout] --> src/proof_of_existence.rs:21:29 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn get_claim(&self, claim: &T::Content) -> Option<&T::AccountId> { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_claim` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> src/proof_of_existence.rs:22:24 [INFO] [stdout] | [INFO] [stdout] 22 | self.get_claim(claim) [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 boolean expression can be simplified [INFO] [stdout] --> src/proof_of_existence.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | if !(*owner == caller) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(*owner != caller)` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:129:101 [INFO] [stdout] | [INFO] [stdout] 129 | call : RuntimeCall::ProofOfExistence(proof_of_existence::Call::CreateClaim {claim : &"Test"}) [INFO] [stdout] | ^^^^^^^ help: change this to: `"Test"` [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 let-binding has unit value [INFO] [stdout] --> src/main.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | let _res = runtime.execute_block(new_block).expect("invalid block"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 134 - let _res = runtime.execute_block(new_block).expect("invalid block"); [INFO] [stdout] 134 + runtime.execute_block(new_block).expect("invalid block"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.59s [INFO] running `Command { std: "docker" "inspect" "dfee7bf3d1101938021ecf00dc892e0d1d08789afb2760ee3c0de16076258ec6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dfee7bf3d1101938021ecf00dc892e0d1d08789afb2760ee3c0de16076258ec6", kill_on_drop: false }` [INFO] [stdout] dfee7bf3d1101938021ecf00dc892e0d1d08789afb2760ee3c0de16076258ec6