[INFO] cloning repository https://github.com/btfinch/COS-ECE470-fa2022 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/btfinch/COS-ECE470-fa2022" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbtfinch%2FCOS-ECE470-fa2022", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbtfinch%2FCOS-ECE470-fa2022'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f9b0f39ed5baaa7e9ee8b6c4c71893a450f72c78 [INFO] linting btfinch/COS-ECE470-fa2022 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbtfinch%2FCOS-ECE470-fa2022" "/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/btfinch/COS-ECE470-fa2022 [INFO] finished tweaking git repo https://github.com/btfinch/COS-ECE470-fa2022 [INFO] tweaked toml for git repo https://github.com/btfinch/COS-ECE470-fa2022 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/btfinch/COS-ECE470-fa2022 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/btfinch/COS-ECE470-fa2022 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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded futures-io v0.3.18 [INFO] [stderr] Downloaded blocking v1.1.0 [INFO] [stderr] Downloaded signal-hook v0.3.10 [INFO] [stderr] Downloaded simple-mutex v1.1.5 [INFO] [stderr] Downloaded bitflags v1.2.0 [INFO] [stderr] Downloaded async-net v1.6.1 [INFO] [stderr] Downloaded polling v2.2.0 [INFO] [stderr] Downloaded crossbeam-epoch v0.9.5 [INFO] [stderr] Downloaded futures v0.3.18 [INFO] [stderr] Downloaded serde v1.0.101 [INFO] [stderr] Downloaded serde_derive v1.0.101 [INFO] [stderr] Downloaded futures-channel v0.3.18 [INFO] [stderr] Downloaded futures-util v0.3.18 [INFO] [stderr] Downloaded async-process v1.3.0 [INFO] [stderr] Downloaded ascii v1.0.0 [INFO] [stderr] Downloaded tiny_http v0.9.0 [INFO] [stderr] Downloaded crossbeam-queue v0.3.2 [INFO] [stderr] Downloaded futures-executor v0.3.18 [INFO] [stderr] Downloaded futures-macro v0.3.18 [INFO] [stderr] Downloaded ntest_test_cases v0.7.3 [INFO] [stderr] Downloaded async-fs v1.5.0 [INFO] [stderr] Downloaded futures-core v0.3.18 [INFO] [stderr] Downloaded stderrlog v0.5.1 [INFO] [stderr] Downloaded async-dup v1.2.2 [INFO] [stderr] Downloaded bincode v1.2.0 [INFO] [stderr] Downloaded term_size v0.3.1 [INFO] [stderr] Downloaded futures-sink v0.3.18 [INFO] [stderr] Downloaded futures-task v0.3.18 [INFO] [stderr] Downloaded hex v0.4.0 [INFO] [stderr] Downloaded ntest_proc_macro_helper v0.7.3 [INFO] [stderr] Downloaded ntest_timeout v0.7.3 [INFO] [stderr] Downloaded ntest v0.7.3 [INFO] [stderr] Downloaded async-lock v2.4.0 [INFO] [stderr] Downloaded smol v1.2.5 [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] 26fc11c460cf2bb00d2c92ae2b81a82353ec03232a13172ae37b1b2614c96f25 [INFO] running `Command { std: "docker" "start" "-a" "26fc11c460cf2bb00d2c92ae2b81a82353ec03232a13172ae37b1b2614c96f25", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "26fc11c460cf2bb00d2c92ae2b81a82353ec03232a13172ae37b1b2614c96f25", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "26fc11c460cf2bb00d2c92ae2b81a82353ec03232a13172ae37b1b2614c96f25", kill_on_drop: false }` [INFO] [stdout] 26fc11c460cf2bb00d2c92ae2b81a82353ec03232a13172ae37b1b2614c96f25 [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] 73598a7a7d7cb9b5292039a1fcff94bf31d912234548b8e29eb803dc526d0e3e [INFO] running `Command { std: "docker" "start" "-a" "73598a7a7d7cb9b5292039a1fcff94bf31d912234548b8e29eb803dc526d0e3e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.108 [INFO] [stderr] Compiling proc-macro2 v1.0.32 [INFO] [stderr] Compiling syn v1.0.82 [INFO] [stderr] Compiling futures-core v0.3.18 [INFO] [stderr] Compiling autocfg v0.1.6 [INFO] [stderr] Checking futures-io v0.3.18 [INFO] [stderr] Compiling serde v1.0.101 [INFO] [stderr] Checking event-listener v2.5.1 [INFO] [stderr] Checking cache-padded v1.1.1 [INFO] [stderr] Checking waker-fn v1.1.0 [INFO] [stderr] Checking parking v2.0.0 [INFO] [stderr] Checking fastrand v1.5.0 [INFO] [stderr] Compiling memoffset v0.6.4 [INFO] [stderr] Checking async-task v4.0.3 [INFO] [stderr] Compiling futures-task v0.3.18 [INFO] [stderr] Compiling futures-channel v0.3.18 [INFO] [stderr] Checking concurrent-queue v1.2.2 [INFO] [stderr] Compiling futures-util v0.3.18 [INFO] [stderr] Checking futures-sink v0.3.18 [INFO] [stderr] Checking atomic-waker v1.0.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling signal-hook v0.3.10 [INFO] [stderr] Compiling bitflags v1.2.0 [INFO] [stderr] Compiling crossbeam-queue v0.3.2 [INFO] [stderr] Checking futures-lite v1.12.0 [INFO] [stderr] Checking async-channel v1.6.1 [INFO] [stderr] Checking idna v0.2.0 [INFO] [stderr] Compiling num-traits v0.2.8 [INFO] [stderr] Compiling num-integer v0.1.41 [INFO] [stderr] Compiling bincode v1.2.0 [INFO] [stderr] Checking async-lock v2.4.0 [INFO] [stderr] Checking ppv-lite86 v0.2.15 [INFO] [stderr] Checking unicode-width v0.1.6 [INFO] [stderr] Checking simple-mutex v1.1.5 [INFO] [stderr] Checking crossbeam-channel v0.5.1 [INFO] [stderr] Checking ascii v1.0.0 [INFO] [stderr] Checking chunked_transfer v1.4.0 [INFO] [stderr] Compiling ntest_proc_macro_helper v0.7.3 [INFO] [stderr] Checking hex v0.4.0 [INFO] [stderr] Compiling hex-literal v0.3.4 [INFO] [stderr] Checking async-dup v1.2.2 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Checking crossbeam-deque v0.8.1 [INFO] [stderr] Checking url v2.1.0 [INFO] [stderr] Checking socket2 v0.4.2 [INFO] [stderr] Checking polling v2.2.0 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking atty v0.2.13 [INFO] [stderr] Checking term_size v0.3.1 [INFO] [stderr] Checking ring v0.16.20 [INFO] [stderr] Checking crossbeam v0.8.1 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking blocking v1.1.0 [INFO] [stderr] Checking async-io v1.6.0 [INFO] [stderr] Checking async-executor v1.4.1 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking async-process v1.3.0 [INFO] [stderr] Checking async-net v1.6.1 [INFO] [stderr] Checking async-fs v1.5.0 [INFO] [stderr] Checking smol v1.2.5 [INFO] [stderr] Checking stderrlog v0.5.1 [INFO] [stderr] Checking tiny_http v0.9.0 [INFO] [stderr] Compiling serde_derive v1.0.101 [INFO] [stderr] Compiling futures-macro v0.3.18 [INFO] [stderr] Compiling ntest_test_cases v0.7.3 [INFO] [stderr] Checking futures-executor v0.3.18 [INFO] [stderr] Checking futures v0.3.18 [INFO] [stderr] Checking serde_json v1.0.44 [INFO] [stderr] Compiling toml v0.5.8 [INFO] [stderr] Checking bitcoin v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/api/mod.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Serialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/address.rs:5:25 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/address.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:17:35 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:28:35 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/hash.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/hash.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:19:21 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/network/message.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/network/message.rs:5:21 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/api/mod.rs:184:99 [INFO] [stdout] | [INFO] [stdout] 184 | ... let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap(); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 184 - let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap(); [INFO] [stdout] 184 + let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[block as usize ]).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::miner::new` [INFO] [stdout] --> src/blockchain/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::miner::new; [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 imports: `generate_random_block_1` and `self` [INFO] [stdout] --> src/blockchain/mod.rs:3:34 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::types::block::{Block, generate_random_block_1, self}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ring::rand::generate` [INFO] [stdout] --> src/blockchain/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use ring::rand::generate; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/blockchain/mod.rs:53:27 [INFO] [stdout] | [INFO] [stdout] 53 | let heady= Header{parent: parent, nonce: noncy, difficulty: dify, timestamp: timy, merkle_root: merkly}; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [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: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/block.rs:97:17 [INFO] [stdout] | [INFO] [stdout] 97 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/hash.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/hash.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/transaction.rs:121:17 [INFO] [stdout] | [INFO] [stdout] 121 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdDSAParameters` and `self` [INFO] [stdout] --> src/types/transaction.rs:2:82 [INFO] [stdout] | [INFO] [stdout] 2 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters, self}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:16 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `reciever` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:52 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:66 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `account_nonce` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:55:16 [INFO] [stdout] | [INFO] [stdout] 55 | Self { transaction: transaction, signature: signature, public_key: public_key } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `transaction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:55:42 [INFO] [stdout] | [INFO] [stdout] 55 | Self { transaction: transaction, signature: signature, public_key: public_key } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `signature` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:55:64 [INFO] [stdout] | [INFO] [stdout] 55 | Self { transaction: transaction, signature: signature, public_key: public_key } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/types/transaction.rs:98:43 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn generate_random_transaction_1() -> (SignedTransaction) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 98 - pub fn generate_random_transaction_1() -> (SignedTransaction) { [INFO] [stdout] 98 + pub fn generate_random_transaction_1() -> SignedTransaction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::address` [INFO] [stdout] --> src/types/transaction.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | use crate::types::address; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/miner/mod.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Sender`, `TryRecvError`, and `unbounded` [INFO] [stdout] --> src/miner/worker.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use crossbeam::channel::{unbounded, Receiver, Sender, TryRecvError}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `debug` [INFO] [stdout] --> src/miner/worker.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use log::{debug, info}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::network::worker` [INFO] [stdout] --> src/miner/worker.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::network::worker; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/miner/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block` [INFO] [stdout] --> src/miner/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::types::block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/miner/mod.rs:245:16 [INFO] [stdout] | [INFO] [stdout] 245 | if ((new_block.hash() <= c_dify) & !btclone.is_empty()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 245 - if ((new_block.hash() <= c_dify) & !btclone.is_empty()){ [INFO] [stdout] 245 + if (new_block.hash() <= c_dify) & !btclone.is_empty() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/peer.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/peer.rs:62:16 [INFO] [stdout] | [INFO] [stdout] 62 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/peer.rs:49:20 [INFO] [stdout] | [INFO] [stdout] 49 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/server.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/server.rs:239:16 [INFO] [stdout] | [INFO] [stdout] 239 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/server.rs:270:20 [INFO] [stdout] | [INFO] [stdout] 270 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:328:16 [INFO] [stdout] | [INFO] [stdout] 328 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:332:16 [INFO] [stdout] | [INFO] [stdout] 332 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:346:16 [INFO] [stdout] | [INFO] [stdout] 346 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/network/worker.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Sender`, `TryRecvError`, and `unbounded` [INFO] [stdout] --> src/txgen/worker.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use crossbeam::channel::{unbounded, Receiver, Sender, TryRecvError}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `debug` [INFO] [stdout] --> src/txgen/worker.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use log::{debug, info}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::Block` [INFO] [stdout] --> src/txgen/worker.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::types::block::Block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Blockchain` [INFO] [stdout] --> src/txgen/worker.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::blockchain::{Mempool, Blockchain}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::network::worker` [INFO] [stdout] --> src/txgen/worker.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::network::worker; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `smol::net::unix::SocketAddr` [INFO] [stdout] --> src/txgen/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use smol::net::unix::SocketAddr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/txgen/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block` [INFO] [stdout] --> src/txgen/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::types::block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::Block` [INFO] [stdout] --> src/txgen/mod.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use crate::types::block::Block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `generate_random_transaction_1` [INFO] [stdout] --> src/txgen/mod.rs:17:33 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::types::transaction::{generate_random_transaction_1, sign}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Hashable` [INFO] [stdout] --> src/txgen/mod.rs:21:32 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::types::hash::{H256, Hashable}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `generate_block` [INFO] [stdout] --> src/txgen/mod.rs:23:27 [INFO] [stdout] | [INFO] [stdout] 23 | use crate::types::block::{generate_block}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdDSAParameters`, `Signature`, `VerificationAlgorithm`, and `self` [INFO] [stdout] --> src/txgen/mod.rs:25:39 [INFO] [stdout] | [INFO] [stdout] 25 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters, self}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/txgen/mod.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | use rand::{thread_rng,Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VerificationAlgorithm` [INFO] [stdout] --> src/types/transaction.rs:2:59 [INFO] [stdout] | [INFO] [stdout] 2 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters, self}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/blockchain/mod.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let mut new_map = HashMap::new(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/blockchain/mod.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut address_vec: Vec
= Vec::new(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address_vec` [INFO] [stdout] --> src/blockchain/mod.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut address_vec: Vec
= Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address_vec` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `produced_public_key` [INFO] [stdout] --> src/blockchain/mod.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | let produced_public_key = public_key_bytes.clone().as_ref().to_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_produced_public_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/blockchain/mod.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | for i in 0..(self.tip_level+1){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/address.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | let mut big_hash_slice: &[u8] = big_hash.as_ref(); [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling proc-macro-crate v0.1.5 [INFO] [stdout] warning: unused variable: `lev` [INFO] [stdout] --> src/types/block.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let lev: u64 = 0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_lev` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/merkle.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | let mut ind = index; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf_size` [INFO] [stdout] --> src/types/merkle.rs:113:72 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn verify(root: &H256, datum: &H256, proof: &[H256], index: usize, leaf_size: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaf_size` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pub2` [INFO] [stdout] --> src/types/transaction.rs:109:20 [INFO] [stdout] | [INFO] [stdout] 109 | let (address2, pub2, keys2) = generate_random_address(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pub2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keys2` [INFO] [stdout] --> src/types/transaction.rs:109:26 [INFO] [stdout] | [INFO] [stdout] 109 | let (address2, pub2, keys2) = generate_random_address(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_keys2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | let mut block_state: HashMap; [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:256:17 [INFO] [stdout] | [INFO] [stdout] 256 | let mut temp_parent: H256; [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:271:29 [INFO] [stdout] | [INFO] [stdout] 271 | let mut new_nonce: u32; [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:294:25 [INFO] [stdout] | [INFO] [stdout] 294 | let mut block_state: HashMap; [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `cont` is never read [INFO] [stdout] --> src/miner/mod.rs:121:24 [INFO] [stdout] | [INFO] [stdout] 121 | let mut cont = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/network/worker.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 321 | _ => unimplemented!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/network/worker.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 75 | Message::Ping(nonce) => { [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 79 | Message::Pong(nonce) => { [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 82 | Message::NewBlockHashes(nonce) => { [INFO] [stdout] | ------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 98 | Message::GetBlocks(nonce) =>{ [INFO] [stdout] | ------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 321 | _ => unimplemented!(), [INFO] [stdout] | ^ ...and 4 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/network/worker.rs:153:49 [INFO] [stdout] | [INFO] [stdout] 153 | ... let mut block_state: HashMap = b_chain.state_map.get(&parenty.clone()).unwrap().clone(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/network/worker.rs:295:41 [INFO] [stdout] | [INFO] [stdout] 295 | ... let mut tip_state: HashMap; [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> src/network/worker.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | let cc = contained.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> src/network/worker.rs:262:29 [INFO] [stdout] | [INFO] [stdout] 262 | let cc = contained.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `send_balance` [INFO] [stdout] --> src/network/worker.rs:302:65 [INFO] [stdout] | [INFO] [stdout] 302 | ... let (tip_account_nonce, send_balance) = *tip_state.get(&sender_clone).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_send_balance` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `produced_public_key` [INFO] [stdout] --> src/txgen/mod.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let produced_public_key = public_key_bytes.clone().as_ref().to_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_produced_public_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `node_num` [INFO] [stdout] --> src/txgen/mod.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut node_num: u8; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_node_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/txgen/mod.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 212 | let mut tip_hash: H256; [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/txgen/mod.rs:230:25 [INFO] [stdout] | [INFO] [stdout] 230 | let mut sender_nonce: u32; [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/txgen/mod.rs:231:25 [INFO] [stdout] | [INFO] [stdout] 231 | let mut sender_balance: u32; [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/api/mod.rs:60:39 [INFO] [stdout] | [INFO] [stdout] 60 | let handle = HTTPServer::http(&addr).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/api/mod.rs:184:50 [INFO] [stdout] | [INFO] [stdout] 184 | ... let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Mempool` [INFO] [stdout] --> src/blockchain/mod.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | / pub fn new() -> Self{ [INFO] [stdout] 32 | | let mut new_map = HashMap::new(); [INFO] [stdout] 33 | | Self {map: new_map} [INFO] [stdout] 34 | | } [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] 30 + impl Default for Mempool { [INFO] [stdout] 31 + fn default() -> Self { [INFO] [stdout] 32 + Self::new() [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Blockchain` [INFO] [stdout] --> src/blockchain/mod.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new() -> Self { [INFO] [stdout] 44 | | let zeros: [u8; 32] = [0;32]; [INFO] [stdout] 45 | | let parent: H256 = H256::from(zeros); [INFO] [stdout] ... | [INFO] [stdout] 99 | | Self {map: new_map, level_map: new_level_map, tip_hash: genesis_hash, tip_level: level, state_map: new_state_map} [INFO] [stdout] 100 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 41 + impl Default for Blockchain { [INFO] [stdout] 42 + fn default() -> Self { [INFO] [stdout] 43 + Self::new() [INFO] [stdout] 44 + } [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | let genesis_hash_copy = genesis_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:59:35 [INFO] [stdout] | [INFO] [stdout] 59 | let genesis_hash_copy_2 = genesis_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:105:31 [INFO] [stdout] | [INFO] [stdout] 105 | let block_hash_copy = block_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:106:32 [INFO] [stdout] | [INFO] [stdout] 106 | let block_hash_copy2 = block_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:107:32 [INFO] [stdout] | [INFO] [stdout] 107 | let block_hash_copy3 = block_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:111:27 [INFO] [stdout] | [INFO] [stdout] 111 | let parent_hash = block_copy_1.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_copy_1.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:112:28 [INFO] [stdout] | [INFO] [stdout] 112 | let parent_hash2 = parent_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:114:48 [INFO] [stdout] | [INFO] [stdout] 114 | Some(parent_lev) => parent_level = parent_lev.clone(), // If code is not working check this line [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*parent_lev` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/blockchain/mod.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | self.tip_level = self.tip_level+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.tip_level += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:145:51 [INFO] [stdout] | [INFO] [stdout] 145 | let new_send_bal = send_bal - valuey.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:146:55 [INFO] [stdout] | [INFO] [stdout] 146 | let new_recieve_bal = recieve_bal+valuey.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:159:51 [INFO] [stdout] | [INFO] [stdout] 159 | let new_send_bal = send_bal - valuey.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:162:40 [INFO] [stdout] | [INFO] [stdout] 162 | block_state.insert(recievery.clone(), (0,valuey.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `recievery` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:162:62 [INFO] [stdout] | [INFO] [stdout] 162 | block_state.insert(recievery.clone(), (0,valuey.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | self.tip_hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.tip_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | let block_parent_hash = temp_block_copy.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `temp_block_copy.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/address.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | counter = counter+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/block.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 78 | let block = Block{header: heady, content: no_content}; [INFO] [stdout] | ------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 79 | block [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 ~ Block{header: heady, content: no_content} [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/types/block.rs:84:78 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn generate_block(parent: &H256, difficulty: &H256, signed_transactions: &Vec) -> Block { [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] 84 ~ pub fn generate_block(parent: &H256, difficulty: &H256, signed_transactions: &[SignedTransaction]) -> Block { [INFO] [stdout] 85 | let noncy: u32 = rand::random(); [INFO] [stdout] 86 | let timy = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(); [INFO] [stdout] 87 ~ let content_duplicate = signed_transactions.to_owned(); [INFO] [stdout] 88 | let merkly = MerkleTree::new(&content_duplicate).root(); [INFO] [stdout] 89 | let heady= Header{parent: *parent, nonce: noncy, difficulty: *difficulty, timestamp: timy, merkle_root: merkly}; [INFO] [stdout] 90 ~ let contenty = Content(signed_transactions.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/block.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 91 | let block = Block{header: heady, content: contenty}; [INFO] [stdout] | ---------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 92 | block [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 91 ~ [INFO] [stdout] 92 ~ Block{header: heady, content: contenty} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/types/merkle.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | if counter%2 ==0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace with: `counter.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | counter = counter+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:62:17 [INFO] [stdout] | [INFO] [stdout] 62 | length = length +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `length += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | length = length/2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `length /= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | lev = lev + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `lev += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:99:58 [INFO] [stdout] | [INFO] [stdout] 99 | output.push(self.tree_vector[i as usize][(ind-1) as usize]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `((ind-1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | ind = ind -1 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `ind -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | ind = ind/2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `ind /= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&[u8]` [INFO] [stdout] --> src/types/key_pair.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | Ed25519KeyPair::from_pkcs8(pkcs8_bytes.as_ref().into()).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `pkcs8_bytes.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/transaction.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 115 | let signed_tx = SignedTransaction { transaction: tx_c, signature:sig_to_vec(signat), public_key: pub1 }; [INFO] [stdout] | -------------------------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 116 | signed_tx [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 115 ~ [INFO] [stdout] 116 ~ SignedTransaction { transaction: tx_c, signature:sig_to_vec(signat), public_key: pub1 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/miner/worker.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / let mut block_vec: Vec = Vec::new(); [INFO] [stdout] 54 | | block_vec.push(new_block.hash()); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let block_vec: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/miner/mod.rs:261:16 [INFO] [stdout] | [INFO] [stdout] 261 | if !(temp_parent == parent){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(temp_parent != parent)` [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 `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:155:29 [INFO] [stdout] | [INFO] [stdout] 155 | / ... if acny==(send_an+1) { [INFO] [stdout] 156 | | ... if valuey <= send_bal{ [INFO] [stdout] 157 | | ... if !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] 158 | | ... keys_to_remove.push(key.clone()); [INFO] [stdout] ... | [INFO] [stdout] 167 | | ... } [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] 155 ~ if acny==(send_an+1) [INFO] [stdout] 156 ~ && valuey <= send_bal{ [INFO] [stdout] 157 | if !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] ... [INFO] [stdout] 165 | [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:156:33 [INFO] [stdout] | [INFO] [stdout] 156 | / ... if valuey <= send_bal{ [INFO] [stdout] 157 | | ... if !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] 158 | | ... keys_to_remove.push(key.clone()); [INFO] [stdout] 159 | | ... used_addresses.push(sendery.clone()); [INFO] [stdout] ... | [INFO] [stdout] 166 | | ... } [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] 156 ~ if valuey <= send_bal [INFO] [stdout] 157 ~ && !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] 158 | keys_to_remove.push(key.clone()); [INFO] [stdout] ... [INFO] [stdout] 163 | } [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:158:61 [INFO] [stdout] | [INFO] [stdout] 158 | ... keys_to_remove.push(key.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:159:61 [INFO] [stdout] | [INFO] [stdout] 159 | ... used_addresses.push(sendery.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sendery` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/miner/mod.rs:160:41 [INFO] [stdout] | [INFO] [stdout] 160 | ... cont = cont+1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `cont += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `keys_to_remove` [INFO] [stdout] --> src/miner/mod.rs:173:26 [INFO] [stdout] | [INFO] [stdout] 173 | for i in 0..keys_to_remove.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 173 - for i in 0..keys_to_remove.len(){ [INFO] [stdout] 173 + for in &keys_to_remove{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/miner/mod.rs:178:17 [INFO] [stdout] | [INFO] [stdout] 178 | flag = flag+ 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `flag += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:229:28 [INFO] [stdout] | [INFO] [stdout] 229 | let c_parent = parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:230:29 [INFO] [stdout] | [INFO] [stdout] 230 | let c1_parent = parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:236:26 [INFO] [stdout] | [INFO] [stdout] 236 | let c_dify = dify.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `dify` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:285:26 [INFO] [stdout] | [INFO] [stdout] 285 | parent = temp_parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `temp_parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:306:25 [INFO] [stdout] | [INFO] [stdout] 306 | / if acny==(send_an+1) { [INFO] [stdout] 307 | | if valuey <= send_bal{ [INFO] [stdout] 308 | | if !used_addresses.contains(&sendery){ [INFO] [stdout] 309 | | keys_to_remove.push(key.clone()); [INFO] [stdout] ... | [INFO] [stdout] 318 | | } [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 acny==(send_an+1) [INFO] [stdout] 307 ~ && valuey <= send_bal{ [INFO] [stdout] 308 | if !used_addresses.contains(&sendery){ [INFO] [stdout] ... [INFO] [stdout] 316 | [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:307:29 [INFO] [stdout] | [INFO] [stdout] 307 | / ... if valuey <= send_bal{ [INFO] [stdout] 308 | | ... if !used_addresses.contains(&sendery){ [INFO] [stdout] 309 | | ... keys_to_remove.push(key.clone()); [INFO] [stdout] 310 | | ... used_addresses.push(sendery); [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 valuey <= send_bal [INFO] [stdout] 308 ~ && !used_addresses.contains(&sendery){ [INFO] [stdout] 309 | keys_to_remove.push(key.clone()); [INFO] [stdout] ... [INFO] [stdout] 314 | } [INFO] [stdout] 315 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:309:57 [INFO] [stdout] | [INFO] [stdout] 309 | ... keys_to_remove.push(key.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/miner/mod.rs:311:37 [INFO] [stdout] | [INFO] [stdout] 311 | ... cont = cont+1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `cont += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `keys_to_remove` [INFO] [stdout] --> src/miner/mod.rs:324:22 [INFO] [stdout] | [INFO] [stdout] 324 | for i in 0..keys_to_remove.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 324 - for i in 0..keys_to_remove.len(){ [INFO] [stdout] 324 + for in &keys_to_remove{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/miner/mod.rs:331:64 [INFO] [stdout] | [INFO] [stdout] 331 | let interval = time::Duration::from_micros(i as u64); [INFO] [stdout] | ^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/network/server.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | return Ok(()); [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] 61 - return Ok(()); [INFO] [stdout] 61 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/network/server.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | return Ok(()); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 108 - return Ok(()); [INFO] [stdout] 108 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/server.rs:118:60 [INFO] [stdout] | [INFO] [stdout] 118 | let stream = Async::::connect(addr.clone()).await?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/network/server.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | / loop { [INFO] [stdout] 156 | | // first, read exactly 4 bytes to get the frame header [INFO] [stdout] 157 | | let msg_size = match reader.read_exact(&mut size_buffer).await { [INFO] [stdout] 158 | | Ok(_) => u32::from_be_bytes(size_buffer), [INFO] [stdout] ... | [INFO] [stdout] 182 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 155 ~ while let Ok(_) = reader.read_exact(&mut size_buffer).await { [INFO] [stdout] 156 + let msg_size = u32::from_be_bytes(size_buffer); [INFO] [stdout] 157 + .. [INFO] [stdout] 158 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 84 - for i in 0..nonce.len(){ [INFO] [stdout] 84 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:86:48 [INFO] [stdout] | [INFO] [stdout] 86 | ... not_contained.push(nonce[i].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nonce[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:100:30 [INFO] [stdout] | [INFO] [stdout] 100 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 100 - for i in 0..nonce.len(){ [INFO] [stdout] 100 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `child` is only used to index `reunited_orphans` [INFO] [stdout] --> src/network/worker.rs:135:38 [INFO] [stdout] | [INFO] [stdout] 135 | for child in 0..reunited_orphans.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 135 - for child in 0..reunited_orphans.len(){ [INFO] [stdout] 135 + for in &reunited_orphans{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:140:34 [INFO] [stdout] | [INFO] [stdout] 140 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 140 - for i in 0..nonce.len(){ [INFO] [stdout] 140 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:168:57 [INFO] [stdout] | [INFO] [stdout] 168 | ... validity_check = validity_check +1; // indicates it's invalid [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:171:57 [INFO] [stdout] | [INFO] [stdout] 171 | ... validity_check = validity_check +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:174:57 [INFO] [stdout] | [INFO] [stdout] 174 | ... validity_check = validity_check +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:177:53 [INFO] [stdout] | [INFO] [stdout] 177 | ... validity_check = validity_check +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:186:65 [INFO] [stdout] | [INFO] [stdout] 186 | ... new_blocks.push(hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:190:84 [INFO] [stdout] | [INFO] [stdout] 190 | ... if orphan_parents[orph] == hash.clone(){ [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:205:66 [INFO] [stdout] | [INFO] [stdout] 205 | ... orphan_buffer.insert(hash.clone(), nonce[i].clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:206:65 [INFO] [stdout] | [INFO] [stdout] 206 | ... orphan_parents.push(parenty.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parenty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:213:65 [INFO] [stdout] | [INFO] [stdout] 213 | ... missing_parent.push(parenty.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parenty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/network/worker.rs:212:45 [INFO] [stdout] | [INFO] [stdout] 212 | / ... let mut missing_parent: Vec = Vec::new(); [INFO] [stdout] 213 | | ... missing_parent.push(parenty.clone()); [INFO] [stdout] | |___________________________________________________________^ help: consider using the `vec![]` macro: `let missing_parent: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:237:30 [INFO] [stdout] | [INFO] [stdout] 237 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 237 - for i in 0..nonce.len(){ [INFO] [stdout] 237 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:239:48 [INFO] [stdout] | [INFO] [stdout] 239 | ... not_contained.push(nonce[i].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nonce[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:249:30 [INFO] [stdout] | [INFO] [stdout] 249 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 249 - for i in 0..nonce.len(){ [INFO] [stdout] 249 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:271:30 [INFO] [stdout] | [INFO] [stdout] 271 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 271 - for i in 0..nonce.len(){ [INFO] [stdout] 271 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:275:38 [INFO] [stdout] | [INFO] [stdout] 275 | let sender = transaction.get_sender().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `transaction.get_sender()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:277:44 [INFO] [stdout] | [INFO] [stdout] 277 | let sender_clone = sender.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `sender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/txgen/worker.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | / let mut tx_vec: Vec = Vec::new(); [INFO] [stdout] 55 | | tx_vec.push(new_tx.hash()); [INFO] [stdout] | |_______________________________________^ help: consider using the `vec![]` macro: `let tx_vec: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&Ed25519KeyPair>` which implements the `Copy` trait [INFO] [stdout] --> src/txgen/mod.rs:205:32 [INFO] [stdout] | [INFO] [stdout] 205 | let key_pair = self.controlled_nodes.get(key_pair_index).clone().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.controlled_nodes.get(key_pair_index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/txgen/mod.rs:209:40 [INFO] [stdout] | [INFO] [stdout] 209 | let sender_address_1 = sender_address.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sender_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/txgen/mod.rs:241:34 [INFO] [stdout] | [INFO] [stdout] 241 | let r_addy = self.all_adresses[rand_index].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.all_adresses[rand_index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/txgen/mod.rs:245:49 [INFO] [stdout] | [INFO] [stdout] 245 | let signat = sign(&transact,&key_pair); // might need to clone here!!! [INFO] [stdout] | ^^^^^^^^^ help: change this to: `key_pair` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/txgen/mod.rs:261:64 [INFO] [stdout] | [INFO] [stdout] 261 | ... let interval = time::Duration::from_micros(i as u64); // if code is not working try undoing this, made the sleep longer to ma... [INFO] [stdout] | ^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/api/mod.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Serialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_ApiResponse` [INFO] [stdout] 26 | struct ApiResponse { [INFO] [stdout] | ----------- `ApiResponse` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/address.rs:5:25 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Address` [INFO] [stdout] 6 | pub struct Address(pub [u8; 20]); [INFO] [stdout] | ------- `Address` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/address.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Address` [INFO] [stdout] 6 | pub struct Address(pub [u8; 20]); [INFO] [stdout] | ------- `Address` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hashArray` should have a snake case name [INFO] [stdout] --> src/types/address.rs:62:17 [INFO] [stdout] | [INFO] [stdout] 62 | let mut hashArray: [u8; 20] = [0; 20]; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_array` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Block` [INFO] [stdout] ... [INFO] [stdout] 12 | pub struct Block { [INFO] [stdout] | ----- `Block` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Block` [INFO] [stdout] ... [INFO] [stdout] 12 | pub struct Block { [INFO] [stdout] | ----- `Block` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Header` [INFO] [stdout] 18 | pub struct Header{ [INFO] [stdout] | ------ `Header` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:17:35 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Header` [INFO] [stdout] 18 | pub struct Header{ [INFO] [stdout] | ------ `Header` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Content` [INFO] [stdout] 29 | pub struct Content(pub Vec); [INFO] [stdout] | ------- `Content` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:28:35 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Content` [INFO] [stdout] 29 | pub struct Content(pub Vec); [INFO] [stdout] | ------- `Content` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/hash.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_H256` [INFO] [stdout] 14 | pub struct H256([u8; 32]); // big endian u256 [INFO] [stdout] | ---- `H256` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/hash.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_H256` [INFO] [stdout] 14 | pub struct H256([u8; 32]); // big endian u256 [INFO] [stdout] | ---- `H256` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hash_H256` should have a snake case name [INFO] [stdout] --> src/types/merkle.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | let hash_H256 = H256::from(both_hash); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_h256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hash_H256` should have a snake case name [INFO] [stdout] --> src/types/merkle.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | let hash_H256 = H256::from(both_hash); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_h256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hash_H256` should have a snake case name [INFO] [stdout] --> src/types/merkle.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | let hash_H256 = H256::from(both_hash); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_h256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Transaction` [INFO] [stdout] 11 | pub struct Transaction { [INFO] [stdout] | ----------- `Transaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Transaction` [INFO] [stdout] 11 | pub struct Transaction { [INFO] [stdout] | ----------- `Transaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_SignedTransaction` [INFO] [stdout] 20 | pub struct SignedTransaction { [INFO] [stdout] | ----------------- `SignedTransaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:19:21 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_SignedTransaction` [INFO] [stdout] 20 | pub struct SignedTransaction { [INFO] [stdout] | ----------------- `SignedTransaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/network/message.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Message` [INFO] [stdout] 6 | pub enum Message { [INFO] [stdout] | ------- `Message` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/network/message.rs:5:21 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Message` [INFO] [stdout] 6 | pub enum Message { [INFO] [stdout] | ------- `Message` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling ntest_timeout v0.7.3 [INFO] [stderr] Checking ntest v0.7.3 [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/api/mod.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Serialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/address.rs:5:25 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/address.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:17:35 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/block.rs:28:35 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/hash.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/hash.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/types/transaction.rs:19:21 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/network/message.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/network/message.rs:5:21 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/api/mod.rs:184:99 [INFO] [stdout] | [INFO] [stdout] 184 | ... let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap(); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 184 - let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap(); [INFO] [stdout] 184 + let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[block as usize ]).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::miner::new` [INFO] [stdout] --> src/blockchain/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::miner::new; [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 imports: `generate_random_block_1` and `self` [INFO] [stdout] --> src/blockchain/mod.rs:3:34 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::types::block::{Block, generate_random_block_1, self}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ring::rand::generate` [INFO] [stdout] --> src/blockchain/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use ring::rand::generate; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/blockchain/mod.rs:53:27 [INFO] [stdout] | [INFO] [stdout] 53 | let heady= Header{parent: parent, nonce: noncy, difficulty: dify, timestamp: timy, merkle_root: merkly}; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [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: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/block.rs:97:17 [INFO] [stdout] | [INFO] [stdout] 97 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/hash.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/hash.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/transaction.rs:121:17 [INFO] [stdout] | [INFO] [stdout] 121 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdDSAParameters` and `self` [INFO] [stdout] --> src/types/transaction.rs:2:82 [INFO] [stdout] | [INFO] [stdout] 2 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters, self}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:16 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `reciever` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:52 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:32:66 [INFO] [stdout] | [INFO] [stdout] 32 | Self { sender: sender, reciever: reciever, value: value, account_nonce: account_nonce } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `account_nonce` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:55:16 [INFO] [stdout] | [INFO] [stdout] 55 | Self { transaction: transaction, signature: signature, public_key: public_key } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `transaction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:55:42 [INFO] [stdout] | [INFO] [stdout] 55 | Self { transaction: transaction, signature: signature, public_key: public_key } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `signature` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:55:64 [INFO] [stdout] | [INFO] [stdout] 55 | Self { transaction: transaction, signature: signature, public_key: public_key } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/types/transaction.rs:98:43 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn generate_random_transaction_1() -> (SignedTransaction) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 98 - pub fn generate_random_transaction_1() -> (SignedTransaction) { [INFO] [stdout] 98 + pub fn generate_random_transaction_1() -> SignedTransaction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::address` [INFO] [stdout] --> src/types/transaction.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | use crate::types::address; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/miner/mod.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Sender`, `TryRecvError`, and `unbounded` [INFO] [stdout] --> src/miner/worker.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use crossbeam::channel::{unbounded, Receiver, Sender, TryRecvError}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `debug` [INFO] [stdout] --> src/miner/worker.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use log::{debug, info}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::network::worker` [INFO] [stdout] --> src/miner/worker.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::network::worker; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/miner/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block` [INFO] [stdout] --> src/miner/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::types::block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/miner/mod.rs:245:16 [INFO] [stdout] | [INFO] [stdout] 245 | if ((new_block.hash() <= c_dify) & !btclone.is_empty()){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 245 - if ((new_block.hash() <= c_dify) & !btclone.is_empty()){ [INFO] [stdout] 245 + if (new_block.hash() <= c_dify) & !btclone.is_empty() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/peer.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/peer.rs:62:16 [INFO] [stdout] | [INFO] [stdout] 62 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/peer.rs:49:20 [INFO] [stdout] | [INFO] [stdout] 49 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/server.rs:235:16 [INFO] [stdout] | [INFO] [stdout] 235 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/server.rs:239:16 [INFO] [stdout] | [INFO] [stdout] 239 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/server.rs:270:20 [INFO] [stdout] | [INFO] [stdout] 270 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:328:16 [INFO] [stdout] | [INFO] [stdout] 328 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:332:16 [INFO] [stdout] | [INFO] [stdout] 332 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/network/worker.rs:346:16 [INFO] [stdout] | [INFO] [stdout] 346 | #[cfg(any(test,test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/network/worker.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Sender`, `TryRecvError`, and `unbounded` [INFO] [stdout] --> src/txgen/worker.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use crossbeam::channel::{unbounded, Receiver, Sender, TryRecvError}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `debug` [INFO] [stdout] --> src/txgen/worker.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use log::{debug, info}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::Block` [INFO] [stdout] --> src/txgen/worker.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::types::block::Block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Blockchain` [INFO] [stdout] --> src/txgen/worker.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::blockchain::{Mempool, Blockchain}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::network::worker` [INFO] [stdout] --> src/txgen/worker.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::network::worker; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `smol::net::unix::SocketAddr` [INFO] [stdout] --> src/txgen/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use smol::net::unix::SocketAddr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::mem` [INFO] [stdout] --> src/txgen/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::mem; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block` [INFO] [stdout] --> src/txgen/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::types::block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::Block` [INFO] [stdout] --> src/txgen/mod.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use crate::types::block::Block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `generate_random_transaction_1` [INFO] [stdout] --> src/txgen/mod.rs:17:33 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::types::transaction::{generate_random_transaction_1, sign}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Hashable` [INFO] [stdout] --> src/txgen/mod.rs:21:32 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::types::hash::{H256, Hashable}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `generate_block` [INFO] [stdout] --> src/txgen/mod.rs:23:27 [INFO] [stdout] | [INFO] [stdout] 23 | use crate::types::block::{generate_block}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdDSAParameters`, `Signature`, `VerificationAlgorithm`, and `self` [INFO] [stdout] --> src/txgen/mod.rs:25:39 [INFO] [stdout] | [INFO] [stdout] 25 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters, self}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/txgen/mod.rs:28:12 [INFO] [stdout] | [INFO] [stdout] 28 | use rand::{thread_rng,Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VerificationAlgorithm` [INFO] [stdout] --> src/types/transaction.rs:2:59 [INFO] [stdout] | [INFO] [stdout] 2 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters, self}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/blockchain/mod.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let mut new_map = HashMap::new(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/blockchain/mod.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut address_vec: Vec
= Vec::new(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `address_vec` [INFO] [stdout] --> src/blockchain/mod.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut address_vec: Vec
= Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address_vec` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `produced_public_key` [INFO] [stdout] --> src/blockchain/mod.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | let produced_public_key = public_key_bytes.clone().as_ref().to_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_produced_public_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/blockchain/mod.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | for i in 0..(self.tip_level+1){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/address.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | let mut big_hash_slice: &[u8] = big_hash.as_ref(); [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lev` [INFO] [stdout] --> src/types/block.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let lev: u64 = 0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_lev` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lev` [INFO] [stdout] --> src/types/block.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let lev: u64 = 0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_lev` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/merkle.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | let mut ind = index; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf_size` [INFO] [stdout] --> src/types/merkle.rs:113:72 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn verify(root: &H256, datum: &H256, proof: &[H256], index: usize, leaf_size: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaf_size` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pub2` [INFO] [stdout] --> src/types/transaction.rs:109:20 [INFO] [stdout] | [INFO] [stdout] 109 | let (address2, pub2, keys2) = generate_random_address(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pub2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `keys2` [INFO] [stdout] --> src/types/transaction.rs:109:26 [INFO] [stdout] | [INFO] [stdout] 109 | let (address2, pub2, keys2) = generate_random_address(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_keys2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | let mut block_state: HashMap; [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:256:17 [INFO] [stdout] | [INFO] [stdout] 256 | let mut temp_parent: H256; [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:271:29 [INFO] [stdout] | [INFO] [stdout] 271 | let mut new_nonce: u32; [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:294:25 [INFO] [stdout] | [INFO] [stdout] 294 | let mut block_state: HashMap; [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `cont` is never read [INFO] [stdout] --> src/miner/mod.rs:121:24 [INFO] [stdout] | [INFO] [stdout] 121 | let mut cont = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/network/worker.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 321 | _ => unimplemented!(), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/network/worker.rs:321:17 [INFO] [stdout] | [INFO] [stdout] 75 | Message::Ping(nonce) => { [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 79 | Message::Pong(nonce) => { [INFO] [stdout] | -------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 82 | Message::NewBlockHashes(nonce) => { [INFO] [stdout] | ------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 98 | Message::GetBlocks(nonce) =>{ [INFO] [stdout] | ------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 321 | _ => unimplemented!(), [INFO] [stdout] | ^ ...and 4 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/network/worker.rs:153:49 [INFO] [stdout] | [INFO] [stdout] 153 | ... let mut block_state: HashMap = b_chain.state_map.get(&parenty.clone()).unwrap().clone(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/network/worker.rs:295:41 [INFO] [stdout] | [INFO] [stdout] 295 | ... let mut tip_state: HashMap; [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> src/network/worker.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | let cc = contained.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> src/network/worker.rs:262:29 [INFO] [stdout] | [INFO] [stdout] 262 | let cc = contained.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `send_balance` [INFO] [stdout] --> src/network/worker.rs:302:65 [INFO] [stdout] | [INFO] [stdout] 302 | ... let (tip_account_nonce, send_balance) = *tip_state.get(&sender_clone).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_send_balance` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `longest_chain_hashes` is never read [INFO] [stdout] --> src/network/worker.rs:356:47 [INFO] [stdout] | [INFO] [stdout] 356 | let mut longest_chain_hashes: Vec = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `produced_public_key` [INFO] [stdout] --> src/txgen/mod.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let produced_public_key = public_key_bytes.clone().as_ref().to_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_produced_public_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `node_num` [INFO] [stdout] --> src/txgen/mod.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let mut node_num: u8; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_node_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/txgen/mod.rs:212:21 [INFO] [stdout] | [INFO] [stdout] 212 | let mut tip_hash: H256; [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/txgen/mod.rs:230:25 [INFO] [stdout] | [INFO] [stdout] 230 | let mut sender_nonce: u32; [INFO] [stdout] | ----^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/txgen/mod.rs:231:25 [INFO] [stdout] | [INFO] [stdout] 231 | let mut sender_balance: u32; [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/api/mod.rs:60:39 [INFO] [stdout] | [INFO] [stdout] 60 | let handle = HTTPServer::http(&addr).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/api/mod.rs:184:50 [INFO] [stdout] | [INFO] [stdout] 184 | ... let relevant_state = &*blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `blockchain.state_map.get(&longest_chain_vector[(block as usize)]).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Mempool` [INFO] [stdout] --> src/blockchain/mod.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | / pub fn new() -> Self{ [INFO] [stdout] 32 | | let mut new_map = HashMap::new(); [INFO] [stdout] 33 | | Self {map: new_map} [INFO] [stdout] 34 | | } [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] 30 + impl Default for Mempool { [INFO] [stdout] 31 + fn default() -> Self { [INFO] [stdout] 32 + Self::new() [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Blockchain` [INFO] [stdout] --> src/blockchain/mod.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn new() -> Self { [INFO] [stdout] 44 | | let zeros: [u8; 32] = [0;32]; [INFO] [stdout] 45 | | let parent: H256 = H256::from(zeros); [INFO] [stdout] ... | [INFO] [stdout] 99 | | Self {map: new_map, level_map: new_level_map, tip_hash: genesis_hash, tip_level: level, state_map: new_state_map} [INFO] [stdout] 100 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 41 + impl Default for Blockchain { [INFO] [stdout] 42 + fn default() -> Self { [INFO] [stdout] 43 + Self::new() [INFO] [stdout] 44 + } [INFO] [stdout] 45 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | let genesis_hash_copy = genesis_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:59:35 [INFO] [stdout] | [INFO] [stdout] 59 | let genesis_hash_copy_2 = genesis_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:105:31 [INFO] [stdout] | [INFO] [stdout] 105 | let block_hash_copy = block_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:106:32 [INFO] [stdout] | [INFO] [stdout] 106 | let block_hash_copy2 = block_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:107:32 [INFO] [stdout] | [INFO] [stdout] 107 | let block_hash_copy3 = block_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:111:27 [INFO] [stdout] | [INFO] [stdout] 111 | let parent_hash = block_copy_1.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_copy_1.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:112:28 [INFO] [stdout] | [INFO] [stdout] 112 | let parent_hash2 = parent_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:114:48 [INFO] [stdout] | [INFO] [stdout] 114 | Some(parent_lev) => parent_level = parent_lev.clone(), // If code is not working check this line [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*parent_lev` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/blockchain/mod.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | self.tip_level = self.tip_level+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.tip_level += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:145:51 [INFO] [stdout] | [INFO] [stdout] 145 | let new_send_bal = send_bal - valuey.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:146:55 [INFO] [stdout] | [INFO] [stdout] 146 | let new_recieve_bal = recieve_bal+valuey.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:159:51 [INFO] [stdout] | [INFO] [stdout] 159 | let new_send_bal = send_bal - valuey.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:162:40 [INFO] [stdout] | [INFO] [stdout] 162 | block_state.insert(recievery.clone(), (0,valuey.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `recievery` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u32` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:162:62 [INFO] [stdout] | [INFO] [stdout] 162 | block_state.insert(recievery.clone(), (0,valuey.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `valuey` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | self.tip_hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.tip_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain/mod.rs:190:37 [INFO] [stdout] | [INFO] [stdout] 190 | let block_parent_hash = temp_block_copy.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `temp_block_copy.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/address.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | counter = counter+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/block.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 78 | let block = Block{header: heady, content: no_content}; [INFO] [stdout] | ------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 79 | block [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 ~ Block{header: heady, content: no_content} [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/types/block.rs:84:78 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn generate_block(parent: &H256, difficulty: &H256, signed_transactions: &Vec) -> Block { [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] 84 ~ pub fn generate_block(parent: &H256, difficulty: &H256, signed_transactions: &[SignedTransaction]) -> Block { [INFO] [stdout] 85 | let noncy: u32 = rand::random(); [INFO] [stdout] 86 | let timy = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis(); [INFO] [stdout] 87 ~ let content_duplicate = signed_transactions.to_owned(); [INFO] [stdout] 88 | let merkly = MerkleTree::new(&content_duplicate).root(); [INFO] [stdout] 89 | let heady= Header{parent: *parent, nonce: noncy, difficulty: *difficulty, timestamp: timy, merkle_root: merkly}; [INFO] [stdout] 90 ~ let contenty = Content(signed_transactions.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/block.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 91 | let block = Block{header: heady, content: contenty}; [INFO] [stdout] | ---------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 92 | block [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 91 ~ [INFO] [stdout] 92 ~ Block{header: heady, content: contenty} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/block.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 108 | let block = Block{header: heady, content: no_content}; [INFO] [stdout] | ------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 109 | block [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 ~ Block{header: heady, content: no_content} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/types/merkle.rs:17:12 [INFO] [stdout] | [INFO] [stdout] 17 | if counter%2 ==0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace with: `counter.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | counter = counter+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:62:17 [INFO] [stdout] | [INFO] [stdout] 62 | length = length +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `length += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | length = length/2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `length /= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | lev = lev + 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `lev += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:99:58 [INFO] [stdout] | [INFO] [stdout] 99 | output.push(self.tree_vector[i as usize][(ind-1) as usize]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `((ind-1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | ind = ind -1 [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `ind -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | ind = ind/2 [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `ind /= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&[u8]` [INFO] [stdout] --> src/types/key_pair.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | Ed25519KeyPair::from_pkcs8(pkcs8_bytes.as_ref().into()).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `pkcs8_bytes.as_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/transaction.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 115 | let signed_tx = SignedTransaction { transaction: tx_c, signature:sig_to_vec(signat), public_key: pub1 }; [INFO] [stdout] | -------------------------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 116 | signed_tx [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 115 ~ [INFO] [stdout] 116 ~ SignedTransaction { transaction: tx_c, signature:sig_to_vec(signat), public_key: pub1 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types/transaction.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 135 | let rand_transact = Transaction {sender: address1, reciever: address2, value: val, account_nonce: 0}; [INFO] [stdout] | ----------------------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 136 | rand_transact [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 135 ~ [INFO] [stdout] 136 ~ Transaction {sender: address1, reciever: address2, value: val, account_nonce: 0} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/miner/worker.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / let mut block_vec: Vec = Vec::new(); [INFO] [stdout] 54 | | block_vec.push(new_block.hash()); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let block_vec: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/miner/mod.rs:261:16 [INFO] [stdout] | [INFO] [stdout] 261 | if !(temp_parent == parent){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(temp_parent != parent)` [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 `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:155:29 [INFO] [stdout] | [INFO] [stdout] 155 | / ... if acny==(send_an+1) { [INFO] [stdout] 156 | | ... if valuey <= send_bal{ [INFO] [stdout] 157 | | ... if !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] 158 | | ... keys_to_remove.push(key.clone()); [INFO] [stdout] ... | [INFO] [stdout] 167 | | ... } [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] 155 ~ if acny==(send_an+1) [INFO] [stdout] 156 ~ && valuey <= send_bal{ [INFO] [stdout] 157 | if !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] ... [INFO] [stdout] 165 | [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:156:33 [INFO] [stdout] | [INFO] [stdout] 156 | / ... if valuey <= send_bal{ [INFO] [stdout] 157 | | ... if !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] 158 | | ... keys_to_remove.push(key.clone()); [INFO] [stdout] 159 | | ... used_addresses.push(sendery.clone()); [INFO] [stdout] ... | [INFO] [stdout] 166 | | ... } [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] 156 ~ if valuey <= send_bal [INFO] [stdout] 157 ~ && !used_addresses.contains(&sendery.clone()){ [INFO] [stdout] 158 | keys_to_remove.push(key.clone()); [INFO] [stdout] ... [INFO] [stdout] 163 | } [INFO] [stdout] 164 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:158:61 [INFO] [stdout] | [INFO] [stdout] 158 | ... keys_to_remove.push(key.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:159:61 [INFO] [stdout] | [INFO] [stdout] 159 | ... used_addresses.push(sendery.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sendery` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/miner/mod.rs:160:41 [INFO] [stdout] | [INFO] [stdout] 160 | ... cont = cont+1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `cont += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `keys_to_remove` [INFO] [stdout] --> src/miner/mod.rs:173:26 [INFO] [stdout] | [INFO] [stdout] 173 | for i in 0..keys_to_remove.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 173 - for i in 0..keys_to_remove.len(){ [INFO] [stdout] 173 + for in &keys_to_remove{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/miner/mod.rs:178:17 [INFO] [stdout] | [INFO] [stdout] 178 | flag = flag+ 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `flag += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:229:28 [INFO] [stdout] | [INFO] [stdout] 229 | let c_parent = parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:230:29 [INFO] [stdout] | [INFO] [stdout] 230 | let c1_parent = parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:236:26 [INFO] [stdout] | [INFO] [stdout] 236 | let c_dify = dify.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `dify` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:285:26 [INFO] [stdout] | [INFO] [stdout] 285 | parent = temp_parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `temp_parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:306:25 [INFO] [stdout] | [INFO] [stdout] 306 | / if acny==(send_an+1) { [INFO] [stdout] 307 | | if valuey <= send_bal{ [INFO] [stdout] 308 | | if !used_addresses.contains(&sendery){ [INFO] [stdout] 309 | | keys_to_remove.push(key.clone()); [INFO] [stdout] ... | [INFO] [stdout] 318 | | } [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 acny==(send_an+1) [INFO] [stdout] 307 ~ && valuey <= send_bal{ [INFO] [stdout] 308 | if !used_addresses.contains(&sendery){ [INFO] [stdout] ... [INFO] [stdout] 316 | [INFO] [stdout] 317 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/miner/mod.rs:307:29 [INFO] [stdout] | [INFO] [stdout] 307 | / ... if valuey <= send_bal{ [INFO] [stdout] 308 | | ... if !used_addresses.contains(&sendery){ [INFO] [stdout] 309 | | ... keys_to_remove.push(key.clone()); [INFO] [stdout] 310 | | ... used_addresses.push(sendery); [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 valuey <= send_bal [INFO] [stdout] 308 ~ && !used_addresses.contains(&sendery){ [INFO] [stdout] 309 | keys_to_remove.push(key.clone()); [INFO] [stdout] ... [INFO] [stdout] 314 | } [INFO] [stdout] 315 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner/mod.rs:309:57 [INFO] [stdout] | [INFO] [stdout] 309 | ... keys_to_remove.push(key.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/miner/mod.rs:311:37 [INFO] [stdout] | [INFO] [stdout] 311 | ... cont = cont+1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `cont += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `keys_to_remove` [INFO] [stdout] --> src/miner/mod.rs:324:22 [INFO] [stdout] | [INFO] [stdout] 324 | for i in 0..keys_to_remove.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 324 - for i in 0..keys_to_remove.len(){ [INFO] [stdout] 324 + for in &keys_to_remove{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/miner/mod.rs:331:64 [INFO] [stdout] | [INFO] [stdout] 331 | let interval = time::Duration::from_micros(i as u64); [INFO] [stdout] | ^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/network/server.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | return Ok(()); [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] 61 - return Ok(()); [INFO] [stdout] 61 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/network/server.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | return Ok(()); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 108 - return Ok(()); [INFO] [stdout] 108 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/server.rs:118:60 [INFO] [stdout] | [INFO] [stdout] 118 | let stream = Async::::connect(addr.clone()).await?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*addr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/network/server.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | / loop { [INFO] [stdout] 156 | | // first, read exactly 4 bytes to get the frame header [INFO] [stdout] 157 | | let msg_size = match reader.read_exact(&mut size_buffer).await { [INFO] [stdout] 158 | | Ok(_) => u32::from_be_bytes(size_buffer), [INFO] [stdout] ... | [INFO] [stdout] 182 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 155 ~ while let Ok(_) = reader.read_exact(&mut size_buffer).await { [INFO] [stdout] 156 + let msg_size = u32::from_be_bytes(size_buffer); [INFO] [stdout] 157 + .. [INFO] [stdout] 158 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 84 - for i in 0..nonce.len(){ [INFO] [stdout] 84 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:86:48 [INFO] [stdout] | [INFO] [stdout] 86 | ... not_contained.push(nonce[i].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nonce[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:100:30 [INFO] [stdout] | [INFO] [stdout] 100 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 100 - for i in 0..nonce.len(){ [INFO] [stdout] 100 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `child` is only used to index `reunited_orphans` [INFO] [stdout] --> src/network/worker.rs:135:38 [INFO] [stdout] | [INFO] [stdout] 135 | for child in 0..reunited_orphans.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 135 - for child in 0..reunited_orphans.len(){ [INFO] [stdout] 135 + for in &reunited_orphans{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:140:34 [INFO] [stdout] | [INFO] [stdout] 140 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 140 - for i in 0..nonce.len(){ [INFO] [stdout] 140 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:168:57 [INFO] [stdout] | [INFO] [stdout] 168 | ... validity_check = validity_check +1; // indicates it's invalid [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:171:57 [INFO] [stdout] | [INFO] [stdout] 171 | ... validity_check = validity_check +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:174:57 [INFO] [stdout] | [INFO] [stdout] 174 | ... validity_check = validity_check +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/network/worker.rs:177:53 [INFO] [stdout] | [INFO] [stdout] 177 | ... validity_check = validity_check +1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `validity_check += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:186:65 [INFO] [stdout] | [INFO] [stdout] 186 | ... new_blocks.push(hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:190:84 [INFO] [stdout] | [INFO] [stdout] 190 | ... if orphan_parents[orph] == hash.clone(){ [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:205:66 [INFO] [stdout] | [INFO] [stdout] 205 | ... orphan_buffer.insert(hash.clone(), nonce[i].clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:206:65 [INFO] [stdout] | [INFO] [stdout] 206 | ... orphan_parents.push(parenty.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parenty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:213:65 [INFO] [stdout] | [INFO] [stdout] 213 | ... missing_parent.push(parenty.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `parenty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/network/worker.rs:212:45 [INFO] [stdout] | [INFO] [stdout] 212 | / ... let mut missing_parent: Vec = Vec::new(); [INFO] [stdout] 213 | | ... missing_parent.push(parenty.clone()); [INFO] [stdout] | |___________________________________________________________^ help: consider using the `vec![]` macro: `let missing_parent: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:237:30 [INFO] [stdout] | [INFO] [stdout] 237 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 237 - for i in 0..nonce.len(){ [INFO] [stdout] 237 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:239:48 [INFO] [stdout] | [INFO] [stdout] 239 | ... not_contained.push(nonce[i].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nonce[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:249:30 [INFO] [stdout] | [INFO] [stdout] 249 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 249 - for i in 0..nonce.len(){ [INFO] [stdout] 249 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `nonce` [INFO] [stdout] --> src/network/worker.rs:271:30 [INFO] [stdout] | [INFO] [stdout] 271 | for i in 0..nonce.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 271 - for i in 0..nonce.len(){ [INFO] [stdout] 271 + for in &nonce{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:275:38 [INFO] [stdout] | [INFO] [stdout] 275 | let sender = transaction.get_sender().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `transaction.get_sender()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:277:44 [INFO] [stdout] | [INFO] [stdout] 277 | let sender_clone = sender.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `sender` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:393:17 [INFO] [stdout] | [INFO] [stdout] 393 | let h = v.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*v.last().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:394:78 [INFO] [stdout] | [INFO] [stdout] 394 | let mut peer_receiver = test_msg_sender.send(Message::GetBlocks(vec![h.clone()])); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/txgen/worker.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | / let mut tx_vec: Vec = Vec::new(); [INFO] [stdout] 55 | | tx_vec.push(new_tx.hash()); [INFO] [stdout] | |_______________________________________^ help: consider using the `vec![]` macro: `let tx_vec: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&Ed25519KeyPair>` which implements the `Copy` trait [INFO] [stdout] --> src/txgen/mod.rs:205:32 [INFO] [stdout] | [INFO] [stdout] 205 | let key_pair = self.controlled_nodes.get(key_pair_index).clone().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.controlled_nodes.get(key_pair_index)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/txgen/mod.rs:209:40 [INFO] [stdout] | [INFO] [stdout] 209 | let sender_address_1 = sender_address.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sender_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Address` which implements the `Copy` trait [INFO] [stdout] --> src/txgen/mod.rs:241:34 [INFO] [stdout] | [INFO] [stdout] 241 | let r_addy = self.all_adresses[rand_index].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.all_adresses[rand_index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/txgen/mod.rs:245:49 [INFO] [stdout] | [INFO] [stdout] 245 | let signat = sign(&transact,&key_pair); // might need to clone here!!! [INFO] [stdout] | ^^^^^^^^^ help: change this to: `key_pair` [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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/txgen/mod.rs:261:64 [INFO] [stdout] | [INFO] [stdout] 261 | ... let interval = time::Duration::from_micros(i as u64); // if code is not working try undoing this, made the sleep longer to ma... [INFO] [stdout] | ^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/api/mod.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Serialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_ApiResponse` [INFO] [stdout] 26 | struct ApiResponse { [INFO] [stdout] | ----------- `ApiResponse` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/address.rs:5:25 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Address` [INFO] [stdout] 6 | pub struct Address(pub [u8; 20]); [INFO] [stdout] | ------- `Address` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/address.rs:5:36 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Address` [INFO] [stdout] 6 | pub struct Address(pub [u8; 20]); [INFO] [stdout] | ------- `Address` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hashArray` should have a snake case name [INFO] [stdout] --> src/types/address.rs:62:17 [INFO] [stdout] | [INFO] [stdout] 62 | let mut hashArray: [u8; 20] = [0; 20]; [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_array` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Block` [INFO] [stdout] ... [INFO] [stdout] 12 | pub struct Block { [INFO] [stdout] | ----- `Block` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Block` [INFO] [stdout] ... [INFO] [stdout] 12 | pub struct Block { [INFO] [stdout] | ----- `Block` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Header` [INFO] [stdout] 18 | pub struct Header{ [INFO] [stdout] | ------ `Header` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:17:35 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Header` [INFO] [stdout] 18 | pub struct Header{ [INFO] [stdout] | ------ `Header` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:28:24 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Content` [INFO] [stdout] 29 | pub struct Content(pub Vec); [INFO] [stdout] | ------- `Content` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:28:35 [INFO] [stdout] | [INFO] [stdout] 28 | #[derive(Debug, Clone, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Content` [INFO] [stdout] 29 | pub struct Content(pub Vec); [INFO] [stdout] | ------- `Content` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/hash.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_H256` [INFO] [stdout] 14 | pub struct H256([u8; 32]); // big endian u256 [INFO] [stdout] | ---- `H256` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/hash.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | #[derive(Eq, PartialEq, Serialize, Deserialize, Clone, Hash, Default, Copy)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_H256` [INFO] [stdout] 14 | pub struct H256([u8; 32]); // big endian u256 [INFO] [stdout] | ---- `H256` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hash_H256` should have a snake case name [INFO] [stdout] --> src/types/merkle.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | let hash_H256 = H256::from(both_hash); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_h256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hash_H256` should have a snake case name [INFO] [stdout] --> src/types/merkle.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | let hash_H256 = H256::from(both_hash); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_h256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `hash_H256` should have a snake case name [INFO] [stdout] --> src/types/merkle.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | let hash_H256 = H256::from(both_hash); [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `hash_h256` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:10:10 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Transaction` [INFO] [stdout] 11 | pub struct Transaction { [INFO] [stdout] | ----------- `Transaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Transaction` [INFO] [stdout] 11 | pub struct Transaction { [INFO] [stdout] | ----------- `Transaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_SignedTransaction` [INFO] [stdout] 20 | pub struct SignedTransaction { [INFO] [stdout] | ----------------- `SignedTransaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:19:21 [INFO] [stdout] | [INFO] [stdout] 19 | #[derive(Serialize, Deserialize, Debug, Default, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_SignedTransaction` [INFO] [stdout] 20 | pub struct SignedTransaction { [INFO] [stdout] | ----------------- `SignedTransaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/network/message.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Message` [INFO] [stdout] 6 | pub enum Message { [INFO] [stdout] | ------- `Message` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/network/message.rs:5:21 [INFO] [stdout] | [INFO] [stdout] 5 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Message` [INFO] [stdout] 6 | pub enum Message { [INFO] [stdout] | ------- `Message` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.97s [INFO] running `Command { std: "docker" "inspect" "73598a7a7d7cb9b5292039a1fcff94bf31d912234548b8e29eb803dc526d0e3e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "73598a7a7d7cb9b5292039a1fcff94bf31d912234548b8e29eb803dc526d0e3e", kill_on_drop: false }` [INFO] [stdout] 73598a7a7d7cb9b5292039a1fcff94bf31d912234548b8e29eb803dc526d0e3e