[INFO] cloning repository https://github.com/RohanGuo/ECE-FiveNinetyEight [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/RohanGuo/ECE-FiveNinetyEight" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRohanGuo%2FECE-FiveNinetyEight", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRohanGuo%2FECE-FiveNinetyEight'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8976d0b43377d56971f137502f6531827076d465 [INFO] linting RohanGuo/ECE-FiveNinetyEight against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRohanGuo%2FECE-FiveNinetyEight" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] [stderr] Updating files: 60% (1897/3126) Updating files: 61% (1907/3126) Updating files: 62% (1939/3126) Updating files: 63% (1970/3126) Updating files: 64% (2001/3126) Updating files: 65% (2032/3126) Updating files: 66% (2064/3126) Updating files: 67% (2095/3126) Updating files: 68% (2126/3126) Updating files: 68% (2145/3126) Updating files: 69% (2157/3126) Updating files: 70% (2189/3126) Updating files: 71% (2220/3126) Updating files: 72% (2251/3126) Updating files: 72% (2272/3126) Updating files: 72% (2276/3126) Updating files: 73% (2282/3126) Updating files: 74% (2314/3126) Updating files: 75% (2345/3126) Updating files: 76% (2376/3126) Updating files: 77% (2408/3126) Updating files: 78% (2439/3126) Updating files: 79% (2470/3126) Updating files: 80% (2501/3126) Updating files: 81% (2533/3126) Updating files: 82% (2564/3126) Updating files: 83% (2595/3126) Updating files: 84% (2626/3126) Updating files: 85% (2658/3126) Updating files: 86% (2689/3126) Updating files: 87% (2720/3126) Updating files: 88% (2751/3126) Updating files: 89% (2783/3126) Updating files: 90% (2814/3126) Updating files: 91% (2845/3126) Updating files: 92% (2876/3126) Updating files: 93% (2908/3126) Updating files: 94% (2939/3126) Updating files: 95% (2970/3126) Updating files: 96% (3001/3126) Updating files: 97% (3033/3126) Updating files: 98% (3064/3126) Updating files: 99% (3095/3126) Updating files: 99% (3123/3126) Updating files: 100% (3126/3126) Updating files: 100% (3126/3126), done. [INFO] started tweaking git repo https://github.com/RohanGuo/ECE-FiveNinetyEight [INFO] finished tweaking git repo https://github.com/RohanGuo/ECE-FiveNinetyEight [INFO] tweaked toml for git repo https://github.com/RohanGuo/ECE-FiveNinetyEight written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/RohanGuo/ECE-FiveNinetyEight 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/RohanGuo/ECE-FiveNinetyEight 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] Downloading crates ... [INFO] [stderr] Downloaded smol v1.2.5 [INFO] [stderr] Downloaded ntest_proc_macro_helper v0.7.3 [INFO] [stderr] Downloaded smallvec v0.6.10 [INFO] [stderr] Downloaded url v2.1.0 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.51 [INFO] [stderr] Downloaded sourcefile v0.1.4 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.51 [INFO] [stderr] Downloaded bincode v1.2.0 [INFO] [stderr] Downloaded futures-task v0.3.18 [INFO] [stderr] Downloaded term_size v0.3.1 [INFO] [stderr] Downloaded cc v1.0.45 [INFO] [stderr] Downloaded untrusted v0.7.0 [INFO] [stderr] Downloaded futures-util v0.3.18 [INFO] [stderr] Downloaded syn v1.0.82 [INFO] [stderr] Downloaded ntest v0.7.3 [INFO] [stderr] Downloaded futures-macro v0.3.18 [INFO] [stderr] Downloaded js-sys v0.3.28 [INFO] [stderr] Downloaded wasm-bindgen-webidl v0.2.51 [INFO] [stderr] Downloaded weedle v0.10.0 [INFO] [stderr] Downloaded futures v0.3.18 [INFO] [stderr] Downloaded ntest_test_cases v0.7.3 [INFO] [stderr] Downloaded unicode-segmentation v1.3.0 [INFO] [stderr] Downloaded async-fs v1.5.0 [INFO] [stderr] Downloaded web-sys v0.3.28 [INFO] [stderr] Downloaded async-process v1.3.0 [INFO] [stderr] Downloaded backtrace-sys v0.1.31 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.51 [INFO] [stderr] Downloaded tiny_http v0.9.0 [INFO] [stderr] Downloaded blocking v1.1.0 [INFO] [stderr] Downloaded bitflags v1.2.0 [INFO] [stderr] Downloaded unicode-width v0.1.6 [INFO] [stderr] Downloaded libc v0.2.108 [INFO] [stderr] Downloaded autocfg v0.1.6 [INFO] [stderr] Downloaded hex v0.4.0 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.51 [INFO] [stderr] Downloaded bumpalo v2.6.0 [INFO] [stderr] Downloaded ascii v1.0.0 [INFO] [stderr] Downloaded futures-executor v0.3.18 [INFO] [stderr] Downloaded futures-channel v0.3.18 [INFO] [stderr] Downloaded futures-sink v0.3.18 [INFO] [stderr] Downloaded ntest_timeout v0.7.3 [INFO] [stderr] Downloaded wasm-bindgen v0.2.51 [INFO] [stderr] Downloaded backtrace v0.3.38 [INFO] [stderr] Downloaded async-net v1.6.1 [INFO] [stderr] Downloaded stderrlog v0.5.1 [INFO] [stderr] Downloaded ring v0.16.9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] b3b5957c2df4d875ab334e73a83762c3850ce4c72ef72b48589ff674d6431969 [INFO] running `Command { std: "docker" "start" "-a" "b3b5957c2df4d875ab334e73a83762c3850ce4c72ef72b48589ff674d6431969", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b3b5957c2df4d875ab334e73a83762c3850ce4c72ef72b48589ff674d6431969", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b3b5957c2df4d875ab334e73a83762c3850ce4c72ef72b48589ff674d6431969", kill_on_drop: false }` [INFO] [stdout] b3b5957c2df4d875ab334e73a83762c3850ce4c72ef72b48589ff674d6431969 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 49a1e77048b434e01cfc8b638ab3a0439e660d3eee371d4baab2aaef86fb1497 [INFO] running `Command { std: "docker" "start" "-a" "49a1e77048b434e01cfc8b638ab3a0439e660d3eee371d4baab2aaef86fb1497", 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 memchr v2.4.1 [INFO] [stderr] Checking futures-io v0.3.18 [INFO] [stderr] Compiling autocfg v0.1.6 [INFO] [stderr] Checking pin-project-lite v0.2.7 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Checking event-listener v2.5.1 [INFO] [stderr] Compiling serde v1.0.101 [INFO] [stderr] Checking fastrand v1.5.0 [INFO] [stderr] Compiling crossbeam-utils v0.8.5 [INFO] [stderr] Checking once_cell v1.8.0 [INFO] [stderr] Compiling futures-channel v0.3.18 [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] Checking atomic-waker v1.0.0 [INFO] [stderr] Checking futures-sink v0.3.18 [INFO] [stderr] Checking smallvec v0.6.10 [INFO] [stderr] Compiling futures-util v0.3.18 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling signal-hook v0.3.10 [INFO] [stderr] Compiling cc v1.0.45 [INFO] [stderr] Compiling ryu v1.0.2 [INFO] [stderr] Checking unicode-normalization v0.1.8 [INFO] [stderr] Compiling crossbeam-queue v0.3.2 [INFO] [stderr] Compiling byteorder v1.3.2 [INFO] [stderr] Compiling num-traits v0.2.8 [INFO] [stderr] Compiling num-integer v0.1.41 [INFO] [stderr] Checking async-channel v1.6.1 [INFO] [stderr] Compiling bitflags v1.2.0 [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] Compiling quote v1.0.2 [INFO] [stderr] Checking crossbeam-deque v0.8.1 [INFO] [stderr] Checking crossbeam-channel v0.5.1 [INFO] [stderr] Checking simple-mutex v1.1.5 [INFO] [stderr] Checking futures-lite v1.12.0 [INFO] [stderr] Checking ascii v1.0.0 [INFO] [stderr] Compiling ntest_proc_macro_helper v0.7.3 [INFO] [stderr] Checking untrusted v0.7.0 [INFO] [stderr] Checking itoa v0.4.4 [INFO] [stderr] Checking termcolor v1.1.2 [INFO] [stderr] Checking vec_map v0.8.1 [INFO] [stderr] Checking chunked_transfer v1.4.0 [INFO] [stderr] Checking async-dup v1.2.2 [INFO] [stderr] Compiling hex-literal v0.3.4 [INFO] [stderr] Checking hex v0.4.0 [INFO] [stderr] Checking crossbeam v0.8.1 [INFO] [stderr] Checking polling v2.2.0 [INFO] [stderr] Checking socket2 v0.4.2 [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 term_size v0.3.1 [INFO] [stderr] Checking atty v0.2.13 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Compiling ring v0.16.9 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking async-io v1.6.0 [INFO] [stderr] Checking blocking v1.1.0 [INFO] [stderr] Checking async-executor v1.4.1 [INFO] [stderr] Checking async-fs v1.5.0 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking idna v0.2.0 [INFO] [stderr] Checking async-net v1.6.1 [INFO] [stderr] Checking async-process v1.3.0 [INFO] [stderr] Checking stderrlog v0.5.1 [INFO] [stderr] Checking smol v1.2.5 [INFO] [stderr] Checking url v2.1.0 [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:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | #[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:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | #[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:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | #[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:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | #[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:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | #[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/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:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[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:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | #[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: unused import: `rand::Rng` [INFO] [stdout] --> src/blockchain/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/blockchain/mod.rs:31:34 [INFO] [stdout] | [INFO] [stdout] 31 | ... let header = Header{ parent: parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [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: redundant field names in struct initialization [INFO] [stdout] --> src/blockchain/mod.rs:31:50 [INFO] [stdout] | [INFO] [stdout] 31 | ... let header = Header{ parent: parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `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/blockchain/mod.rs:31:64 [INFO] [stdout] | [INFO] [stdout] 31 | ... let header = Header{ parent: parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `difficulty` [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/blockchain/mod.rs:31:88 [INFO] [stdout] | [INFO] [stdout] 31 | ...once: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `timestamp` [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/blockchain/mod.rs:31:110 [INFO] [stdout] | [INFO] [stdout] 31 | ...difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `merkle_root` [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/blockchain/mod.rs:33:34 [INFO] [stdout] | [INFO] [stdout] 33 | let genesis = Block{ header: header, content: content}; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/blockchain/mod.rs:33:50 [INFO] [stdout] | [INFO] [stdout] 33 | let genesis = Block{ header: header, content: content}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `content` [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/blockchain/mod.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | Blockchain {block_map: block_map, block_seq: block_seq, tip: genesis_hash, state: state.clone(),} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `block_map` [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/blockchain/mod.rs:42:47 [INFO] [stdout] | [INFO] [stdout] 42 | Blockchain {block_map: block_map, block_seq: block_seq, tip: genesis_hash, state: state.clone(),} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `block_seq` [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: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/block.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | #[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: unused import: `std::time::SystemTime` [INFO] [stdout] --> src/types/block.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::time::SystemTime; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `futures::TryFutureExt` [INFO] [stdout] --> src/types/block.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use futures::TryFutureExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/types/block.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `merkle::MerkleTree` [INFO] [stdout] --> src/types/block.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | use super::{merkle::MerkleTree, transaction::SignedTransaction}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [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: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/types/merkle.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if i * 2 + 1 <= node_size { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `i * 2 < node_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/merkle.rs:85:60 [INFO] [stdout] | [INFO] [stdout] 85 | MerkleTree { root: node_vec, leaf_size: input_len, start_index: start_index} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_index` [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: unused import: `crate::types::key_pair` [INFO] [stdout] --> src/types/transaction.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::types::key_pair; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdDSAParameters` and `VerificationAlgorithm` [INFO] [stdout] --> src/types/transaction.rs:3:59 [INFO] [stdout] | [INFO] [stdout] 3 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `prelude::SliceRandom` and `thread_rng` [INFO] [stdout] --> src/types/transaction.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::{Rng, prelude::SliceRandom, thread_rng}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/types/transaction.rs:7:32 [INFO] [stdout] | [INFO] [stdout] 7 | use super::{address::{Address, self}, hash::{Hashable, H256}}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet` and `ops::Add` [INFO] [stdout] --> src/types/transaction.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use std::{collections::{HashMap, HashSet}, ops::Add}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | transaction: transaction, [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:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | trans_map: trans_map, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `trans_map` [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:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | accounts: accounts, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `accounts` [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:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | history: history, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `history` [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: 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: `self` [INFO] [stdout] --> src/miner/worker.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::types::block::{Block, self}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::address` [INFO] [stdout] --> src/miner/mod.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::types::address; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/miner/mod.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | parent:parent, [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/miner/mod.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | nonce:nonce, [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `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/miner/mod.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | difficulty:difficulty, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `difficulty` [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/miner/mod.rs:190:17 [INFO] [stdout] | [INFO] [stdout] 190 | timestamp:timestamp, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `timestamp` [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/miner/mod.rs:191:17 [INFO] [stdout] | [INFO] [stdout] 191 | merkle_root:merkle_root, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `merkle_root` [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/miner/mod.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | header: header, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/miner/mod.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | content: content, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `content` [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: 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:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | #[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:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | #[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:242:16 [INFO] [stdout] | [INFO] [stdout] 242 | #[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:246:16 [INFO] [stdout] | [INFO] [stdout] 246 | #[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: `crate::types::block::Block` [INFO] [stdout] --> src/tx_generator/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::types::block::Block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::blockchain::Blockchain` [INFO] [stdout] --> src/tx_generator/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::blockchain::Blockchain; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `SystemTime` and `UNIX_EPOCH` [INFO] [stdout] --> src/tx_generator/mod.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | use std::time::{SystemTime, UNIX_EPOCH}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::merkle::MerkleTree` [INFO] [stdout] --> src/tx_generator/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::types::merkle::MerkleTree; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::*` [INFO] [stdout] --> src/tx_generator/mod.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::types::block::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ring::signature::KeyPair` [INFO] [stdout] --> src/tx_generator/mod.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use ring::signature::KeyPair; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `ops::Add` [INFO] [stdout] --> src/tx_generator/mod.rs:22:25 [INFO] [stdout] | [INFO] [stdout] 22 | use std::{collections::{HashMap, HashSet}, ops::Add}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/tx_generator/mod.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::hash::Hashable` [INFO] [stdout] --> src/tx_generator/mod.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use crate::types::hash::Hashable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tx_generator/mod.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | key: key, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `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: variable does not need to be mutable [INFO] [stdout] --> src/blockchain/mod.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let mut rng = rand::thread_rng(); [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: unused variable: `rng` [INFO] [stdout] --> src/blockchain/mod.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_rng` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling proc-macro-crate v0.1.5 [INFO] [stdout] warning: unused variable: `tx` [INFO] [stdout] --> src/types/transaction.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_tx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `public_key` [INFO] [stdout] --> src/types/transaction.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_public_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `signature` [INFO] [stdout] --> src/types/transaction.rs:51:52 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_signature` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/types/transaction.rs:51:70 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/transaction.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut trans_map: HashMap = HashMap::new(); [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/types/transaction.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | let mut history: HashMap> = HashMap::new(); [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/types/transaction.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | let mut isValid = true; [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/types/transaction.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | let mut old_receiver_account = accounts.get(&receiver); [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/types/transaction.rs:133:21 [INFO] [stdout] | [INFO] [stdout] 133 | let mut receiver_account = match old_receiver_account { [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/types/transaction.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | let mut old_sender_account = accounts.get(&sender); [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/types/transaction.rs:140:21 [INFO] [stdout] | [INFO] [stdout] 140 | let mut sender_account = match old_sender_account { [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `check1` [INFO] [stdout] --> src/types/transaction.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | let check1 = false; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_check1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | let mut parent = locked_parent.tip(); [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:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | let mut transaction_memopool = self.trans_memopool.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trans_hash` [INFO] [stdout] --> src/miner/mod.rs:173:18 [INFO] [stdout] | [INFO] [stdout] 173 | for (trans_hash, trans) in &transaction_memopool.trans_map { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_trans_hash` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/network/worker.rs:235:17 [INFO] [stdout] | [INFO] [stdout] 235 | _ => 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:235: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] 86 | Message::NewBlockHashes(nonce) =>{ [INFO] [stdout] | ------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 101 | Message::GetBlocks(nonce) => { [INFO] [stdout] | ------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 235 | _ => 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:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let mut blocks = nonce.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:189:25 [INFO] [stdout] | [INFO] [stdout] 189 | let mut trans_memopool = self.trans_memopool.lock().unwrap(); [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:203:25 [INFO] [stdout] | [INFO] [stdout] 203 | let mut trans_memopool = self.trans_memopool.lock().unwrap(); [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:218:25 [INFO] [stdout] | [INFO] [stdout] 218 | let mut state = self.state.lock().unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orph_block` [INFO] [stdout] --> src/network/worker.rs:176:39 [INFO] [stdout] | [INFO] [stdout] 176 | for (orph_p_hash, orph_block) in orph_buff.clone() { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orph_block` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/api/mod.rs:61:39 [INFO] [stdout] | [INFO] [stdout] 61 | 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: unneeded `return` statement [INFO] [stdout] --> src/blockchain/mod.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | return chain; [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] 71 - return chain; [INFO] [stdout] 71 + chain [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/mod.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | return chain; [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] 83 - return chain; [INFO] [stdout] 83 + chain [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/mod.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | return accounts; [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] 101 - return accounts; [INFO] [stdout] 101 + accounts [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/address.rs:53:24 [INFO] [stdout] | [INFO] [stdout] 53 | context.update(&bytes); [INFO] [stdout] | ^^^^^^ help: change this to: `bytes` [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/types/address.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / for i in 12..32 { [INFO] [stdout] 58 | | v[i - 12] = result[i]; [INFO] [stdout] 59 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `v.copy_from_slice(&result[12..32]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/block.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | return ring::digest::digest(&ring::digest::SHA256, &data).into(); [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] 22 - return ring::digest::digest(&ring::digest::SHA256, &data).into(); [INFO] [stdout] 22 + ring::digest::digest(&ring::digest::SHA256, &data).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/block.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | return txs; [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] 59 - return txs; [INFO] [stdout] 59 + txs [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | node_size = node_size * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `node_size *= 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] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:75:35 [INFO] [stdout] | [INFO] [stdout] 75 | let parent = [&left_hash[..], &right_hash[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use the original value instead: `left_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:75:51 [INFO] [stdout] | [INFO] [stdout] 75 | let parent = [&left_hash[..], &right_hash[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use the original value instead: `right_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/merkle.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | return [0u8; 32].into(); [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] 90 - return [0u8; 32].into(); [INFO] [stdout] 90 + [0u8; 32].into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/merkle.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | return self.root[1].val; [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] 93 - return self.root[1].val; [INFO] [stdout] 93 + self.root[1].val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:63 [INFO] [stdout] | [INFO] [stdout] 101 | ... println!("{}, {:?}, {}, {}, {}, {}", i, self.root[i as usize].val, self.root[i as usize].left, self.root[i as usize].right, s... [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] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:90 [INFO] [stdout] | [INFO] [stdout] 101 | ... println!("{}, {:?}, {}, {}, {}, {}", i, self.root[i as usize].val, self.root[i as usize].left, self.root[i as usize].right, s... [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:118 [INFO] [stdout] | [INFO] [stdout] 101 | ... usize].val, self.root[i as usize].left, self.root[i as usize].right, self.root[i as usize].is_empty, self.root[i as usize].pare... [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:147 [INFO] [stdout] | [INFO] [stdout] 101 | ...size].left, self.root[i as usize].right, self.root[i as usize].is_empty, self.root[i as usize].parent); [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:179 [INFO] [stdout] | [INFO] [stdout] 101 | ...].right, self.root[i as usize].is_empty, self.root[i as usize].parent); [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/types/merkle.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | return res_vec; //the proof not include the root_node [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] 124 - return res_vec; //the proof not include the root_node [INFO] [stdout] 124 + res_vec//the proof not include the root_node [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/merkle.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | return data == *root; [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] 157 - return data == *root; [INFO] [stdout] 157 + data == *root [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `proof` [INFO] [stdout] --> src/types/merkle.rs:137:14 [INFO] [stdout] | [INFO] [stdout] 137 | for i in 0..proof.len() { //concat from the first hash (bottom) to the last hash [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] 137 - for i in 0..proof.len() { //concat from the first hash (bottom) to the last hash [INFO] [stdout] 137 + for in &proof { //concat from the first hash (bottom) to the last hash [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:143:34 [INFO] [stdout] | [INFO] [stdout] 143 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^ help: use the original value instead: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:143:45 [INFO] [stdout] | [INFO] [stdout] 143 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:151:34 [INFO] [stdout] | [INFO] [stdout] 151 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^ help: use the original value instead: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:151:45 [INFO] [stdout] | [INFO] [stdout] 151 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | idx = idx/2; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `idx /= 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/transaction.rs:36:40 [INFO] [stdout] | [INFO] [stdout] 36 | let signature = sign(&transaction, &key); [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/transaction.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | return true [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] 64 - return true [INFO] [stdout] 64 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TransactionMemopool` [INFO] [stdout] --> src/types/transaction.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / pub fn new() -> Self { [INFO] [stdout] 74 | | let mut trans_map: HashMap = HashMap::new(); [INFO] [stdout] 75 | | TransactionMemopool { [INFO] [stdout] 76 | | trans_map: trans_map, [INFO] [stdout] 77 | | } [INFO] [stdout] 78 | | } [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] 72 + impl Default for TransactionMemopool { [INFO] [stdout] 73 + fn default() -> Self { [INFO] [stdout] 74 + Self::new() [INFO] [stdout] 75 + } [INFO] [stdout] 76 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/transaction.rs:97:61 [INFO] [stdout] | [INFO] [stdout] 97 | let addr: Address = Address::from_public_key_bytes(&address_pub_key); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `address_pub_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/transaction.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | return isValid; [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] 167 - return isValid; [INFO] [stdout] 167 + isValid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/types/transaction.rs:126:17 [INFO] [stdout] | [INFO] [stdout] 126 | / if !accounts.contains_key(&receiver) { [INFO] [stdout] 127 | | accounts.insert(receiver, (nonce, value)); [INFO] [stdout] 128 | | // println!("account {:?} value {:?} nonce {:?}", receiver, value, nonce); [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________________^ help: try: `accounts.entry(receiver).or_insert((nonce, value));` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/transaction.rs:154:17 [INFO] [stdout] | [INFO] [stdout] 154 | sender_account.0 = sender_account.0 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sender_account.0 += 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 `(u32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/types/transaction.rs:159:41 [INFO] [stdout] | [INFO] [stdout] 159 | accounts.insert(sender, sender_account.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sender_account` [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 `(u32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/types/transaction.rs:160:43 [INFO] [stdout] | [INFO] [stdout] 160 | accounts.insert(receiver, receiver_account.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `receiver_account` [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: unneeded `return` statement [INFO] [stdout] --> src/types/transaction.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | return Transaction{nonce, sender, receiver, value}; [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] 192 - return Transaction{nonce, sender, receiver, value}; [INFO] [stdout] 192 + Transaction{nonce, sender, receiver, value} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/miner/worker.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | / let mut vec = Vec::new(); //change [INFO] [stdout] 49 | | vec.push(_block.hash()); // push hash vec [INFO] [stdout] | |____________________________________^ help: consider using the `vec![]` macro: `let 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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/miner/mod.rs:218:64 [INFO] [stdout] | [INFO] [stdout] 218 | 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] [stderr] Compiling ntest_timeout v0.7.3 [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] 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: this boolean expression can be simplified [INFO] [stdout] --> src/network/worker.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | if !blockchain.block_map.get(&hash).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `blockchain.block_map.get(&hash).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/network/worker.rs:206:28 [INFO] [stdout] | [INFO] [stdout] 206 | if !trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `trans_memopool.trans_map.get(&trans_hash).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:87:24 [INFO] [stdout] | [INFO] [stdout] 87 | if nonce.len() != 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!nonce.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:91:53 [INFO] [stdout] | [INFO] [stdout] 91 | ... if blockchain.block_map.get(&hash).is_none(){ [INFO] [stdout] | ---------------------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!blockchain.block_map.contains_key(&hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:95:28 [INFO] [stdout] | [INFO] [stdout] 95 | if vec_hash.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_hash.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `blocks` [INFO] [stdout] --> src/network/worker.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | for i in 0..blocks.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] 105 - for i in 0..blocks.len() { [INFO] [stdout] 105 + for in &blocks { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:107:50 [INFO] [stdout] | [INFO] [stdout] 107 | if !blockchain.block_map.get(&hash).is_none() { [INFO] [stdout] | ---------------------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!blockchain.block_map.contains_key(&hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:111:24 [INFO] [stdout] | [INFO] [stdout] 111 | if vec.len() != 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/network/worker.rs:137:29 [INFO] [stdout] | [INFO] [stdout] 137 | / ... if !orph_buff.contains_key(&p_hash) { [INFO] [stdout] 138 | | ... orph_buff.insert(p_hash, block); [INFO] [stdout] 139 | | ... } [INFO] [stdout] | |_______________________^ help: try: `orph_buff.entry(p_hash).or_insert(block);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:179:24 [INFO] [stdout] | [INFO] [stdout] 179 | if buffered_block_hashs.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!buffered_block_hashs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:182:24 [INFO] [stdout] | [INFO] [stdout] 182 | if new_blocks.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_blocks.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&trans_hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:192:53 [INFO] [stdout] | [INFO] [stdout] 192 | if trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!trans_memopool.trans_map.contains_key(&trans_hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:193:43 [INFO] [stdout] | [INFO] [stdout] 193 | ... vec_hash.push(trans_hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `trans_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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:196:24 [INFO] [stdout] | [INFO] [stdout] 196 | if vec_hash.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_hash.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&trans_hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:206:54 [INFO] [stdout] | [INFO] [stdout] 206 | if !trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!trans_memopool.trans_map.contains_key(&trans_hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | if vec_trans.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_trans.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&trans_hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:224:57 [INFO] [stdout] | [INFO] [stdout] 224 | ... if trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!trans_memopool.trans_map.contains_key(&trans_hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:231:24 [INFO] [stdout] | [INFO] [stdout] 231 | if vec_hash.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_hash.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tx_generator/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod tx_generator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/tx_generator/mod.rs:167:16 [INFO] [stdout] | [INFO] [stdout] 167 | if sent_created_account == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!sent_created_account` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/tx_generator/mod.rs:176:41 [INFO] [stdout] | [INFO] [stdout] 176 | for (account, _) in &state.accounts { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 176 - for (account, _) in &state.accounts { [INFO] [stdout] 176 + for account in state.accounts.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/tx_generator/mod.rs:221:64 [INFO] [stdout] | [INFO] [stdout] 221 | 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: 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([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([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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | #[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_Header` [INFO] [stdout] 10 | 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:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | #[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_Header` [INFO] [stdout] 10 | 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:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | #[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_Content` [INFO] [stdout] 27 | pub struct Content{ [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:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | #[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_Content` [INFO] [stdout] 27 | pub struct Content{ [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/block.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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] 32 | 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:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | #[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] 32 | 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/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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[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] 12 | 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:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | #[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] 12 | 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: variable `isValid` should have a snake case name [INFO] [stdout] --> src/types/transaction.rs:116:17 [INFO] [stdout] | [INFO] [stdout] 116 | let mut isValid = true; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `is_valid` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `signedTrans` should have a snake case name [INFO] [stdout] --> src/types/transaction.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | for signedTrans in &block.content.content { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `signed_trans` [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] [stdout] warning: variable `removeContent` should have a snake case name [INFO] [stdout] --> src/network/worker.rs:146:37 [INFO] [stdout] | [INFO] [stdout] 146 | ... let mut removeContent = false; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `remove_content` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `other_accounts_hashSet` should have a snake case name [INFO] [stdout] --> src/tx_generator/mod.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | let mut other_accounts_hashSet = HashSet::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `other_accounts_hash_set` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `signedTransaction` should have a snake case name [INFO] [stdout] --> src/tx_generator/mod.rs:170:21 [INFO] [stdout] | [INFO] [stdout] 170 | let signedTransaction = generate_random_signed_transaction(account, account, 1000, 0, &self.key); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `signed_transaction` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `signedTransaction` should have a snake case name [INFO] [stdout] --> src/tx_generator/mod.rs:204:25 [INFO] [stdout] | [INFO] [stdout] 204 | let signedTransaction = generate_random_signed_transaction(self.address, receiver, value, nonce, &self.key); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `signed_transaction` [INFO] [stdout] [INFO] [stdout] [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:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | #[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:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | #[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:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | #[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:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | #[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:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | #[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/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:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[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:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | #[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: unused import: `rand::Rng` [INFO] [stdout] --> src/blockchain/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/blockchain/mod.rs:31:34 [INFO] [stdout] | [INFO] [stdout] 31 | ... let header = Header{ parent: parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [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: redundant field names in struct initialization [INFO] [stdout] --> src/blockchain/mod.rs:31:50 [INFO] [stdout] | [INFO] [stdout] 31 | ... let header = Header{ parent: parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `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/blockchain/mod.rs:31:64 [INFO] [stdout] | [INFO] [stdout] 31 | ... let header = Header{ parent: parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `difficulty` [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/blockchain/mod.rs:31:88 [INFO] [stdout] | [INFO] [stdout] 31 | ...once: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `timestamp` [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/blockchain/mod.rs:31:110 [INFO] [stdout] | [INFO] [stdout] 31 | ...difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `merkle_root` [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/blockchain/mod.rs:33:34 [INFO] [stdout] | [INFO] [stdout] 33 | let genesis = Block{ header: header, content: content}; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/blockchain/mod.rs:33:50 [INFO] [stdout] | [INFO] [stdout] 33 | let genesis = Block{ header: header, content: content}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `content` [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/blockchain/mod.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | Blockchain {block_map: block_map, block_seq: block_seq, tip: genesis_hash, state: state.clone(),} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `block_map` [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/blockchain/mod.rs:42:47 [INFO] [stdout] | [INFO] [stdout] 42 | Blockchain {block_map: block_map, block_seq: block_seq, tip: genesis_hash, state: state.clone(),} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `block_seq` [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: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/types/block.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | #[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: unused import: `std::time::SystemTime` [INFO] [stdout] --> src/types/block.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::time::SystemTime; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `futures::TryFutureExt` [INFO] [stdout] --> src/types/block.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use futures::TryFutureExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/block.rs:77:43 [INFO] [stdout] | [INFO] [stdout] 77 | let header = Header{ parent: *parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `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/block.rs:77:57 [INFO] [stdout] | [INFO] [stdout] 77 | let header = Header{ parent: *parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `difficulty` [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/block.rs:77:81 [INFO] [stdout] | [INFO] [stdout] 77 | let header = Header{ parent: *parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `timestamp` [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/block.rs:77:103 [INFO] [stdout] | [INFO] [stdout] 77 | let header = Header{ parent: *parent, nonce: nonce, difficulty: difficulty, timestamp: timestamp, merkle_root: merkle_root }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `merkle_root` [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/block.rs:79:12 [INFO] [stdout] | [INFO] [stdout] 79 | Block{ header: header, content: content } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/block.rs:79:28 [INFO] [stdout] | [INFO] [stdout] 79 | Block{ header: header, content: content } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `content` [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: 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: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/types/merkle.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if i * 2 + 1 <= node_size { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `i * 2 < node_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/merkle.rs:85:60 [INFO] [stdout] | [INFO] [stdout] 85 | MerkleTree { root: node_vec, leaf_size: input_len, start_index: start_index} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_index` [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: unused import: `crate::types::key_pair` [INFO] [stdout] --> src/types/transaction.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::types::key_pair; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `EdDSAParameters` and `VerificationAlgorithm` [INFO] [stdout] --> src/types/transaction.rs:3:59 [INFO] [stdout] | [INFO] [stdout] 3 | use ring::signature::{Ed25519KeyPair, Signature, KeyPair, VerificationAlgorithm, EdDSAParameters}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `prelude::SliceRandom` and `thread_rng` [INFO] [stdout] --> src/types/transaction.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | use rand::{Rng, prelude::SliceRandom, thread_rng}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/types/transaction.rs:7:32 [INFO] [stdout] | [INFO] [stdout] 7 | use super::{address::{Address, self}, hash::{Hashable, H256}}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet` and `ops::Add` [INFO] [stdout] --> src/types/transaction.rs:8:34 [INFO] [stdout] | [INFO] [stdout] 8 | use std::{collections::{HashMap, HashSet}, ops::Add}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/types/transaction.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | transaction: transaction, [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:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | trans_map: trans_map, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `trans_map` [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:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | accounts: accounts, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `accounts` [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:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | history: history, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `history` [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: 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: `self` [INFO] [stdout] --> src/miner/worker.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::types::block::{Block, self}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::address` [INFO] [stdout] --> src/miner/mod.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::types::address; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/miner/mod.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | parent:parent, [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/miner/mod.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | nonce:nonce, [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `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/miner/mod.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | difficulty:difficulty, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `difficulty` [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/miner/mod.rs:190:17 [INFO] [stdout] | [INFO] [stdout] 190 | timestamp:timestamp, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `timestamp` [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/miner/mod.rs:191:17 [INFO] [stdout] | [INFO] [stdout] 191 | merkle_root:merkle_root, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `merkle_root` [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/miner/mod.rs:198:17 [INFO] [stdout] | [INFO] [stdout] 198 | header: header, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/miner/mod.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | content: content, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `content` [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: 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:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | #[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:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | #[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:242:16 [INFO] [stdout] | [INFO] [stdout] 242 | #[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:246:16 [INFO] [stdout] | [INFO] [stdout] 246 | #[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: `super::server::TestReceiver as ServerTestReceiver` [INFO] [stdout] --> src/network/worker.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use super::server::TestReceiver as ServerTestReceiver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::Block` [INFO] [stdout] --> src/tx_generator/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use crate::types::block::Block; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::blockchain::Blockchain` [INFO] [stdout] --> src/tx_generator/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | use crate::blockchain::Blockchain; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `SystemTime` and `UNIX_EPOCH` [INFO] [stdout] --> src/tx_generator/mod.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | use std::time::{SystemTime, UNIX_EPOCH}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::merkle::MerkleTree` [INFO] [stdout] --> src/tx_generator/mod.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::types::merkle::MerkleTree; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::block::*` [INFO] [stdout] --> src/tx_generator/mod.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::types::block::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ring::signature::KeyPair` [INFO] [stdout] --> src/tx_generator/mod.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use ring::signature::KeyPair; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `ops::Add` [INFO] [stdout] --> src/tx_generator/mod.rs:22:25 [INFO] [stdout] | [INFO] [stdout] 22 | use std::{collections::{HashMap, HashSet}, ops::Add}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/tx_generator/mod.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::hash::Hashable` [INFO] [stdout] --> src/tx_generator/mod.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | use crate::types::hash::Hashable; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/tx_generator/mod.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | key: key, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `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: variable does not need to be mutable [INFO] [stdout] --> src/blockchain/mod.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let mut rng = rand::thread_rng(); [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: unused variable: `rng` [INFO] [stdout] --> src/blockchain/mod.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let mut rng = rand::thread_rng(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_rng` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/block.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let mut buffer: [u8; 32] = [0; 32]; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tx` [INFO] [stdout] --> src/types/transaction.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_tx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `public_key` [INFO] [stdout] --> src/types/transaction.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_public_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `signature` [INFO] [stdout] --> src/types/transaction.rs:51:52 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_signature` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/types/transaction.rs:51:70 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn verify(tx: &Transaction, public_key: &[u8], signature: &[u8], state: &State) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/types/transaction.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let mut trans_map: HashMap = HashMap::new(); [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/types/transaction.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | let mut history: HashMap> = HashMap::new(); [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/types/transaction.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | let mut isValid = true; [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/types/transaction.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | let mut old_receiver_account = accounts.get(&receiver); [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/types/transaction.rs:133:21 [INFO] [stdout] | [INFO] [stdout] 133 | let mut receiver_account = match old_receiver_account { [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/types/transaction.rs:139:21 [INFO] [stdout] | [INFO] [stdout] 139 | let mut old_sender_account = accounts.get(&sender); [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/types/transaction.rs:140:21 [INFO] [stdout] | [INFO] [stdout] 140 | let mut sender_account = match old_sender_account { [INFO] [stdout] | ----^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `check1` [INFO] [stdout] --> src/types/transaction.rs:119:17 [INFO] [stdout] | [INFO] [stdout] 119 | let check1 = false; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_check1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/miner/mod.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | let mut parent = locked_parent.tip(); [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:171:17 [INFO] [stdout] | [INFO] [stdout] 171 | let mut transaction_memopool = self.trans_memopool.lock().unwrap(); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trans_hash` [INFO] [stdout] --> src/miner/mod.rs:173:18 [INFO] [stdout] | [INFO] [stdout] 173 | for (trans_hash, trans) in &transaction_memopool.trans_map { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_trans_hash` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/network/worker.rs:235:17 [INFO] [stdout] | [INFO] [stdout] 235 | _ => 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:235: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] 86 | Message::NewBlockHashes(nonce) =>{ [INFO] [stdout] | ------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 101 | Message::GetBlocks(nonce) => { [INFO] [stdout] | ------------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 235 | _ => 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:103:25 [INFO] [stdout] | [INFO] [stdout] 103 | let mut blocks = nonce.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:189:25 [INFO] [stdout] | [INFO] [stdout] 189 | let mut trans_memopool = self.trans_memopool.lock().unwrap(); [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:203:25 [INFO] [stdout] | [INFO] [stdout] 203 | let mut trans_memopool = self.trans_memopool.lock().unwrap(); [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:218:25 [INFO] [stdout] | [INFO] [stdout] 218 | let mut state = self.state.lock().unwrap(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `orph_block` [INFO] [stdout] --> src/network/worker.rs:176:39 [INFO] [stdout] | [INFO] [stdout] 176 | for (orph_p_hash, orph_block) in orph_buff.clone() { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_orph_block` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `TestMsgSender` is never constructed [INFO] [stdout] --> src/network/worker.rs:243:8 [INFO] [stdout] | [INFO] [stdout] 243 | struct TestMsgSender { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `send` are never used [INFO] [stdout] --> src/network/worker.rs:248:8 [INFO] [stdout] | [INFO] [stdout] 247 | impl TestMsgSender { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 248 | fn new() -> (TestMsgSender, smol::channel::Receiver<(Vec, peer::Handle)>) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 253 | fn send(&self, msg: Message) -> PeerTestReceiver { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/api/mod.rs:61:39 [INFO] [stdout] | [INFO] [stdout] 61 | 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: unneeded `return` statement [INFO] [stdout] --> src/blockchain/mod.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | return chain; [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] 71 - return chain; [INFO] [stdout] 71 + chain [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/mod.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | return chain; [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] 83 - return chain; [INFO] [stdout] 83 + chain [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain/mod.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | return accounts; [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] 101 - return accounts; [INFO] [stdout] 101 + accounts [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/address.rs:53:24 [INFO] [stdout] | [INFO] [stdout] 53 | context.update(&bytes); [INFO] [stdout] | ^^^^^^ help: change this to: `bytes` [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/types/address.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / for i in 12..32 { [INFO] [stdout] 58 | | v[i - 12] = result[i]; [INFO] [stdout] 59 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `v.copy_from_slice(&result[12..32]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/block.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | return ring::digest::digest(&ring::digest::SHA256, &data).into(); [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] 22 - return ring::digest::digest(&ring::digest::SHA256, &data).into(); [INFO] [stdout] 22 + ring::digest::digest(&ring::digest::SHA256, &data).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/block.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | return txs; [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] 59 - return txs; [INFO] [stdout] 59 + txs [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | node_size = node_size * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `node_size *= 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] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:75:35 [INFO] [stdout] | [INFO] [stdout] 75 | let parent = [&left_hash[..], &right_hash[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use the original value instead: `left_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:75:51 [INFO] [stdout] | [INFO] [stdout] 75 | let parent = [&left_hash[..], &right_hash[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use the original value instead: `right_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/merkle.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | return [0u8; 32].into(); [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] 90 - return [0u8; 32].into(); [INFO] [stdout] 90 + [0u8; 32].into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/merkle.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | return self.root[1].val; [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] 93 - return self.root[1].val; [INFO] [stdout] 93 + self.root[1].val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:63 [INFO] [stdout] | [INFO] [stdout] 101 | ... println!("{}, {:?}, {}, {}, {}, {}", i, self.root[i as usize].val, self.root[i as usize].left, self.root[i as usize].right, s... [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] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:90 [INFO] [stdout] | [INFO] [stdout] 101 | ... println!("{}, {:?}, {}, {}, {}, {}", i, self.root[i as usize].val, self.root[i as usize].left, self.root[i as usize].right, s... [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:118 [INFO] [stdout] | [INFO] [stdout] 101 | ... usize].val, self.root[i as usize].left, self.root[i as usize].right, self.root[i as usize].is_empty, self.root[i as usize].pare... [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:147 [INFO] [stdout] | [INFO] [stdout] 101 | ...size].left, self.root[i as usize].right, self.root[i as usize].is_empty, self.root[i as usize].parent); [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/types/merkle.rs:101:179 [INFO] [stdout] | [INFO] [stdout] 101 | ...].right, self.root[i as usize].is_empty, self.root[i as usize].parent); [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/types/merkle.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | return res_vec; //the proof not include the root_node [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] 124 - return res_vec; //the proof not include the root_node [INFO] [stdout] 124 + res_vec//the proof not include the root_node [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/merkle.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | return data == *root; [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] 157 - return data == *root; [INFO] [stdout] 157 + data == *root [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `proof` [INFO] [stdout] --> src/types/merkle.rs:137:14 [INFO] [stdout] | [INFO] [stdout] 137 | for i in 0..proof.len() { //concat from the first hash (bottom) to the last hash [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] 137 - for i in 0..proof.len() { //concat from the first hash (bottom) to the last hash [INFO] [stdout] 137 + for in &proof { //concat from the first hash (bottom) to the last hash [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:143:34 [INFO] [stdout] | [INFO] [stdout] 143 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^ help: use the original value instead: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:143:45 [INFO] [stdout] | [INFO] [stdout] 143 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:151:34 [INFO] [stdout] | [INFO] [stdout] 151 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^ help: use the original value instead: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/types/merkle.rs:151:45 [INFO] [stdout] | [INFO] [stdout] 151 | let parent_concat = [&left[..], &right[..]].concat(); [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/merkle.rs:153:13 [INFO] [stdout] | [INFO] [stdout] 153 | idx = idx/2; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `idx /= 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/transaction.rs:36:40 [INFO] [stdout] | [INFO] [stdout] 36 | let signature = sign(&transaction, &key); [INFO] [stdout] | ^^^^ help: change this to: `key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/transaction.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | return true [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] 64 - return true [INFO] [stdout] 64 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TransactionMemopool` [INFO] [stdout] --> src/types/transaction.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / pub fn new() -> Self { [INFO] [stdout] 74 | | let mut trans_map: HashMap = HashMap::new(); [INFO] [stdout] 75 | | TransactionMemopool { [INFO] [stdout] 76 | | trans_map: trans_map, [INFO] [stdout] 77 | | } [INFO] [stdout] 78 | | } [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] 72 + impl Default for TransactionMemopool { [INFO] [stdout] 73 + fn default() -> Self { [INFO] [stdout] 74 + Self::new() [INFO] [stdout] 75 + } [INFO] [stdout] 76 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/transaction.rs:97:61 [INFO] [stdout] | [INFO] [stdout] 97 | let addr: Address = Address::from_public_key_bytes(&address_pub_key); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `address_pub_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/transaction.rs:167:9 [INFO] [stdout] | [INFO] [stdout] 167 | return isValid; [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] 167 - return isValid; [INFO] [stdout] 167 + isValid [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/types/transaction.rs:126:17 [INFO] [stdout] | [INFO] [stdout] 126 | / if !accounts.contains_key(&receiver) { [INFO] [stdout] 127 | | accounts.insert(receiver, (nonce, value)); [INFO] [stdout] 128 | | // println!("account {:?} value {:?} nonce {:?}", receiver, value, nonce); [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________________^ help: try: `accounts.entry(receiver).or_insert((nonce, value));` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/types/transaction.rs:154:17 [INFO] [stdout] | [INFO] [stdout] 154 | sender_account.0 = sender_account.0 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sender_account.0 += 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 `(u32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/types/transaction.rs:159:41 [INFO] [stdout] | [INFO] [stdout] 159 | accounts.insert(sender, sender_account.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `sender_account` [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 `(u32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/types/transaction.rs:160:43 [INFO] [stdout] | [INFO] [stdout] 160 | accounts.insert(receiver, receiver_account.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `receiver_account` [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: unneeded `return` statement [INFO] [stdout] --> src/types/transaction.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | return Transaction{nonce, sender, receiver, value}; [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] 192 - return Transaction{nonce, sender, receiver, value}; [INFO] [stdout] 192 + Transaction{nonce, sender, receiver, value} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/miner/worker.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | / let mut vec = Vec::new(); //change [INFO] [stdout] 49 | | vec.push(_block.hash()); // push hash vec [INFO] [stdout] | |____________________________________^ help: consider using the `vec![]` macro: `let 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: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/miner/mod.rs:218:64 [INFO] [stdout] | [INFO] [stdout] 218 | 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] 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: this boolean expression can be simplified [INFO] [stdout] --> src/network/worker.rs:107:28 [INFO] [stdout] | [INFO] [stdout] 107 | if !blockchain.block_map.get(&hash).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `blockchain.block_map.get(&hash).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/network/worker.rs:206:28 [INFO] [stdout] | [INFO] [stdout] 206 | if !trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `trans_memopool.trans_map.get(&trans_hash).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:87:24 [INFO] [stdout] | [INFO] [stdout] 87 | if nonce.len() != 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!nonce.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:91:53 [INFO] [stdout] | [INFO] [stdout] 91 | ... if blockchain.block_map.get(&hash).is_none(){ [INFO] [stdout] | ---------------------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!blockchain.block_map.contains_key(&hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:95:28 [INFO] [stdout] | [INFO] [stdout] 95 | if vec_hash.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_hash.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `blocks` [INFO] [stdout] --> src/network/worker.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | for i in 0..blocks.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] 105 - for i in 0..blocks.len() { [INFO] [stdout] 105 + for in &blocks { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:107:50 [INFO] [stdout] | [INFO] [stdout] 107 | if !blockchain.block_map.get(&hash).is_none() { [INFO] [stdout] | ---------------------^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!blockchain.block_map.contains_key(&hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:111:24 [INFO] [stdout] | [INFO] [stdout] 111 | if vec.len() != 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/network/worker.rs:137:29 [INFO] [stdout] | [INFO] [stdout] 137 | / ... if !orph_buff.contains_key(&p_hash) { [INFO] [stdout] 138 | | ... orph_buff.insert(p_hash, block); [INFO] [stdout] 139 | | ... } [INFO] [stdout] | |_______________________^ help: try: `orph_buff.entry(p_hash).or_insert(block);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:179:24 [INFO] [stdout] | [INFO] [stdout] 179 | if buffered_block_hashs.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!buffered_block_hashs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:182:24 [INFO] [stdout] | [INFO] [stdout] 182 | if new_blocks.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_blocks.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&trans_hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:192:53 [INFO] [stdout] | [INFO] [stdout] 192 | if trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!trans_memopool.trans_map.contains_key(&trans_hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:193:43 [INFO] [stdout] | [INFO] [stdout] 193 | ... vec_hash.push(trans_hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `trans_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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:196:24 [INFO] [stdout] | [INFO] [stdout] 196 | if vec_hash.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_hash.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&trans_hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:206:54 [INFO] [stdout] | [INFO] [stdout] 206 | if !trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!trans_memopool.trans_map.contains_key(&trans_hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | if vec_trans.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_trans.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&trans_hash).is_none()` [INFO] [stdout] --> src/network/worker.rs:224:57 [INFO] [stdout] | [INFO] [stdout] 224 | ... if trans_memopool.trans_map.get(&trans_hash).is_none() { [INFO] [stdout] | -------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!trans_memopool.trans_map.contains_key(&trans_hash)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:231:24 [INFO] [stdout] | [INFO] [stdout] 231 | if vec_hash.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_hash.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/tx_generator/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod tx_generator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/tx_generator/mod.rs:167:16 [INFO] [stdout] | [INFO] [stdout] 167 | if sent_created_account == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!sent_created_account` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/tx_generator/mod.rs:176:41 [INFO] [stdout] | [INFO] [stdout] 176 | for (account, _) in &state.accounts { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 176 - for (account, _) in &state.accounts { [INFO] [stdout] 176 + for account in state.accounts.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/tx_generator/mod.rs:221:64 [INFO] [stdout] | [INFO] [stdout] 221 | 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: 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([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([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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/block.rs:9:10 [INFO] [stdout] | [INFO] [stdout] 9 | #[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_Header` [INFO] [stdout] 10 | 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:9:21 [INFO] [stdout] | [INFO] [stdout] 9 | #[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_Header` [INFO] [stdout] 10 | 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:26:10 [INFO] [stdout] | [INFO] [stdout] 26 | #[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_Content` [INFO] [stdout] 27 | pub struct Content{ [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:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | #[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_Content` [INFO] [stdout] 27 | pub struct Content{ [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/block.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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] 32 | 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:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | #[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] 32 | 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/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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/types/transaction.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[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] 12 | 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:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | #[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] 12 | 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: variable `isValid` should have a snake case name [INFO] [stdout] --> src/types/transaction.rs:116:17 [INFO] [stdout] | [INFO] [stdout] 116 | let mut isValid = true; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `is_valid` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `signedTrans` should have a snake case name [INFO] [stdout] --> src/types/transaction.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | for signedTrans in &block.content.content { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `signed_trans` [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] [stdout] warning: variable `removeContent` should have a snake case name [INFO] [stdout] --> src/network/worker.rs:146:37 [INFO] [stdout] | [INFO] [stdout] 146 | ... let mut removeContent = false; [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `remove_content` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `other_accounts_hashSet` should have a snake case name [INFO] [stdout] --> src/tx_generator/mod.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | let mut other_accounts_hashSet = HashSet::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `other_accounts_hash_set` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `signedTransaction` should have a snake case name [INFO] [stdout] --> src/tx_generator/mod.rs:170:21 [INFO] [stdout] | [INFO] [stdout] 170 | let signedTransaction = generate_random_signed_transaction(account, account, 1000, 0, &self.key); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `signed_transaction` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `signedTransaction` should have a snake case name [INFO] [stdout] --> src/tx_generator/mod.rs:204:25 [INFO] [stdout] | [INFO] [stdout] 204 | let signedTransaction = generate_random_signed_transaction(self.address, receiver, value, nonce, &self.key); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `signed_transaction` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 26.17s [INFO] running `Command { std: "docker" "inspect" "49a1e77048b434e01cfc8b638ab3a0439e660d3eee371d4baab2aaef86fb1497", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "49a1e77048b434e01cfc8b638ab3a0439e660d3eee371d4baab2aaef86fb1497", kill_on_drop: false }` [INFO] [stdout] 49a1e77048b434e01cfc8b638ab3a0439e660d3eee371d4baab2aaef86fb1497