[INFO] cloning repository https://github.com/luoos/bitcoin_client [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/luoos/bitcoin_client" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fluoos%2Fbitcoin_client", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fluoos%2Fbitcoin_client'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c3792d8ae5681ea18f467822d829236128db2aef [INFO] linting luoos/bitcoin_client against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fluoos%2Fbitcoin_client" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/luoos/bitcoin_client [INFO] finished tweaking git repo https://github.com/luoos/bitcoin_client [INFO] tweaked toml for git repo https://github.com/luoos/bitcoin_client written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/luoos/bitcoin_client 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/luoos/bitcoin_client 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded untrusted v0.7.0 [INFO] [stderr] Downloaded chunked_transfer v0.3.1 [INFO] [stderr] Downloaded slug v0.1.4 [INFO] [stderr] Downloaded tiny_http v0.6.2 [INFO] [stderr] Downloaded hex-literal v0.2.1 [INFO] [stderr] Downloaded hex-literal-impl v0.2.1 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.58 [INFO] [stderr] Downloaded proc-macro-hack v0.5.11 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.58 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.58 [INFO] [stderr] Downloaded crossbeam v0.7.3 [INFO] [stderr] Downloaded wasm-bindgen-webidl v0.2.58 [INFO] [stderr] Downloaded stderrlog v0.4.3 [INFO] [stderr] Downloaded ignore v0.4.11 [INFO] [stderr] Downloaded js-sys v0.3.35 [INFO] [stderr] Downloaded ucd-trie v0.1.2 [INFO] [stderr] Downloaded parse-zoneinfo v0.2.1 [INFO] [stderr] Downloaded bumpalo v3.2.0 [INFO] [stderr] Downloaded wasm-bindgen v0.2.58 [INFO] [stderr] Downloaded aho-corasick v0.7.8 [INFO] [stderr] Downloaded deunicode v0.4.3 [INFO] [stderr] Downloaded web-sys v0.3.35 [INFO] [stderr] Downloaded syn v1.0.15 [INFO] [stderr] Downloaded tera v1.0.2 [INFO] [stderr] Downloaded chrono v0.4.10 [INFO] [stderr] Downloaded regex v1.3.4 [INFO] [stderr] Downloaded globset v0.4.4 [INFO] [stderr] Downloaded regex-syntax v0.6.14 [INFO] [stderr] Downloaded winapi-util v0.1.3 [INFO] [stderr] Downloaded humansize v1.1.0 [INFO] [stderr] Downloaded pest_generator v2.1.2 [INFO] [stderr] Downloaded bstr v0.2.11 [INFO] [stderr] Downloaded globwalk v0.7.1 [INFO] [stderr] Downloaded libc v0.2.67 [INFO] [stderr] Downloaded ascii v0.8.7 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.58 [INFO] [stderr] Downloaded timer v0.2.0 [INFO] [stderr] Downloaded ring v0.16.11 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 0bdbeb293c20f11d393994e30f49f5cdde33ba166f75f717e796f214638785a2 [INFO] running `Command { std: "docker" "start" "-a" "0bdbeb293c20f11d393994e30f49f5cdde33ba166f75f717e796f214638785a2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0bdbeb293c20f11d393994e30f49f5cdde33ba166f75f717e796f214638785a2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0bdbeb293c20f11d393994e30f49f5cdde33ba166f75f717e796f214638785a2", kill_on_drop: false }` [INFO] [stdout] 0bdbeb293c20f11d393994e30f49f5cdde33ba166f75f717e796f214638785a2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 8fc37cf35a20d43fc1e7ea203b87f3c09300232267edebeafb5a2298cef07c38 [INFO] running `Command { std: "docker" "start" "-a" "8fc37cf35a20d43fc1e7ea203b87f3c09300232267edebeafb5a2298cef07c38", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.0 [INFO] [stderr] Compiling libc v0.2.67 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling proc-macro2 v1.0.8 [INFO] [stderr] Compiling unicode-xid v0.2.0 [INFO] [stderr] Compiling syn v1.0.15 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling thread_local v1.0.1 [INFO] [stderr] Checking smallvec v1.2.0 [INFO] [stderr] Compiling regex-syntax v0.6.14 [INFO] [stderr] Compiling crossbeam-utils v0.7.2 [INFO] [stderr] Compiling num-traits v0.2.11 [INFO] [stderr] Compiling num-integer v0.1.42 [INFO] [stderr] Checking matches v0.1.8 [INFO] [stderr] Compiling aho-corasick v0.7.8 [INFO] [stderr] Checking unicode-bidi v0.3.4 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Checking time v0.1.42 [INFO] [stderr] Checking getrandom v0.1.14 [INFO] [stderr] Checking unicode-normalization v0.1.12 [INFO] [stderr] Compiling memoffset v0.5.3 [INFO] [stderr] Checking ppv-lite86 v0.2.6 [INFO] [stderr] Compiling ucd-trie v0.1.2 [INFO] [stderr] Compiling serde v1.0.104 [INFO] [stderr] Compiling pest v2.1.3 [INFO] [stderr] Checking c2-chacha v0.2.3 [INFO] [stderr] Checking crossbeam-channel v0.4.2 [INFO] [stderr] Checking chrono v0.4.10 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking bstr v0.2.11 [INFO] [stderr] Compiling crossbeam-epoch v0.8.2 [INFO] [stderr] Compiling ryu v1.0.2 [INFO] [stderr] Checking fnv v1.0.6 [INFO] [stderr] Compiling maplit v1.0.2 [INFO] [stderr] Checking walkdir v2.3.1 [INFO] [stderr] Checking rand_chacha v0.2.1 [INFO] [stderr] Compiling cc v1.0.50 [INFO] [stderr] Checking void v1.0.2 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Compiling pest_meta v2.1.3 [INFO] [stderr] Checking unreachable v1.0.0 [INFO] [stderr] Checking idna v0.1.5 [INFO] [stderr] Checking iovec v0.1.4 [INFO] [stderr] Compiling regex v1.3.4 [INFO] [stderr] Compiling ring v0.16.11 [INFO] [stderr] Checking term_size v0.3.1 [INFO] [stderr] Checking atty v0.2.11 [INFO] [stderr] Checking net2 v0.2.33 [INFO] [stderr] Checking itoa v0.4.5 [INFO] [stderr] Checking lazy_static v0.2.11 [INFO] [stderr] Checking unicode-width v0.1.7 [INFO] [stderr] Checking deunicode v0.4.3 [INFO] [stderr] Checking slab v0.4.2 [INFO] [stderr] Checking thread_local v0.3.4 [INFO] [stderr] Checking mio v0.6.21 [INFO] [stderr] Checking globset v0.4.4 [INFO] [stderr] Checking slug v0.1.4 [INFO] [stderr] Checking url v1.7.2 [INFO] [stderr] Checking ignore v0.4.11 [INFO] [stderr] Compiling parse-zoneinfo v0.2.1 [INFO] [stderr] Compiling pest_generator v2.1.2 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking globwalk v0.7.1 [INFO] [stderr] Checking crossbeam-deque v0.7.3 [INFO] [stderr] Checking idna v0.2.0 [INFO] [stderr] Checking crossbeam-queue v0.2.1 [INFO] [stderr] Checking termcolor v1.1.0 [INFO] [stderr] Checking lazycell v1.2.1 [INFO] [stderr] Checking chunked_transfer v0.3.1 [INFO] [stderr] Checking untrusted v0.7.0 [INFO] [stderr] Checking ascii v0.8.7 [INFO] [stderr] Checking vec_map v0.8.1 [INFO] [stderr] Checking humansize v1.1.0 [INFO] [stderr] Checking stderrlog v0.4.3 [INFO] [stderr] Checking crossbeam v0.7.3 [INFO] [stderr] Checking mio-extras v2.0.6 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking url v2.1.1 [INFO] [stderr] Checking tiny_http v0.6.2 [INFO] [stderr] Checking rand_distr v0.2.2 [INFO] [stderr] Checking timer v0.2.0 [INFO] [stderr] Checking hex v0.4.2 [INFO] [stderr] Compiling chrono-tz v0.5.1 [INFO] [stderr] Compiling serde_derive v1.0.104 [INFO] [stderr] Compiling proc-macro-hack v0.5.11 [INFO] [stderr] Compiling pest_derive v2.1.0 [INFO] [stderr] Compiling hex-literal-impl v0.2.1 [INFO] [stderr] Checking hex-literal v0.2.1 [INFO] [stderr] Checking serde_json v1.0.48 [INFO] [stderr] Checking bincode v1.2.1 [INFO] [stderr] Checking tera v1.0.2 [INFO] [stderr] Checking bitcoin v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/spread.rs:218:11 [INFO] [stdout] | [INFO] [stdout] 218 | #[cfg(any(test))] [INFO] [stdout] | ^^^^^^^^^ help: try: `test` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] = note: `#[warn(clippy::non_minimal_cfg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/spread.rs:331:11 [INFO] [stdout] | [INFO] [stdout] 331 | #[cfg(any(test))] [INFO] [stdout] | ^^^^^^^^^ help: try: `test` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/spread.rs:218:11 [INFO] [stdout] | [INFO] [stdout] 218 | #[cfg(any(test))] [INFO] [stdout] | ^^^^^^^^^ help: try: `test` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] = note: `#[warn(clippy::non_minimal_cfg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded sub `cfg` when there is only one condition [INFO] [stdout] --> src/spread.rs:331:11 [INFO] [stdout] | [INFO] [stdout] 331 | #[cfg(any(test))] [INFO] [stdout] | ^^^^^^^^^ help: try: `test` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/api/mod.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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/api/mod.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | #[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: 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/block.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | #[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/block.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | #[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/block.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | #[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/block.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | #[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/block.rs:42:10 [INFO] [stdout] | [INFO] [stdout] 42 | #[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/block.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | #[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/block.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/crypto/hash.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[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/crypto/hash.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[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/crypto/hash.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | #[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/crypto/hash.rs:16:36 [INFO] [stdout] | [INFO] [stdout] 16 | #[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/network/message.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/network/message.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:36:36 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:54:10 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/account.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/block.rs:338:17 [INFO] [stdout] | [INFO] [stdout] 338 | #[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/block.rs:224:21 [INFO] [stdout] | [INFO] [stdout] 224 | #[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: redundant field names in struct initialization [INFO] [stdout] --> src/block.rs:130:13 [INFO] [stdout] | [INFO] [stdout] 130 | 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] = 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/block.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | 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/block.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | 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/block.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | 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/block.rs:152:13 [INFO] [stdout] | [INFO] [stdout] 152 | 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/block.rs:257:13 [INFO] [stdout] | [INFO] [stdout] 257 | 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: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/blockchain.rs:268:17 [INFO] [stdout] | [INFO] [stdout] 268 | #[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/blockchain.rs:237:21 [INFO] [stdout] | [INFO] [stdout] 237 | #[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/blockchain.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | #[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/blockchain.rs:262:21 [INFO] [stdout] | [INFO] [stdout] 262 | #[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/crypto/hash.rs:218:17 [INFO] [stdout] | [INFO] [stdout] 218 | #[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/miner.rs:235:17 [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: redundant field names in struct initialization [INFO] [stdout] --> src/miner.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | server: server, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `server` [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.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | blockchain: blockchain, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `blockchain` [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.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | mempool: mempool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `mempool` [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.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | key_pair: key_pair, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `key_pair` [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/miner.rs:217:21 [INFO] [stdout] | [INFO] [stdout] 217 | #[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:418:17 [INFO] [stdout] | [INFO] [stdout] 418 | #[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/estimator.rs:98:17 [INFO] [stdout] | [INFO] [stdout] 98 | #[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/transaction.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | #[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: redundant field names in struct initialization [INFO] [stdout] --> src/transaction.rs:75:15 [INFO] [stdout] | [INFO] [stdout] 75 | Self {inputs: inputs, outputs: outputs, ts: ts} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `inputs` [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/transaction.rs:75:31 [INFO] [stdout] | [INFO] [stdout] 75 | Self {inputs: inputs, outputs: outputs, ts: ts} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `outputs` [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/transaction.rs:75:49 [INFO] [stdout] | [INFO] [stdout] 75 | Self {inputs: inputs, outputs: outputs, ts: ts} [INFO] [stdout] | ^^^^^^ help: replace it with: `ts` [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/transaction.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | 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/transaction.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | signature: signature, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `signature` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/transaction.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | public_key: public_key, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/helper.rs:391:17 [INFO] [stdout] | [INFO] [stdout] 391 | #[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: empty line after doc comment [INFO] [stdout] --> src/helper.rs:152:1 [INFO] [stdout] | [INFO] [stdout] 152 | / /// Transaction [INFO] [stdout] 153 | | [INFO] [stdout] | |_^ [INFO] [stdout] 154 | // Create valid transactions under current state (For now: Send to one peer & myself) [INFO] [stdout] 155 | pub fn generate_valid_tran(state: &State, account: &Account, rec_addr: &H160) -> Option { [INFO] [stdout] | -------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `generate_valid_tran` then comment it out [INFO] [stdout] | [INFO] [stdout] 152 | // /// Transaction [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/helper.rs:325:1 [INFO] [stdout] | [INFO] [stdout] 325 | / ///Other [INFO] [stdout] 326 | | [INFO] [stdout] | |_^ [INFO] [stdout] 327 | // Generate 32-bytes array to set difficulty [INFO] [stdout] 328 | pub fn gen_difficulty_array(mut zero_cnt: i32) -> [u8; 32] { [INFO] [stdout] | --------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `gen_difficulty_array` then comment it out [INFO] [stdout] | [INFO] [stdout] 325 | // ///Other [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/mempool.rs:169:17 [INFO] [stdout] | [INFO] [stdout] 169 | #[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/transaction_generator.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | #[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/transaction_generator.rs:205:21 [INFO] [stdout] | [INFO] [stdout] 205 | #[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/peers.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | #[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/spread.rs:440:17 [INFO] [stdout] | [INFO] [stdout] 440 | #[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 value: `cargo-clippy` [INFO] [stdout] --> src/api/mod.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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/api/mod.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | #[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: 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/block.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | #[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/block.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | #[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/block.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | #[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/block.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | #[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/block.rs:42:10 [INFO] [stdout] | [INFO] [stdout] 42 | #[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/block.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | #[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/block.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/block.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/crypto/hash.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[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/crypto/hash.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[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/crypto/hash.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | #[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/crypto/hash.rs:16:36 [INFO] [stdout] | [INFO] [stdout] 16 | #[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/network/message.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/network/message.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:36:36 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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/transaction.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:54:10 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/transaction.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: expected values for `feature` are: `default` and `test-utilities` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/account.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | #[cfg(any(test, test_utilities))] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test_utilities)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(test_utilities)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/block.rs:338:17 [INFO] [stdout] | [INFO] [stdout] 338 | #[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/block.rs:224:21 [INFO] [stdout] | [INFO] [stdout] 224 | #[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: redundant field names in struct initialization [INFO] [stdout] --> src/block.rs:130:13 [INFO] [stdout] | [INFO] [stdout] 130 | 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] = 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/block.rs:142:13 [INFO] [stdout] | [INFO] [stdout] 142 | 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/block.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | 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/block.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | 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/block.rs:152:13 [INFO] [stdout] | [INFO] [stdout] 152 | 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/block.rs:257:13 [INFO] [stdout] | [INFO] [stdout] 257 | 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: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/blockchain.rs:268:17 [INFO] [stdout] | [INFO] [stdout] 268 | #[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/blockchain.rs:237:21 [INFO] [stdout] | [INFO] [stdout] 237 | #[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/blockchain.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | #[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/blockchain.rs:262:21 [INFO] [stdout] | [INFO] [stdout] 262 | #[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/crypto/hash.rs:218:17 [INFO] [stdout] | [INFO] [stdout] 218 | #[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/miner.rs:235:17 [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: redundant field names in struct initialization [INFO] [stdout] --> src/miner.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | server: server, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `server` [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.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | blockchain: blockchain, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `blockchain` [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.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | mempool: mempool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `mempool` [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.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | key_pair: key_pair, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `key_pair` [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/miner.rs:217:21 [INFO] [stdout] | [INFO] [stdout] 217 | #[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:418:17 [INFO] [stdout] | [INFO] [stdout] 418 | #[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/estimator.rs:98:17 [INFO] [stdout] | [INFO] [stdout] 98 | #[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/transaction.rs:207:17 [INFO] [stdout] | [INFO] [stdout] 207 | #[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: redundant field names in struct initialization [INFO] [stdout] --> src/transaction.rs:75:15 [INFO] [stdout] | [INFO] [stdout] 75 | Self {inputs: inputs, outputs: outputs, ts: ts} [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `inputs` [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/transaction.rs:75:31 [INFO] [stdout] | [INFO] [stdout] 75 | Self {inputs: inputs, outputs: outputs, ts: ts} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `outputs` [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/transaction.rs:75:49 [INFO] [stdout] | [INFO] [stdout] 75 | Self {inputs: inputs, outputs: outputs, ts: ts} [INFO] [stdout] | ^^^^^^ help: replace it with: `ts` [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/transaction.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | 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/transaction.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | signature: signature, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `signature` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/transaction.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | public_key: public_key, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/helper.rs:391:17 [INFO] [stdout] | [INFO] [stdout] 391 | #[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: empty line after doc comment [INFO] [stdout] --> src/helper.rs:152:1 [INFO] [stdout] | [INFO] [stdout] 152 | / /// Transaction [INFO] [stdout] 153 | | [INFO] [stdout] | |_^ [INFO] [stdout] 154 | // Create valid transactions under current state (For now: Send to one peer & myself) [INFO] [stdout] 155 | pub fn generate_valid_tran(state: &State, account: &Account, rec_addr: &H160) -> Option { [INFO] [stdout] | -------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `generate_valid_tran` then comment it out [INFO] [stdout] | [INFO] [stdout] 152 | // /// Transaction [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/helper.rs:325:1 [INFO] [stdout] | [INFO] [stdout] 325 | / ///Other [INFO] [stdout] 326 | | [INFO] [stdout] | |_^ [INFO] [stdout] 327 | // Generate 32-bytes array to set difficulty [INFO] [stdout] 328 | pub fn gen_difficulty_array(mut zero_cnt: i32) -> [u8; 32] { [INFO] [stdout] | --------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `gen_difficulty_array` then comment it out [INFO] [stdout] | [INFO] [stdout] 325 | // ///Other [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `test_utilities` [INFO] [stdout] --> src/mempool.rs:169:17 [INFO] [stdout] | [INFO] [stdout] 169 | #[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/transaction_generator.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | #[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/transaction_generator.rs:205:21 [INFO] [stdout] | [INFO] [stdout] 205 | #[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/peers.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | #[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/spread.rs:440:17 [INFO] [stdout] | [INFO] [stdout] 440 | #[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: field `is_leaf` is never read [INFO] [stdout] --> src/crypto/merkle.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 15 | is_leaf: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/account.rs:17:37 [INFO] [stdout] | [INFO] [stdout] 17 | pub_key[..].copy_from_slice(&key_pair.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `key_pair.public_key().as_ref()` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/api/mod.rs:97:39 [INFO] [stdout] | [INFO] [stdout] 97 | 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: you should consider adding a `Default` implementation for `State` [INFO] [stdout] --> src/block.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | / pub fn new() -> Self { [INFO] [stdout] 65 | | let map: HashMap<(H256, u32), (u64, H160)> = HashMap::new(); [INFO] [stdout] 66 | | Self(map) [INFO] [stdout] 67 | | } [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] 63 + impl Default for State { [INFO] [stdout] 64 + fn default() -> Self { [INFO] [stdout] 65 + Self::new() [INFO] [stdout] 66 + } [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | return self.0.remove(key); [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] 74 - return self.0.remove(key); [INFO] [stdout] 74 + self.0.remove(key) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | return self.0.contains_key(key); [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] 78 - return self.0.contains_key(key); [INFO] [stdout] 78 + self.0.contains_key(key) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return self.0.get(key); [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] 82 - return self.0.get(key); [INFO] [stdout] 82 + self.0.get(key) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | return (coins, balance); [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] 98 - return (coins, balance); [INFO] [stdout] 98 + (coins, balance) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:94:43 [INFO] [stdout] | [INFO] [stdout] 94 | coins.insert(TxInput::new(tran_hash.clone(), *index), *val); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*tran_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | self.hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | self.hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: unneeded `return` statement [INFO] [stdout] --> src/block.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | return Some(state); [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] 221 - return Some(state); [INFO] [stdout] 221 + Some(state) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:184:27 [INFO] [stdout] | [INFO] [stdout] 184 | state.insert((coinbase_tran.hash.clone(), 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `coinbase_tran.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: this loop could be written as a `for` loop [INFO] [stdout] --> src/block.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | while let Some(tran) = trans_iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for tran in trans_iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:211:31 [INFO] [stdout] | [INFO] [stdout] 211 | state.insert((tran.hash.clone(), index as u32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:238:35 [INFO] [stdout] | [INFO] [stdout] 238 | hash: hex::encode(&b.hash), [INFO] [stdout] | ^^^^^^^ help: change this to: `b.hash` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:239:42 [INFO] [stdout] | [INFO] [stdout] 239 | parent_hash: hex::encode(&b.header.parent), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `b.header.parent` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:242:41 [INFO] [stdout] | [INFO] [stdout] 242 | difficulty: hex::encode(&b.header.difficulty), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `b.header.difficulty` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:244:42 [INFO] [stdout] | [INFO] [stdout] 244 | merkle_root: hex::encode(&b.header.merkle_root), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `b.header.merkle_root` [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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | parent: parent.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:258:25 [INFO] [stdout] | [INFO] [stdout] 258 | difficulty: difficulty.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*difficulty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:260:26 [INFO] [stdout] | [INFO] [stdout] 260 | merkle_root: merkle_root.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*merkle_root` [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: you should consider adding a `Default` implementation for `Content` [INFO] [stdout] --> src/block.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | / pub fn new() -> Self { [INFO] [stdout] 281 | | Self { [INFO] [stdout] 282 | | trans: Vec::::new(), [INFO] [stdout] 283 | | } [INFO] [stdout] 284 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 279 + impl Default for Content { [INFO] [stdout] 280 + fn default() -> Self { [INFO] [stdout] 281 + Self::new() [INFO] [stdout] 282 + } [INFO] [stdout] 283 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/block.rs:286:34 [INFO] [stdout] | [INFO] [stdout] 286 | pub fn new_with_trans(trans: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 286 ~ pub fn new_with_trans(trans: &[SignedTransaction]) -> Self { [INFO] [stdout] 287 | Self { [INFO] [stdout] 288 ~ trans: trans.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/block.rs:310:39 [INFO] [stdout] | [INFO] [stdout] 310 | pub fn from_content_vec(contents: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 310 - pub fn from_content_vec(contents: &Vec) -> Vec { [INFO] [stdout] 310 + pub fn from_content_vec(contents: &[Content]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Blockchain` [INFO] [stdout] --> src/blockchain.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let genesis = Block::genesis(); [INFO] [stdout] 22 | | let genesis_hash = genesis.hash.clone(); [INFO] [stdout] 23 | | let difficulty = genesis.header.difficulty.clone(); [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 + impl Default for Blockchain { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | let genesis_hash = genesis.hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | let difficulty = genesis.header.difficulty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis.header.difficulty` [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/blockchain.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | return self.insert(block); [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] 48 - return self.insert(block); [INFO] [stdout] 48 + self.insert(block) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | 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] 95 - return true; [INFO] [stdout] 95 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:60:40 [INFO] [stdout] | [INFO] [stdout] 60 | self.states.insert(block.hash.clone(), new_state); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:68:41 [INFO] [stdout] | [INFO] [stdout] 68 | self.longest_hash = b.hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:71:39 [INFO] [stdout] | [INFO] [stdout] 71 | let new_parent_hash = b.hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:75:36 [INFO] [stdout] | [INFO] [stdout] 75 | self.blocks.insert(b.hash.clone(), b); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:81:37 [INFO] [stdout] | [INFO] [stdout] 81 | self.orphans.insert(b.hash.clone(), b.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:88:48 [INFO] [stdout] | [INFO] [stdout] 88 | let parent_hash_copy = parent_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*parent_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/blockchain.rs:119:41 [INFO] [stdout] | [INFO] [stdout] 119 | while self.orphans.contains_key(&cur) { [INFO] [stdout] | ^^^^ help: change this to: `cur` [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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:122:14 [INFO] [stdout] | [INFO] [stdout] 122 | Some(cur.clone()) [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*cur` [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/blockchain.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return block.try_generate_state(parent_state); [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] 131 - return block.try_generate_state(parent_state); [INFO] [stdout] 131 + block.try_generate_state(parent_state) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/blockchain.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | return false; [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] 143 - return false; [INFO] [stdout] 143 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | self.longest_hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.longest_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | self.difficulty.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.difficulty` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain.rs:172:38 [INFO] [stdout] | [INFO] [stdout] 172 | pub fn get_blocks(&self, hashes: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 172 - pub fn get_blocks(&self, hashes: &Vec) -> Vec { [INFO] [stdout] 172 + pub fn get_blocks(&self, hashes: &[H256]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/blockchain.rs:175:46 [INFO] [stdout] | [INFO] [stdout] 175 | if let Some(b) = self.blocks.get(&h) { [INFO] [stdout] | ^^ help: change this to: `h` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/blockchain.rs:177:54 [INFO] [stdout] | [INFO] [stdout] 177 | } else if let Some(b) = self.orphans.get(&h) { [INFO] [stdout] | ^^ help: change this to: `h` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/blockchain.rs:188:16 [INFO] [stdout] | [INFO] [stdout] 188 | } else if let Some(b) = self.orphans.get(hash) { [INFO] [stdout] | ________________^ [INFO] [stdout] 189 | | Some(b.clone()) [INFO] [stdout] 190 | | } else { [INFO] [stdout] 191 | | None [INFO] [stdout] 192 | | } [INFO] [stdout] | |_________^ help: try: `{ self.orphans.get(hash).map(|b| b.clone()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:203:24 [INFO] [stdout] | [INFO] [stdout] 203 | cur_hash = cur_block.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cur_block.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:253:27 [INFO] [stdout] | [INFO] [stdout] 253 | self.difficulty = difficulty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*difficulty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | Node {hash: self.hash.clone(), left: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/crypto/merkle.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if nodes.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `!nodes.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `crypto::hash::H256` [INFO] [stdout] --> src/crypto/merkle.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | self.root.hash.into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.root.hash` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/crypto/merkle.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / match *node { [INFO] [stdout] 92 | | Node {hash: _, is_leaf: _, index, [INFO] [stdout] 93 | | left: Some(ref left), right: Some(ref right)} => { [INFO] [stdout] 94 | | if idx < index { [INFO] [stdout] ... | [INFO] [stdout] 102 | | _ => {} [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 91 ~ if let Node {hash: _, is_leaf: _, index, [INFO] [stdout] 92 + left: Some(ref left), right: Some(ref right)} = *node { [INFO] [stdout] 93 + if idx < index { [INFO] [stdout] 94 + result.push(right.hash.clone()); [INFO] [stdout] 95 + self.trace_proof(idx, left, result); [INFO] [stdout] 96 + } else { [INFO] [stdout] 97 + result.push(left.hash.clone()); [INFO] [stdout] 98 + self.trace_proof(idx, right, result); [INFO] [stdout] 99 + } [INFO] [stdout] 100 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:95:33 [INFO] [stdout] | [INFO] [stdout] 95 | result.push(right.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `right.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:98:33 [INFO] [stdout] | [INFO] [stdout] 98 | result.push(left.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `left.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:110:24 [INFO] [stdout] | [INFO] [stdout] 110 | let mut acc_hash = datum.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*datum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/crypto/merkle.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | acc_hash.concat_hash(h, bits % 2 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace with: `bits.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/crypto/merkle.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | bits = bits >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `bits >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&[u8]` [INFO] [stdout] --> src/crypto/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] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/miner.rs:157:64 [INFO] [stdout] | [INFO] [stdout] 157 | 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] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner.rs:182:24 [INFO] [stdout] | [INFO] [stdout] 182 | let vec = vec![block.hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/miner.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | return false; [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] 232 - return false; [INFO] [stdout] 232 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/network/server.rs:72:24 [INFO] [stdout] | [INFO] [stdout] 72 | return Err(std::io::Error::new( [INFO] [stdout] | ________________________^ [INFO] [stdout] 73 | | std::io::ErrorKind::Other, [INFO] [stdout] 74 | | "max peer reached, cannot accept new connections", [INFO] [stdout] 75 | | )); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 72 ~ return Err(std::io::Error::other( [INFO] [stdout] 73 ~ "max peer reached, cannot accept new connections", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/network/server.rs:280:49 [INFO] [stdout] | [INFO] [stdout] 280 | const INCOMING: mio::Token = mio::Token(std::usize::MAX - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 280 - const INCOMING: mio::Token = mio::Token(std::usize::MAX - 1); [INFO] [stdout] 280 + const INCOMING: mio::Token = mio::Token(usize::MAX - 1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/network/server.rs:289:48 [INFO] [stdout] | [INFO] [stdout] 289 | const CONTROL: mio::Token = mio::Token(std::usize::MAX - 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 289 - const CONTROL: mio::Token = mio::Token(std::usize::MAX - 2); [INFO] [stdout] 289 + const CONTROL: mio::Token = mio::Token(usize::MAX - 2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/network/worker.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / pub fn new( [INFO] [stdout] 32 | | num_worker: usize, [INFO] [stdout] 33 | | msg_src: channel::Receiver<(Vec, peer::Handle)>, [INFO] [stdout] 34 | | server: ServerHandle, [INFO] [stdout] ... | [INFO] [stdout] 40 | | self_port: u16, [INFO] [stdout] 41 | | ) -> Context { [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | if to_get.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_get.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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:102:24 [INFO] [stdout] | [INFO] [stdout] 102 | if blocks.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:118:45 [INFO] [stdout] | [INFO] [stdout] 118 | ... new_hashes.push(b.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.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:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | if missing_parents.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!missing_parents.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:128:24 [INFO] [stdout] | [INFO] [stdout] 128 | if new_hashes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_hashes.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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:138:56 [INFO] [stdout] | [INFO] [stdout] 138 | ... mempool.insert_ts_and_addr(h.clone(), peer.addr.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:138:67 [INFO] [stdout] | [INFO] [stdout] 138 | ... mempool.insert_ts_and_addr(h.clone(), peer.addr.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer.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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:144:24 [INFO] [stdout] | [INFO] [stdout] 144 | if to_get.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_get.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: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:154:66 [INFO] [stdout] | [INFO] [stdout] 154 | ... mempool.insert_ts_and_addr(t.hash(), peer.addr.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer.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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:165:24 [INFO] [stdout] | [INFO] [stdout] 165 | if trans.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | if new_hashes.len() > 0 && !self.supernode { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_hashes.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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:190:36 [INFO] [stdout] | [INFO] [stdout] 190 | let addr = info.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `info.0` [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:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | if new_peers.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_peers.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 a legacy numeric method [INFO] [stdout] --> src/network/estimator.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | let mut earliest = i64::max_value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 14 - let mut earliest = i64::max_value(); [INFO] [stdout] 14 + let mut earliest = i64::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:21:26 [INFO] [stdout] | [INFO] [stdout] 21 | res_ip = ip.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:25:44 [INFO] [stdout] | [INFO] [stdout] 25 | map_data.insert(trans.clone(), res_ip.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `res_ip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/network/estimator.rs:29:26 [INFO] [stdout] | [INFO] [stdout] 29 | estimator(&map_data, &info_map, n) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `info_map` [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: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:58:29 [INFO] [stdout] | [INFO] [stdout] 58 | ip2count.insert(ip.clone(), 1); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:59:36 [INFO] [stdout] | [INFO] [stdout] 59 | input_match_map.insert(addr.clone(), ip2count); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `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: redundant slicing of the whole range [INFO] [stdout] --> src/account.rs:17:37 [INFO] [stdout] | [INFO] [stdout] 17 | pub_key[..].copy_from_slice(&key_pair.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `key_pair.public_key().as_ref()` [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: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> src/account.rs:37:23 [INFO] [stdout] | [INFO] [stdout] 37 | let pub_key = key.public_key().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*key.public_key()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/api/mod.rs:97:39 [INFO] [stdout] | [INFO] [stdout] 97 | 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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/transaction.rs:61:30 [INFO] [stdout] | [INFO] [stdout] 61 | fn hash(&self) -> H256 { self.hash.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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/transaction.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 100 | if self.transaction.inputs.len() > 0 || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.transaction.inputs.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 borrowed expression implements the required traits [INFO] [stdout] --> src/transaction.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | hash: hex::encode(&tx.hash), [INFO] [stdout] | ^^^^^^^^ help: change this to: `tx.hash` [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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/transaction.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 190 | | Ok(_) => true, [INFO] [stdout] 191 | | _ => false [INFO] [stdout] 192 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 189 - match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 190 - Ok(_) => true, [INFO] [stdout] 191 - _ => false [INFO] [stdout] 192 - } [INFO] [stdout] 189 + matches!(EdDSAParameters.verify(pk, msg, sig), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/transaction.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 190 | | Ok(_) => true, [INFO] [stdout] 191 | | _ => false [INFO] [stdout] 192 | | } [INFO] [stdout] | |_____^ help: try: `EdDSAParameters.verify(pk, msg, sig).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/transaction.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 202 | | Ok(_) => true, [INFO] [stdout] 203 | | _ => false [INFO] [stdout] 204 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 201 - match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 202 - Ok(_) => true, [INFO] [stdout] 203 - _ => false [INFO] [stdout] 204 - } [INFO] [stdout] 201 + matches!(EdDSAParameters.verify(pk, msg, sig), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/transaction.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 202 | | Ok(_) => true, [INFO] [stdout] 203 | | _ => false [INFO] [stdout] 204 | | } [INFO] [stdout] | |_____^ help: try: `EdDSAParameters.verify(pk, msg, sig).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/helper.rs:32:95 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn new_server_env(ipv4_addr: SocketAddr, spreader_type : Spreader, is_supernode: bool) -> (server::Handle, miner::Context, tra... [INFO] [stdout] | _______________________________________________________________________________________________^ [INFO] [stdout] 33 | | Arc>, Arc>, Arc>, [INFO] [stdout] 34 | | Arc) { [INFO] [stdout] | |_____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:96:45 [INFO] [stdout] | [INFO] [stdout] 96 | assert!(miner::mining_base(&mut header, difficulty.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*difficulty` [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/helper.rs:176:5 [INFO] [stdout] | [INFO] [stdout] 176 | return None; [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] 176 - return None; [INFO] [stdout] 176 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:169:39 [INFO] [stdout] | [INFO] [stdout] 169 | tx_outputs.push(TxOutput::new(rec_addr.clone(), transfer_val)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rec_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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:171:43 [INFO] [stdout] | [INFO] [stdout] 171 | tx_outputs.push(TxOutput::new(account.addr.clone(), acc-transfer_val)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `account.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: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | return SignedTransaction::new(tran, sig_bytes, pub_key_bytes); [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] 185 - return SignedTransaction::new(tran, sig_bytes, pub_key_bytes); [INFO] [stdout] 185 + SignedTransaction::new(tran, sig_bytes, pub_key_bytes) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/helper.rs:183:33 [INFO] [stdout] | [INFO] [stdout] 183 | let signature = sign(&tran, &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/helper.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | return generate_signed_transaction(key, Vec::new(), vec![txoutput]); [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] 191 - return generate_signed_transaction(key, Vec::new(), vec![txoutput]); [INFO] [stdout] 191 + generate_signed_transaction(key, Vec::new(), vec![txoutput]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:190:43 [INFO] [stdout] | [INFO] [stdout] 190 | let txoutput = TxOutput {rec_address: addr.clone(), val: COINBASE_REWARD}; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/helper.rs:197:51 [INFO] [stdout] | [INFO] [stdout] 197 | let signature: Box<[u8]> = sign(&transaction, &key).as_ref().into(); [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: usage of a legacy numeric constant [INFO] [stdout] --> src/helper.rs:329:38 [INFO] [stdout] | [INFO] [stdout] 329 | let mut difficulty : [u8; 32] = [std::u8::MAX; 32]; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 329 - let mut difficulty : [u8; 32] = [std::u8::MAX; 32]; [INFO] [stdout] 329 + let mut difficulty : [u8; 32] = [u8::MAX; 32]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `difficulty` [INFO] [stdout] --> src/helper.rs:331:14 [INFO] [stdout] | [INFO] [stdout] 331 | for i in 0..32 { [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] 331 - for i in 0..32 { [INFO] [stdout] 331 + for in &mut difficulty { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:347:5 [INFO] [stdout] | [INFO] [stdout] 347 | return rng.gen_range(lo, hi+1); [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] 347 - return rng.gen_range(lo, hi+1); [INFO] [stdout] 347 + rng.gen_range(lo, hi+1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:354:5 [INFO] [stdout] | [INFO] [stdout] 354 | return peer_list_copy [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] 354 - return peer_list_copy [INFO] [stdout] 354 + peer_list_copy [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/helper.rs:350:43 [INFO] [stdout] | [INFO] [stdout] 350 | pub fn gen_shuffled_peer_list(peer_list : &Vec) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 350 - pub fn gen_shuffled_peer_list(peer_list : &Vec) -> Vec{ [INFO] [stdout] 350 + pub fn gen_shuffled_peer_list(peer_list : &[usize]) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:380:9 [INFO] [stdout] | [INFO] [stdout] 380 | return Some(map) [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] 380 - return Some(map) [INFO] [stdout] 380 + Some(map) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | return None [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] 382 - return None [INFO] [stdout] 382 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/helper.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | / for line in lines { [INFO] [stdout] 372 | | if let Ok(l) = line { [INFO] [stdout] 373 | | let mut split_colon = l.split(":"); [INFO] [stdout] 374 | | let key = split_colon.next().unwrap().parse::().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 379 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/helper.rs:372:13 [INFO] [stdout] | [INFO] [stdout] 372 | / if let Ok(l) = line { [INFO] [stdout] 373 | | let mut split_colon = l.split(":"); [INFO] [stdout] 374 | | let key = split_colon.next().unwrap().parse::().unwrap(); [INFO] [stdout] 375 | | let neighbors: Vec = split_colon.next().unwrap() [INFO] [stdout] 376 | | .split(",").map(|x| x.parse::().unwrap()).collect(); [INFO] [stdout] 377 | | map.insert(key, neighbors); [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 371 ~ for l in lines.flatten() { [INFO] [stdout] 372 + let mut split_colon = l.split(":"); [INFO] [stdout] 373 + let key = split_colon.next().unwrap().parse::().unwrap(); [INFO] [stdout] 374 + let neighbors: Vec = split_colon.next().unwrap() [INFO] [stdout] 375 + .split(",").map(|x| x.parse::().unwrap()).collect(); [INFO] [stdout] 376 + map.insert(key, neighbors); [INFO] [stdout] 377 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MemPool` [INFO] [stdout] --> src/mempool.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | Self { [INFO] [stdout] 24 | | transactions: HashMap::new(), [INFO] [stdout] 25 | | input_tran_map: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 + impl Default for MemPool { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return mempool; [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] 37 - return mempool; [INFO] [stdout] 37 + mempool [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mempool.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn new_with_trans(trans: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub fn new_with_trans(trans: &Vec) -> Self { [INFO] [stdout] 32 + pub fn new_with_trans(trans: &[SignedTransaction]) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | return self.try_insert(tran); [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] 45 - return self.try_insert(tran); [INFO] [stdout] 45 + self.try_insert(tran) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/mempool.rs:49:38 [INFO] [stdout] | [INFO] [stdout] 49 | self.dandelion_buffer.insert(tran.hash.clone(), tran.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.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: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | 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] 86 - return true; [INFO] [stdout] 86 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/mempool.rs:71:41 [INFO] [stdout] | [INFO] [stdout] 71 | to_remove_hash.push(conf_hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*conf_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/mempool.rs:85:34 [INFO] [stdout] | [INFO] [stdout] 85 | self.transactions.insert(tran.hash.clone(), tran.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mempool.rs:90:43 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn remove_trans(&mut self, trans: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 90 - pub fn remove_trans(&mut self, trans: &Vec) { [INFO] [stdout] 90 + pub fn remove_trans(&mut self, trans: &[H256]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/mempool.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if let Some(_) = self.transactions.get(&hash) { [INFO] [stdout] | -------^^^^^^^------------------------------- help: try: `if self.transactions.get(&hash).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mempool.rs:92:52 [INFO] [stdout] | [INFO] [stdout] 92 | if let Some(_) = self.transactions.get(&hash) { [INFO] [stdout] | ^^^^^ help: change this to: `hash` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mempool.rs:93:43 [INFO] [stdout] | [INFO] [stdout] 93 | self.remove_tran_internel(&hash); [INFO] [stdout] | ^^^^^ help: change this to: `hash` [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/mempool.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | return self.dandelion_buffer.contains_key(hash); [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] 109 - return self.dandelion_buffer.contains_key(hash); [INFO] [stdout] 109 + self.dandelion_buffer.contains_key(hash) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return self.dandelion_buffer.remove(hash); [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] 113 - return self.dandelion_buffer.remove(hash); [INFO] [stdout] 113 + self.dandelion_buffer.remove(hash) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `State` [INFO] [stdout] --> src/block.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | / pub fn new() -> Self { [INFO] [stdout] 65 | | let map: HashMap<(H256, u32), (u64, H160)> = HashMap::new(); [INFO] [stdout] 66 | | Self(map) [INFO] [stdout] 67 | | } [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] 63 + impl Default for State { [INFO] [stdout] 64 + fn default() -> Self { [INFO] [stdout] 65 + Self::new() [INFO] [stdout] 66 + } [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | return self.0.remove(key); [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] 74 - return self.0.remove(key); [INFO] [stdout] 74 + self.0.remove(key) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | return self.0.contains_key(key); [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] 78 - return self.0.contains_key(key); [INFO] [stdout] 78 + self.0.contains_key(key) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | return self.0.get(key); [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] 82 - return self.0.get(key); [INFO] [stdout] 82 + self.0.get(key) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mempool.rs:148:37 [INFO] [stdout] | [INFO] [stdout] 148 | pub fn get_trans(&self, hashes: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 148 - pub fn get_trans(&self, hashes: &Vec) -> Vec { [INFO] [stdout] 148 + pub fn get_trans(&self, hashes: &[H256]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/block.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | return (coins, balance); [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] 98 - return (coins, balance); [INFO] [stdout] 98 + (coins, balance) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:94:43 [INFO] [stdout] | [INFO] [stdout] 94 | coins.insert(TxInput::new(tran_hash.clone(), *index), *val); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*tran_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | self.hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | self.hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: unneeded `return` statement [INFO] [stdout] --> src/block.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | return Some(state); [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] 221 - return Some(state); [INFO] [stdout] 221 + Some(state) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:184:27 [INFO] [stdout] | [INFO] [stdout] 184 | state.insert((coinbase_tran.hash.clone(), 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `coinbase_tran.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: this loop could be written as a `for` loop [INFO] [stdout] --> src/block.rs:191:9 [INFO] [stdout] | [INFO] [stdout] 191 | while let Some(tran) = trans_iter.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for tran in trans_iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/transaction_generator.rs:154:65 [INFO] [stdout] | [INFO] [stdout] 154 | let sleep_itv = time::Duration::from_millis(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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:211:31 [INFO] [stdout] | [INFO] [stdout] 211 | state.insert((tran.hash.clone(), index as u32), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | self.hash = hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/transaction_generator.rs:174:45 [INFO] [stdout] | [INFO] [stdout] 174 | let vec_hash = vec![tran.hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:238:35 [INFO] [stdout] | [INFO] [stdout] 238 | hash: hex::encode(&b.hash), [INFO] [stdout] | ^^^^^^^ help: change this to: `b.hash` [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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/transaction_generator.rs:197:33 [INFO] [stdout] | [INFO] [stdout] 197 | return Some(addr.clone()); [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:239:42 [INFO] [stdout] | [INFO] [stdout] 239 | parent_hash: hex::encode(&b.header.parent), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `b.header.parent` [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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:242:41 [INFO] [stdout] | [INFO] [stdout] 242 | difficulty: hex::encode(&b.header.difficulty), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `b.header.difficulty` [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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Peers` [INFO] [stdout] --> src/peers.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self {addrs: HashSet::new(), info_map: HashMap::new()} [INFO] [stdout] 15 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for Peers { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/block.rs:244:42 [INFO] [stdout] | [INFO] [stdout] 244 | merkle_root: hex::encode(&b.header.merkle_root), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `b.header.merkle_root` [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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/peers.rs:18:27 [INFO] [stdout] | [INFO] [stdout] 18 | self.addrs.insert(addr.clone()); [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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | parent: parent.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/peers.rs:19:30 [INFO] [stdout] | [INFO] [stdout] 19 | self.info_map.insert(addr.clone(), (pub_key, port)); [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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:258:25 [INFO] [stdout] | [INFO] [stdout] 258 | difficulty: difficulty.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*difficulty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:260:26 [INFO] [stdout] | [INFO] [stdout] 260 | merkle_root: merkle_root.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*merkle_root` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/peers.rs:33:25 [INFO] [stdout] | [INFO] [stdout] 33 | .map(|addr|(addr.clone(), [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: you should consider adding a `Default` implementation for `Content` [INFO] [stdout] --> src/block.rs:280:5 [INFO] [stdout] | [INFO] [stdout] 280 | / pub fn new() -> Self { [INFO] [stdout] 281 | | Self { [INFO] [stdout] 282 | | trans: Vec::::new(), [INFO] [stdout] 283 | | } [INFO] [stdout] 284 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 279 + impl Default for Content { [INFO] [stdout] 280 + fn default() -> Self { [INFO] [stdout] 281 + Self::new() [INFO] [stdout] 282 + } [INFO] [stdout] 283 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/block.rs:286:34 [INFO] [stdout] | [INFO] [stdout] 286 | pub fn new_with_trans(trans: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 286 ~ pub fn new_with_trans(trans: &[SignedTransaction]) -> Self { [INFO] [stdout] 287 | Self { [INFO] [stdout] 288 ~ trans: trans.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/spread.rs:21:73 [INFO] [stdout] | [INFO] [stdout] 21 | fn spread(&mut self, peers: &slab::Slab, peer_index: &Vec, msg: Message, src_peer_key: Option); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `&[usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/block.rs:310:39 [INFO] [stdout] | [INFO] [stdout] 310 | pub fn from_content_vec(contents: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 310 - pub fn from_content_vec(contents: &Vec) -> Vec { [INFO] [stdout] 310 + pub fn from_content_vec(contents: &[Content]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/spread.rs:41:68 [INFO] [stdout] | [INFO] [stdout] 41 | ...ol>>, handle: ServerHandle) -> (MessageTimer, Arc>>, Context) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/spread.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | return (timer, guard_map, context); [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] 47 - return (timer, guard_map, context); [INFO] [stdout] 47 + (timer, guard_map, context) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/spread.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | / match self.receiver.recv() { [INFO] [stdout] 61 | | Ok(task) => { [INFO] [stdout] 62 | | match task { [INFO] [stdout] 63 | | TimerTask::PeerWrite(nano, handle, msg) => { [INFO] [stdout] ... | [INFO] [stdout] 99 | | _ => {} [INFO] [stdout] 100 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 ~ if let Ok(task) = self.receiver.recv() { [INFO] [stdout] 61 + match task { [INFO] [stdout] 62 + TimerTask::PeerWrite(nano, handle, msg) => { [INFO] [stdout] 63 + handle.write(msg); [INFO] [stdout] 64 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 65 + } [INFO] [stdout] 66 + TimerTask::DandelionResetEpoch(nano, target_index) => { [INFO] [stdout] 67 + *target_index.lock().unwrap() = usize::max_value(); [INFO] [stdout] 68 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 69 + } [INFO] [stdout] 70 + TimerTask::DandelionPlusResetEpoch(nano, routing_table) => { [INFO] [stdout] 71 + routing_table.lock().unwrap().clear(); [INFO] [stdout] 72 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 73 + } [INFO] [stdout] 74 + TimerTask::DandelionPlusFailSafeCheck(nano, tx_hashes) => { [INFO] [stdout] 75 + let mut mempool = self.mempool.lock().unwrap(); [INFO] [stdout] 76 + let mut new_hashes = Vec::new(); [INFO] [stdout] 77 + for hash in tx_hashes.iter() { [INFO] [stdout] 78 + match mempool.remove_buffered_tran(hash) { [INFO] [stdout] 79 + Some(tran) => { [INFO] [stdout] 80 + if mempool.exist(&tran.hash) { [INFO] [stdout] 81 + // source of this transaction [INFO] [stdout] 82 + new_hashes.push(tran.hash()); [INFO] [stdout] 83 + } else if mempool.add_with_check(&tran) { [INFO] [stdout] 84 + new_hashes.push(tran.hash()); [INFO] [stdout] 85 + } [INFO] [stdout] 86 + } [INFO] [stdout] 87 + _ => {} [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] 90 + drop(mempool); [INFO] [stdout] 91 + if new_hashes.len() > 0 { [INFO] [stdout] 92 + self.server.broadcast(Message::NewTransactionHashes(new_hashes), None); [INFO] [stdout] 93 + } [INFO] [stdout] 94 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 95 + } [INFO] [stdout] 96 + } [INFO] [stdout] 97 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/spread.rs:68:61 [INFO] [stdout] | [INFO] [stdout] 68 | ... *target_index.lock().unwrap() = usize::max_value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 68 - *target_index.lock().unwrap() = usize::max_value(); [INFO] [stdout] 68 + *target_index.lock().unwrap() = usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/spread.rs:79:33 [INFO] [stdout] | [INFO] [stdout] 79 | / ... match mempool.remove_buffered_tran(hash) { [INFO] [stdout] 80 | | ... Some(tran) => { [INFO] [stdout] 81 | | ... if mempool.exist(&tran.hash) { [INFO] [stdout] ... | [INFO] [stdout] 88 | | ... _ => {} [INFO] [stdout] 89 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ if let Some(tran) = mempool.remove_buffered_tran(hash) { [INFO] [stdout] 80 + if mempool.exist(&tran.hash) { [INFO] [stdout] 81 + // source of this transaction [INFO] [stdout] 82 + new_hashes.push(tran.hash()); [INFO] [stdout] 83 + } else if mempool.add_with_check(&tran) { [INFO] [stdout] 84 + new_hashes.push(tran.hash()); [INFO] [stdout] 85 + } [INFO] [stdout] 86 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/spread.rs:92:32 [INFO] [stdout] | [INFO] [stdout] 92 | ... if new_hashes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_hashes.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 a legacy numeric method [INFO] [stdout] --> src/spread.rs:211:47 [INFO] [stdout] | [INFO] [stdout] 211 | target_index: Arc::new(Mutex::new(usize::max_value())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 211 - target_index: Arc::new(Mutex::new(usize::max_value())), [INFO] [stdout] 211 + target_index: Arc::new(Mutex::new(usize::MAX)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/spread.rs:254:31 [INFO] [stdout] | [INFO] [stdout] 254 | } else if peer_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!peer_list.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: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/spread.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | / if rand_num < self.is_diffuser_prob { [INFO] [stdout] 305 | | self.is_diffuser = true; [INFO] [stdout] 306 | | } else { [INFO] [stdout] 307 | | self.is_diffuser = false; [INFO] [stdout] 308 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `self.is_diffuser = rand_num < self.is_diffuser_prob;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:445:42 [INFO] [stdout] | [INFO] [stdout] 445 | assert!(state.contains_key(&(signed_coinbase_tran.hash.clone(), 0))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, H160)` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:446:25 [INFO] [stdout] | [INFO] [stdout] 446 | let value = state.get(&(signed_coinbase_tran.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*state.get(&(signed_coinbase_tran.hash.clone(), 0)).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:446:37 [INFO] [stdout] | [INFO] [stdout] 446 | let value = state.get(&(signed_coinbase_tran.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran.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: this `if` has identical blocks [INFO] [stdout] --> src/spread.rs:363:53 [INFO] [stdout] | [INFO] [stdout] 363 | if mempool.exist(&t.hash()) { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 364 | | new_hashes.push(t.hash()); [INFO] [stdout] 365 | | } else if mempool.add_with_check(t) { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/spread.rs:365:61 [INFO] [stdout] | [INFO] [stdout] 365 | } else if mempool.add_with_check(t) { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 366 | | new_hashes.push(t.hash()); [INFO] [stdout] 367 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:447:42 [INFO] [stdout] | [INFO] [stdout] 447 | assert_eq!((COINBASE_REWARD, addr_1.clone()), value); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `addr_1` [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 assertion is always `false` [INFO] [stdout] --> src/block.rs:449:13 [INFO] [stdout] | [INFO] [stdout] 449 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:458:42 [INFO] [stdout] | [INFO] [stdout] 458 | assert!(state.contains_key(&(signed_coinbase_tran.hash.clone(), 0))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/spread.rs:380:41 [INFO] [stdout] | [INFO] [stdout] 380 | ... hashes.push(t.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, H160)` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:459:25 [INFO] [stdout] | [INFO] [stdout] 459 | let value = state.get(&(signed_coinbase_tran.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*state.get(&(signed_coinbase_tran.hash.clone(), 0)).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/spread.rs:384:24 [INFO] [stdout] | [INFO] [stdout] 384 | if hashes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!hashes.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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:459:37 [INFO] [stdout] | [INFO] [stdout] 459 | let value = state.get(&(signed_coinbase_tran.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:460:42 [INFO] [stdout] | [INFO] [stdout] 460 | assert_eq!((COINBASE_REWARD, addr_1.clone()), value); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `addr_1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:461:42 [INFO] [stdout] | [INFO] [stdout] 461 | assert!(state.contains_key(&(signed_coinbase_tran_2.hash.clone(), 0))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran_2.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, H160)` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:462:25 [INFO] [stdout] | [INFO] [stdout] 462 | let value = state.get(&(signed_coinbase_tran_2.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*state.get(&(signed_coinbase_tran_2.hash.clone(), 0)).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:462:37 [INFO] [stdout] | [INFO] [stdout] 462 | let value = state.get(&(signed_coinbase_tran_2.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran_2.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:463:42 [INFO] [stdout] | [INFO] [stdout] 463 | assert_eq!((COINBASE_REWARD, addr_1.clone()), value); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `addr_1` [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 assertion is always `false` [INFO] [stdout] --> src/block.rs:465:13 [INFO] [stdout] | [INFO] [stdout] 465 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:471:42 [INFO] [stdout] | [INFO] [stdout] 471 | let txinput = TxInput {pre_hash: signed_coinbase_tran_2.hash.clone(), index: 0}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran_2.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:480:43 [INFO] [stdout] | [INFO] [stdout] 480 | assert!(!state.contains_key(&(signed_coinbase_tran_2.hash.clone(), 0))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran_2.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:481:42 [INFO] [stdout] | [INFO] [stdout] 481 | assert!(state.contains_key(&(valid_tran.hash.clone(), 0))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valid_tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:482:42 [INFO] [stdout] | [INFO] [stdout] 482 | assert!(state.contains_key(&(valid_tran.hash.clone(), 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valid_tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, H160)` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:483:25 [INFO] [stdout] | [INFO] [stdout] 483 | let value = state.get(&(valid_tran.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*state.get(&(valid_tran.hash.clone(), 0)).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:483:37 [INFO] [stdout] | [INFO] [stdout] 483 | let value = state.get(&(valid_tran.hash.clone(), 0)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valid_tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, H160)` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:485:25 [INFO] [stdout] | [INFO] [stdout] 485 | let value = state.get(&(valid_tran.hash.clone(), 1)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*state.get(&(valid_tran.hash.clone(), 1)).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:485:37 [INFO] [stdout] | [INFO] [stdout] 485 | let value = state.get(&(valid_tran.hash.clone(), 1)).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `valid_tran.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: this assertion is always `false` [INFO] [stdout] --> src/block.rs:488:13 [INFO] [stdout] | [INFO] [stdout] 488 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:494:42 [INFO] [stdout] | [INFO] [stdout] 494 | let txinput = TxInput {pre_hash: signed_coinbase_tran_2.hash.clone(), index: 0}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran_2.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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/block.rs:501:16 [INFO] [stdout] | [INFO] [stdout] 501 | if let Some(_) = non_state { [INFO] [stdout] | -------^^^^^^^------------ help: try: `if non_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:206:28 [INFO] [stdout] | [INFO] [stdout] 206 | let mut new_node = nodes_addr[0].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nodes_addr[0]` [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 assertion is always `false` [INFO] [stdout] --> src/block.rs:502:13 [INFO] [stdout] | [INFO] [stdout] 502 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:509:42 [INFO] [stdout] | [INFO] [stdout] 509 | let txinput = TxInput {pre_hash: signed_coinbase_tran_2.hash.clone(), index: 0}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `signed_coinbase_tran_2.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:222:62 [INFO] [stdout] | [INFO] [stdout] 222 | ... let (server_ctx, server, spreader_ctx) = server::new(addr.clone(), msg_tx, spread::Spreader::Default, mempool.clone()).unwrap(); [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/block.rs:516:16 [INFO] [stdout] | [INFO] [stdout] 516 | if let Some(_) = non_state { [INFO] [stdout] | -------^^^^^^^------------ help: try: `if non_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/block.rs:517:13 [INFO] [stdout] | [INFO] [stdout] 517 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/block.rs:530:16 [INFO] [stdout] | [INFO] [stdout] 530 | if let Some(_) = non_state { [INFO] [stdout] | -------^^^^^^^------------ help: try: `if non_state.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/block.rs:531:13 [INFO] [stdout] | [INFO] [stdout] 531 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:548:50 [INFO] [stdout] | [INFO] [stdout] 548 | assert!(coins.contains_key(&TxInput::new(h256_1.clone(), 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `h256_1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:549:50 [INFO] [stdout] | [INFO] [stdout] 549 | assert!(coins.contains_key(&TxInput::new(h256_3.clone(), 11))); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `h256_3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/block.rs:552:50 [INFO] [stdout] | [INFO] [stdout] 552 | assert!(coins.contains_key(&TxInput::new(h256_2.clone(), 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `h256_2` [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: you should consider adding a `Default` implementation for `Blockchain` [INFO] [stdout] --> src/blockchain.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self { [INFO] [stdout] 21 | | let genesis = Block::genesis(); [INFO] [stdout] 22 | | let genesis_hash = genesis.hash.clone(); [INFO] [stdout] 23 | | let difficulty = genesis.header.difficulty.clone(); [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 18 + impl Default for Blockchain { [INFO] [stdout] 19 + fn default() -> Self { [INFO] [stdout] 20 + Self::new() [INFO] [stdout] 21 + } [INFO] [stdout] 22 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | let genesis_hash = genesis.hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | let difficulty = genesis.header.difficulty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `genesis.header.difficulty` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/api/mod.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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] 32 | 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/api/mod.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | #[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_EstimatorRes` [INFO] [stdout] 38 | struct EstimatorRes { [INFO] [stdout] | ------------ `EstimatorRes` 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/block.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | #[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] 15 | 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/block.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | #[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] 15 | 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: unneeded `return` statement [INFO] [stdout] --> src/blockchain.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | return self.insert(block); [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] 48 - return self.insert(block); [INFO] [stdout] 48 + self.insert(block) [INFO] [stdout] | [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/block.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableBlock` [INFO] [stdout] 23 | pub struct PrintableBlock { [INFO] [stdout] | -------------- `PrintableBlock` 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: unneeded `return` statement [INFO] [stdout] --> src/blockchain.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | 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] 95 - return true; [INFO] [stdout] 95 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:60:40 [INFO] [stdout] | [INFO] [stdout] 60 | self.states.insert(block.hash.clone(), new_state); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:68:41 [INFO] [stdout] | [INFO] [stdout] 68 | self.longest_hash = b.hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/block.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableBlock` [INFO] [stdout] 23 | pub struct PrintableBlock { [INFO] [stdout] | -------------- `PrintableBlock` 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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:71:39 [INFO] [stdout] | [INFO] [stdout] 71 | let new_parent_hash = b.hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:75:36 [INFO] [stdout] | [INFO] [stdout] 75 | self.blocks.insert(b.hash.clone(), b); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/block.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | #[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] 34 | 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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:81:37 [INFO] [stdout] | [INFO] [stdout] 81 | self.orphans.insert(b.hash.clone(), b.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:88:48 [INFO] [stdout] | [INFO] [stdout] 88 | let parent_hash_copy = parent_hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*parent_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/block.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | #[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] 34 | 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/block.rs:42:10 [INFO] [stdout] | [INFO] [stdout] 42 | #[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] 43 | 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/block.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | #[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] 43 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/blockchain.rs:119:41 [INFO] [stdout] | [INFO] [stdout] 119 | while self.orphans.contains_key(&cur) { [INFO] [stdout] | ^^^^ help: change this to: `cur` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/block.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableContent` [INFO] [stdout] 48 | pub struct PrintableContent { [INFO] [stdout] | ---------------- `PrintableContent` 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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:122:14 [INFO] [stdout] | [INFO] [stdout] 122 | Some(cur.clone()) [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*cur` [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/blockchain.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return block.try_generate_state(parent_state); [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] 131 - return block.try_generate_state(parent_state); [INFO] [stdout] 131 + block.try_generate_state(parent_state) [INFO] [stdout] | [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/block.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableContent` [INFO] [stdout] 48 | pub struct PrintableContent { [INFO] [stdout] | ---------------- `PrintableContent` 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: unneeded `return` statement [INFO] [stdout] --> src/blockchain.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | return false; [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] 143 - return false; [INFO] [stdout] 143 + false [INFO] [stdout] | [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/block.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableState` [INFO] [stdout] 57 | pub struct PrintableState { [INFO] [stdout] | -------------- `PrintableState` 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/block.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableState` [INFO] [stdout] 57 | pub struct PrintableState { [INFO] [stdout] | -------------- `PrintableState` 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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | self.longest_hash.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.longest_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | self.difficulty.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.difficulty` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/crypto/hash.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[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] 13 | 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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/blockchain.rs:172:38 [INFO] [stdout] | [INFO] [stdout] 172 | pub fn get_blocks(&self, hashes: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 172 - pub fn get_blocks(&self, hashes: &Vec) -> Vec { [INFO] [stdout] 172 + pub fn get_blocks(&self, hashes: &[H256]) -> Vec { [INFO] [stdout] | [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/crypto/hash.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[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] 13 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/blockchain.rs:175:46 [INFO] [stdout] | [INFO] [stdout] 175 | if let Some(b) = self.blocks.get(&h) { [INFO] [stdout] | ^^ help: change this to: `h` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/crypto/hash.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | #[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_H160` [INFO] [stdout] 17 | pub struct H160([u8; 20]); // H160 (address) [INFO] [stdout] | ---- `H160` 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/blockchain.rs:177:54 [INFO] [stdout] | [INFO] [stdout] 177 | } else if let Some(b) = self.orphans.get(&h) { [INFO] [stdout] | ^^ help: change this to: `h` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/crypto/hash.rs:16:36 [INFO] [stdout] | [INFO] [stdout] 16 | #[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_H160` [INFO] [stdout] 17 | pub struct H160([u8; 20]); // H160 (address) [INFO] [stdout] | ---- `H160` 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: manual implementation of `Option::map` [INFO] [stdout] --> src/blockchain.rs:188:16 [INFO] [stdout] | [INFO] [stdout] 188 | } else if let Some(b) = self.orphans.get(hash) { [INFO] [stdout] | ________________^ [INFO] [stdout] 189 | | Some(b.clone()) [INFO] [stdout] 190 | | } else { [INFO] [stdout] 191 | | None [INFO] [stdout] 192 | | } [INFO] [stdout] | |_________^ help: try: `{ self.orphans.get(hash).map(|b| b.clone()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:203:24 [INFO] [stdout] | [INFO] [stdout] 203 | cur_hash = cur_block.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cur_block.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/network/message.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Message` [INFO] [stdout] 9 | 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:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Message` [INFO] [stdout] 9 | 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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:245:24 [INFO] [stdout] | [INFO] [stdout] 245 | cur_hash = cur_block.header.parent.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cur_block.header.parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:253:27 [INFO] [stdout] | [INFO] [stdout] 253 | self.difficulty = difficulty.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*difficulty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/blockchain.rs:258:9 [INFO] [stdout] | [INFO] [stdout] 258 | / self.blocks.get(&self.longest_hash) [INFO] [stdout] 259 | | .unwrap().header.difficulty.clone() [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 258 ~ self.blocks.get(&self.longest_hash) [INFO] [stdout] 259 + .unwrap().header.difficulty [INFO] [stdout] | [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/transaction.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 13 | 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/transaction.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 13 | pub struct SignedTransaction { [INFO] [stdout] | ----------------- `SignedTransaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/transaction.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 21 | 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/transaction.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 21 | 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/transaction.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableTransaction` [INFO] [stdout] 28 | pub struct PrintableTransaction { [INFO] [stdout] | -------------------- `PrintableTransaction` 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/transaction.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableTransaction` [INFO] [stdout] 28 | pub struct PrintableTransaction { [INFO] [stdout] | -------------------- `PrintableTransaction` 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/transaction.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_TxInput` [INFO] [stdout] 37 | pub struct TxInput { [INFO] [stdout] | ------- `TxInput` 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/transaction.rs:36:36 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_TxInput` [INFO] [stdout] 37 | pub struct TxInput { [INFO] [stdout] | ------- `TxInput` 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/transaction.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_TxOutput` [INFO] [stdout] 43 | pub struct TxOutput { [INFO] [stdout] | -------- `TxOutput` 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/transaction.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_TxOutput` [INFO] [stdout] 43 | pub struct TxOutput { [INFO] [stdout] | -------- `TxOutput` 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/transaction.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableTxInput` [INFO] [stdout] 49 | pub struct PrintableTxInput { [INFO] [stdout] | ---------------- `PrintableTxInput` 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/transaction.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableTxInput` [INFO] [stdout] 49 | pub struct PrintableTxInput { [INFO] [stdout] | ---------------- `PrintableTxInput` 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/transaction.rs:54:10 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableTxOutput` [INFO] [stdout] 55 | pub struct PrintableTxOutput { [INFO] [stdout] | ----------------- `PrintableTxOutput` 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/transaction.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableTxOutput` [INFO] [stdout] 55 | pub struct PrintableTxOutput { [INFO] [stdout] | ----------------- `PrintableTxOutput` 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: the loop variable `i` is used to index `arr` [INFO] [stdout] --> src/crypto/hash.rs:226:18 [INFO] [stdout] | [INFO] [stdout] 226 | for i in 0..32 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 226 - for i in 0..32 { [INFO] [stdout] 226 + for (i, ) in arr.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:35:21 [INFO] [stdout] | [INFO] [stdout] 35 | Node {hash: self.hash.clone(), left: None, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/crypto/merkle.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if nodes.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `!nodes.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `crypto::hash::H256` [INFO] [stdout] --> src/crypto/merkle.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | self.root.hash.into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.root.hash` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/crypto/merkle.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / match *node { [INFO] [stdout] 92 | | Node {hash: _, is_leaf: _, index, [INFO] [stdout] 93 | | left: Some(ref left), right: Some(ref right)} => { [INFO] [stdout] 94 | | if idx < index { [INFO] [stdout] ... | [INFO] [stdout] 102 | | _ => {} [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 91 ~ if let Node {hash: _, is_leaf: _, index, [INFO] [stdout] 92 + left: Some(ref left), right: Some(ref right)} = *node { [INFO] [stdout] 93 + if idx < index { [INFO] [stdout] 94 + result.push(right.hash.clone()); [INFO] [stdout] 95 + self.trace_proof(idx, left, result); [INFO] [stdout] 96 + } else { [INFO] [stdout] 97 + result.push(left.hash.clone()); [INFO] [stdout] 98 + self.trace_proof(idx, right, result); [INFO] [stdout] 99 + } [INFO] [stdout] 100 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:95:33 [INFO] [stdout] | [INFO] [stdout] 95 | result.push(right.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `right.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:98:33 [INFO] [stdout] | [INFO] [stdout] 98 | result.push(left.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `left.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/crypto/merkle.rs:110:24 [INFO] [stdout] | [INFO] [stdout] 110 | let mut acc_hash = datum.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*datum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/crypto/merkle.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | acc_hash.concat_hash(h, bits % 2 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace with: `bits.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/crypto/merkle.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | bits = bits >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `bits >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/crypto/merkle.rs:328:17 [INFO] [stdout] | [INFO] [stdout] 328 | assert!(v.len() % 2 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `v.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/crypto/merkle.rs:331:17 [INFO] [stdout] | [INFO] [stdout] 331 | assert!(v.len() % 2 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `v.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `&[u8]` [INFO] [stdout] --> src/crypto/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] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/miner.rs:157:64 [INFO] [stdout] | [INFO] [stdout] 157 | 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] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/miner.rs:182:24 [INFO] [stdout] | [INFO] [stdout] 182 | let vec = vec![block.hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/miner.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | return false; [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] 232 - return false; [INFO] [stdout] 232 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/network/server.rs:72:24 [INFO] [stdout] | [INFO] [stdout] 72 | return Err(std::io::Error::new( [INFO] [stdout] | ________________________^ [INFO] [stdout] 73 | | std::io::ErrorKind::Other, [INFO] [stdout] 74 | | "max peer reached, cannot accept new connections", [INFO] [stdout] 75 | | )); [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 72 ~ return Err(std::io::Error::other( [INFO] [stdout] 73 ~ "max peer reached, cannot accept new connections", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/network/server.rs:280:49 [INFO] [stdout] | [INFO] [stdout] 280 | const INCOMING: mio::Token = mio::Token(std::usize::MAX - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 280 - const INCOMING: mio::Token = mio::Token(std::usize::MAX - 1); [INFO] [stdout] 280 + const INCOMING: mio::Token = mio::Token(usize::MAX - 1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/network/server.rs:289:48 [INFO] [stdout] | [INFO] [stdout] 289 | const CONTROL: mio::Token = mio::Token(std::usize::MAX - 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 289 - const CONTROL: mio::Token = mio::Token(std::usize::MAX - 2); [INFO] [stdout] 289 + const CONTROL: mio::Token = mio::Token(usize::MAX - 2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/network/worker.rs:31:1 [INFO] [stdout] | [INFO] [stdout] 31 | / pub fn new( [INFO] [stdout] 32 | | num_worker: usize, [INFO] [stdout] 33 | | msg_src: channel::Receiver<(Vec, peer::Handle)>, [INFO] [stdout] 34 | | server: ServerHandle, [INFO] [stdout] ... | [INFO] [stdout] 40 | | self_port: u16, [INFO] [stdout] 41 | | ) -> Context { [INFO] [stdout] | |____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | if to_get.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_get.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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:102:24 [INFO] [stdout] | [INFO] [stdout] 102 | if blocks.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:118:45 [INFO] [stdout] | [INFO] [stdout] 118 | ... new_hashes.push(b.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `b.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:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | if missing_parents.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!missing_parents.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:128:24 [INFO] [stdout] | [INFO] [stdout] 128 | if new_hashes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_hashes.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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:138:56 [INFO] [stdout] | [INFO] [stdout] 138 | ... mempool.insert_ts_and_addr(h.clone(), peer.addr.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:138:67 [INFO] [stdout] | [INFO] [stdout] 138 | ... mempool.insert_ts_and_addr(h.clone(), peer.addr.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer.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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:144:24 [INFO] [stdout] | [INFO] [stdout] 144 | if to_get.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_get.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: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:154:66 [INFO] [stdout] | [INFO] [stdout] 154 | ... mempool.insert_ts_and_addr(t.hash(), peer.addr.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer.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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:165:24 [INFO] [stdout] | [INFO] [stdout] 165 | if trans.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!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: length comparison to zero [INFO] [stdout] --> src/network/worker.rs:180:24 [INFO] [stdout] | [INFO] [stdout] 180 | if new_hashes.len() > 0 && !self.supernode { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_hashes.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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/network/worker.rs:190:36 [INFO] [stdout] | [INFO] [stdout] 190 | let addr = info.0.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `info.0` [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:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | if new_peers.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_peers.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 a legacy numeric method [INFO] [stdout] --> src/network/estimator.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | let mut earliest = i64::max_value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 14 - let mut earliest = i64::max_value(); [INFO] [stdout] 14 + let mut earliest = i64::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:21:26 [INFO] [stdout] | [INFO] [stdout] 21 | res_ip = ip.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:25:44 [INFO] [stdout] | [INFO] [stdout] 25 | map_data.insert(trans.clone(), res_ip.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `res_ip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/network/estimator.rs:29:26 [INFO] [stdout] | [INFO] [stdout] 29 | estimator(&map_data, &info_map, n) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `info_map` [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: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:58:29 [INFO] [stdout] | [INFO] [stdout] 58 | ip2count.insert(ip.clone(), 1); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*ip` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:59:36 [INFO] [stdout] | [INFO] [stdout] 59 | input_match_map.insert(addr.clone(), ip2count); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:114:33 [INFO] [stdout] | [INFO] [stdout] 114 | transactions.insert(trans.hash.clone(), trans.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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | timestamp_map.insert(trans.hash.clone(), vec![(addr.clone(), trans.transaction.ts as i64)]); [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: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network/estimator.rs:116:60 [INFO] [stdout] | [INFO] [stdout] 116 | timestamp_map.insert(trans.hash.clone(), vec![(addr.clone(), trans.transaction.ts as i64)]); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `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: redundant slicing of the whole range [INFO] [stdout] --> src/network/estimator.rs:120:41 [INFO] [stdout] | [INFO] [stdout] 120 | pub_key[..].copy_from_slice(&trans.public_key.clone().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `trans.public_key.clone().as_ref()` [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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/transaction.rs:61:30 [INFO] [stdout] | [INFO] [stdout] 61 | fn hash(&self) -> H256 { self.hash.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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/transaction.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 100 | if self.transaction.inputs.len() > 0 || [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.transaction.inputs.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 borrowed expression implements the required traits [INFO] [stdout] --> src/transaction.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | hash: hex::encode(&tx.hash), [INFO] [stdout] | ^^^^^^^^ help: change this to: `tx.hash` [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] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/transaction.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 190 | | Ok(_) => true, [INFO] [stdout] 191 | | _ => false [INFO] [stdout] 192 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 189 - match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 190 - Ok(_) => true, [INFO] [stdout] 191 - _ => false [INFO] [stdout] 192 - } [INFO] [stdout] 189 + matches!(EdDSAParameters.verify(pk, msg, sig), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/transaction.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 190 | | Ok(_) => true, [INFO] [stdout] 191 | | _ => false [INFO] [stdout] 192 | | } [INFO] [stdout] | |_____^ help: try: `EdDSAParameters.verify(pk, msg, sig).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/transaction.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 202 | | Ok(_) => true, [INFO] [stdout] 203 | | _ => false [INFO] [stdout] 204 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 201 - match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 202 - Ok(_) => true, [INFO] [stdout] 203 - _ => false [INFO] [stdout] 204 - } [INFO] [stdout] 201 + matches!(EdDSAParameters.verify(pk, msg, sig), Ok(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/transaction.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | / match EdDSAParameters.verify(pk, msg, sig) { [INFO] [stdout] 202 | | Ok(_) => true, [INFO] [stdout] 203 | | _ => false [INFO] [stdout] 204 | | } [INFO] [stdout] | |_____^ help: try: `EdDSAParameters.verify(pk, msg, sig).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/transaction.rs:262:47 [INFO] [stdout] | [INFO] [stdout] 262 | let txoutput = TxOutput {rec_address: h160.clone(), val: COINBASE_REWARD}; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `h160` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/transaction.rs:279:47 [INFO] [stdout] | [INFO] [stdout] 279 | let txoutput = TxOutput {rec_address: h160.clone(), val: COINBASE_REWARD}; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `h160` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/transaction.rs:286:47 [INFO] [stdout] | [INFO] [stdout] 286 | let txoutput = TxOutput {rec_address: h160.clone(), val: COINBASE_REWARD+1}; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `h160` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/transaction.rs:297:47 [INFO] [stdout] | [INFO] [stdout] 297 | let txoutput = TxOutput {rec_address: h160.clone(), val: COINBASE_REWARD}; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `h160` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/transaction.rs:309:45 [INFO] [stdout] | [INFO] [stdout] 309 | assert!(verify_with_origin_type(&t, &(key.public_key()), &signature)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `(key.public_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/transaction.rs:318:48 [INFO] [stdout] | [INFO] [stdout] 318 | assert!(!verify_with_origin_type(&t_2, &(key.public_key()), &signature)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `(key.public_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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/transaction.rs:319:46 [INFO] [stdout] | [INFO] [stdout] 319 | assert!(!verify_with_origin_type(&t, &(key_2.public_key()), &signature)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(key_2.public_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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/helper.rs:32:95 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn new_server_env(ipv4_addr: SocketAddr, spreader_type : Spreader, is_supernode: bool) -> (server::Handle, miner::Context, tra... [INFO] [stdout] | _______________________________________________________________________________________________^ [INFO] [stdout] 33 | | Arc>, Arc>, Arc>, [INFO] [stdout] 34 | | Arc) { [INFO] [stdout] | |_____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:96:45 [INFO] [stdout] | [INFO] [stdout] 96 | assert!(miner::mining_base(&mut header, difficulty.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*difficulty` [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/helper.rs:176:5 [INFO] [stdout] | [INFO] [stdout] 176 | return None; [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] 176 - return None; [INFO] [stdout] 176 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:169:39 [INFO] [stdout] | [INFO] [stdout] 169 | tx_outputs.push(TxOutput::new(rec_addr.clone(), transfer_val)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rec_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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:171:43 [INFO] [stdout] | [INFO] [stdout] 171 | tx_outputs.push(TxOutput::new(account.addr.clone(), acc-transfer_val)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `account.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: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | return SignedTransaction::new(tran, sig_bytes, pub_key_bytes); [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] 185 - return SignedTransaction::new(tran, sig_bytes, pub_key_bytes); [INFO] [stdout] 185 + SignedTransaction::new(tran, sig_bytes, pub_key_bytes) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/helper.rs:183:33 [INFO] [stdout] | [INFO] [stdout] 183 | let signature = sign(&tran, &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/helper.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | return generate_signed_transaction(key, Vec::new(), vec![txoutput]); [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] 191 - return generate_signed_transaction(key, Vec::new(), vec![txoutput]); [INFO] [stdout] 191 + generate_signed_transaction(key, Vec::new(), vec![txoutput]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:190:43 [INFO] [stdout] | [INFO] [stdout] 190 | let txoutput = TxOutput {rec_address: addr.clone(), val: COINBASE_REWARD}; [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/helper.rs:197:51 [INFO] [stdout] | [INFO] [stdout] 197 | let signature: Box<[u8]> = sign(&transaction, &key).as_ref().into(); [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: usage of a legacy numeric constant [INFO] [stdout] --> src/helper.rs:329:38 [INFO] [stdout] | [INFO] [stdout] 329 | let mut difficulty : [u8; 32] = [std::u8::MAX; 32]; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 329 - let mut difficulty : [u8; 32] = [std::u8::MAX; 32]; [INFO] [stdout] 329 + let mut difficulty : [u8; 32] = [u8::MAX; 32]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `difficulty` [INFO] [stdout] --> src/helper.rs:331:14 [INFO] [stdout] | [INFO] [stdout] 331 | for i in 0..32 { [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] 331 - for i in 0..32 { [INFO] [stdout] 331 + for in &mut difficulty { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:347:5 [INFO] [stdout] | [INFO] [stdout] 347 | return rng.gen_range(lo, hi+1); [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] 347 - return rng.gen_range(lo, hi+1); [INFO] [stdout] 347 + rng.gen_range(lo, hi+1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:354:5 [INFO] [stdout] | [INFO] [stdout] 354 | return peer_list_copy [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] 354 - return peer_list_copy [INFO] [stdout] 354 + peer_list_copy [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/helper.rs:350:43 [INFO] [stdout] | [INFO] [stdout] 350 | pub fn gen_shuffled_peer_list(peer_list : &Vec) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 350 - pub fn gen_shuffled_peer_list(peer_list : &Vec) -> Vec{ [INFO] [stdout] 350 + pub fn gen_shuffled_peer_list(peer_list : &[usize]) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:380:9 [INFO] [stdout] | [INFO] [stdout] 380 | return Some(map) [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] 380 - return Some(map) [INFO] [stdout] 380 + Some(map) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/helper.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | return None [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] 382 - return None [INFO] [stdout] 382 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/helper.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | / for line in lines { [INFO] [stdout] 372 | | if let Ok(l) = line { [INFO] [stdout] 373 | | let mut split_colon = l.split(":"); [INFO] [stdout] 374 | | let key = split_colon.next().unwrap().parse::().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 379 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/helper.rs:372:13 [INFO] [stdout] | [INFO] [stdout] 372 | / if let Ok(l) = line { [INFO] [stdout] 373 | | let mut split_colon = l.split(":"); [INFO] [stdout] 374 | | let key = split_colon.next().unwrap().parse::().unwrap(); [INFO] [stdout] 375 | | let neighbors: Vec = split_colon.next().unwrap() [INFO] [stdout] 376 | | .split(",").map(|x| x.parse::().unwrap()).collect(); [INFO] [stdout] 377 | | map.insert(key, neighbors); [INFO] [stdout] 378 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 371 ~ for l in lines.flatten() { [INFO] [stdout] 372 + let mut split_colon = l.split(":"); [INFO] [stdout] 373 + let key = split_colon.next().unwrap().parse::().unwrap(); [INFO] [stdout] 374 + let neighbors: Vec = split_colon.next().unwrap() [INFO] [stdout] 375 + .split(",").map(|x| x.parse::().unwrap()).collect(); [INFO] [stdout] 376 + map.insert(key, neighbors); [INFO] [stdout] 377 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/helper.rs:422:17 [INFO] [stdout] | [INFO] [stdout] 422 | assert!(!tran.is_some()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `tran.is_none()` [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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:414:22 [INFO] [stdout] | [INFO] [stdout] 414 | let h160_1 = account.addr.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `account.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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:427:22 [INFO] [stdout] | [INFO] [stdout] 427 | let h160_1 = account.addr.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `account.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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:436:60 [INFO] [stdout] | [INFO] [stdout] 436 | assert!(tran.transaction.inputs[0] == TxInput::new(h256_1.clone(), 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `h256_1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/helper.rs:437:62 [INFO] [stdout] | [INFO] [stdout] 437 | assert!(tran.transaction.outputs[0] == TxOutput::new(h160_2.clone(), 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `h160_2` [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: you should consider adding a `Default` implementation for `MemPool` [INFO] [stdout] --> src/mempool.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | Self { [INFO] [stdout] 24 | | transactions: HashMap::new(), [INFO] [stdout] 25 | | input_tran_map: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 20 + impl Default for MemPool { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return mempool; [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] 37 - return mempool; [INFO] [stdout] 37 + mempool [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mempool.rs:32:34 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn new_with_trans(trans: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub fn new_with_trans(trans: &Vec) -> Self { [INFO] [stdout] 32 + pub fn new_with_trans(trans: &[SignedTransaction]) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | return self.try_insert(tran); [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] 45 - return self.try_insert(tran); [INFO] [stdout] 45 + self.try_insert(tran) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/mempool.rs:49:38 [INFO] [stdout] | [INFO] [stdout] 49 | self.dandelion_buffer.insert(tran.hash.clone(), tran.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.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: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | 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] 86 - return true; [INFO] [stdout] 86 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/mempool.rs:71:41 [INFO] [stdout] | [INFO] [stdout] 71 | to_remove_hash.push(conf_hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*conf_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/mempool.rs:85:34 [INFO] [stdout] | [INFO] [stdout] 85 | self.transactions.insert(tran.hash.clone(), tran.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mempool.rs:90:43 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn remove_trans(&mut self, trans: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 90 - pub fn remove_trans(&mut self, trans: &Vec) { [INFO] [stdout] 90 + pub fn remove_trans(&mut self, trans: &[H256]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/mempool.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if let Some(_) = self.transactions.get(&hash) { [INFO] [stdout] | -------^^^^^^^------------------------------- help: try: `if self.transactions.get(&hash).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mempool.rs:92:52 [INFO] [stdout] | [INFO] [stdout] 92 | if let Some(_) = self.transactions.get(&hash) { [INFO] [stdout] | ^^^^^ help: change this to: `hash` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mempool.rs:93:43 [INFO] [stdout] | [INFO] [stdout] 93 | self.remove_tran_internel(&hash); [INFO] [stdout] | ^^^^^ help: change this to: `hash` [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/mempool.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | return self.dandelion_buffer.contains_key(hash); [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] 109 - return self.dandelion_buffer.contains_key(hash); [INFO] [stdout] 109 + self.dandelion_buffer.contains_key(hash) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mempool.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return self.dandelion_buffer.remove(hash); [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] 113 - return self.dandelion_buffer.remove(hash); [INFO] [stdout] 113 + self.dandelion_buffer.remove(hash) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mempool.rs:148:37 [INFO] [stdout] | [INFO] [stdout] 148 | pub fn get_trans(&self, hashes: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 148 - pub fn get_trans(&self, hashes: &Vec) -> Vec { [INFO] [stdout] 148 + pub fn get_trans(&self, hashes: &[H256]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/transaction_generator.rs:154:65 [INFO] [stdout] | [INFO] [stdout] 154 | let sleep_itv = time::Duration::from_millis(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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/transaction_generator.rs:174:45 [INFO] [stdout] | [INFO] [stdout] 174 | let vec_hash = vec![tran.hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tran.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/transaction_generator.rs:197:33 [INFO] [stdout] | [INFO] [stdout] 197 | return Some(addr.clone()); [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: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/transaction_generator.rs:214:37 [INFO] [stdout] | [INFO] [stdout] 214 | let vec_hash = vec![new_t.hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `new_t.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: redundant slicing of the whole range [INFO] [stdout] --> src/transaction_generator.rs:346:44 [INFO] [stdout] | [INFO] [stdout] 346 | bytes_pub_key1[..].copy_from_slice(&peer_key_pair1.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `peer_key_pair1.public_key().as_ref()` [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/transaction_generator.rs:348:44 [INFO] [stdout] | [INFO] [stdout] 348 | bytes_pub_key2[..].copy_from_slice(&peer_key_pair2.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `peer_key_pair2.public_key().as_ref()` [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/transaction_generator.rs:350:44 [INFO] [stdout] | [INFO] [stdout] 350 | bytes_pub_key3[..].copy_from_slice(&peer_key_pair3.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `peer_key_pair3.public_key().as_ref()` [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: you should consider adding a `Default` implementation for `Peers` [INFO] [stdout] --> src/peers.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self {addrs: HashSet::new(), info_map: HashMap::new()} [INFO] [stdout] 15 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for Peers { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/peers.rs:18:27 [INFO] [stdout] | [INFO] [stdout] 18 | self.addrs.insert(addr.clone()); [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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/peers.rs:19:30 [INFO] [stdout] | [INFO] [stdout] 19 | self.info_map.insert(addr.clone(), (pub_key, port)); [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: using `clone` on type `H160` which implements the `Copy` trait [INFO] [stdout] --> src/peers.rs:33:25 [INFO] [stdout] | [INFO] [stdout] 33 | .map(|addr|(addr.clone(), [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: redundant slicing of the whole range [INFO] [stdout] --> src/peers.rs:161:44 [INFO] [stdout] | [INFO] [stdout] 161 | bytes_pub_key1[..].copy_from_slice(&peer_key_pair1.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `peer_key_pair1.public_key().as_ref()` [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/peers.rs:163:44 [INFO] [stdout] | [INFO] [stdout] 163 | bytes_pub_key2[..].copy_from_slice(&peer_key_pair2.public_key().as_ref()[..]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the original value instead: `peer_key_pair2.public_key().as_ref()` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/spread.rs:21:73 [INFO] [stdout] | [INFO] [stdout] 21 | fn spread(&mut self, peers: &slab::Slab, peer_index: &Vec, msg: Message, src_peer_key: Option); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `&[usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/spread.rs:41:68 [INFO] [stdout] | [INFO] [stdout] 41 | ...ol>>, handle: ServerHandle) -> (MessageTimer, Arc>>, Context) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/spread.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | return (timer, guard_map, context); [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] 47 - return (timer, guard_map, context); [INFO] [stdout] 47 + (timer, guard_map, context) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/spread.rs:60:13 [INFO] [stdout] | [INFO] [stdout] 60 | / match self.receiver.recv() { [INFO] [stdout] 61 | | Ok(task) => { [INFO] [stdout] 62 | | match task { [INFO] [stdout] 63 | | TimerTask::PeerWrite(nano, handle, msg) => { [INFO] [stdout] ... | [INFO] [stdout] 99 | | _ => {} [INFO] [stdout] 100 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 ~ if let Ok(task) = self.receiver.recv() { [INFO] [stdout] 61 + match task { [INFO] [stdout] 62 + TimerTask::PeerWrite(nano, handle, msg) => { [INFO] [stdout] 63 + handle.write(msg); [INFO] [stdout] 64 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 65 + } [INFO] [stdout] 66 + TimerTask::DandelionResetEpoch(nano, target_index) => { [INFO] [stdout] 67 + *target_index.lock().unwrap() = usize::max_value(); [INFO] [stdout] 68 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 69 + } [INFO] [stdout] 70 + TimerTask::DandelionPlusResetEpoch(nano, routing_table) => { [INFO] [stdout] 71 + routing_table.lock().unwrap().clear(); [INFO] [stdout] 72 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 73 + } [INFO] [stdout] 74 + TimerTask::DandelionPlusFailSafeCheck(nano, tx_hashes) => { [INFO] [stdout] 75 + let mut mempool = self.mempool.lock().unwrap(); [INFO] [stdout] 76 + let mut new_hashes = Vec::new(); [INFO] [stdout] 77 + for hash in tx_hashes.iter() { [INFO] [stdout] 78 + match mempool.remove_buffered_tran(hash) { [INFO] [stdout] 79 + Some(tran) => { [INFO] [stdout] 80 + if mempool.exist(&tran.hash) { [INFO] [stdout] 81 + // source of this transaction [INFO] [stdout] 82 + new_hashes.push(tran.hash()); [INFO] [stdout] 83 + } else if mempool.add_with_check(&tran) { [INFO] [stdout] 84 + new_hashes.push(tran.hash()); [INFO] [stdout] 85 + } [INFO] [stdout] 86 + } [INFO] [stdout] 87 + _ => {} [INFO] [stdout] 88 + } [INFO] [stdout] 89 + } [INFO] [stdout] 90 + drop(mempool); [INFO] [stdout] 91 + if new_hashes.len() > 0 { [INFO] [stdout] 92 + self.server.broadcast(Message::NewTransactionHashes(new_hashes), None); [INFO] [stdout] 93 + } [INFO] [stdout] 94 + self.guard_map.lock().unwrap().remove(&nano); [INFO] [stdout] 95 + } [INFO] [stdout] 96 + } [INFO] [stdout] 97 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/spread.rs:68:61 [INFO] [stdout] | [INFO] [stdout] 68 | ... *target_index.lock().unwrap() = usize::max_value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 68 - *target_index.lock().unwrap() = usize::max_value(); [INFO] [stdout] 68 + *target_index.lock().unwrap() = usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/spread.rs:79:33 [INFO] [stdout] | [INFO] [stdout] 79 | / ... match mempool.remove_buffered_tran(hash) { [INFO] [stdout] 80 | | ... Some(tran) => { [INFO] [stdout] 81 | | ... if mempool.exist(&tran.hash) { [INFO] [stdout] ... | [INFO] [stdout] 88 | | ... _ => {} [INFO] [stdout] 89 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 79 ~ if let Some(tran) = mempool.remove_buffered_tran(hash) { [INFO] [stdout] 80 + if mempool.exist(&tran.hash) { [INFO] [stdout] 81 + // source of this transaction [INFO] [stdout] 82 + new_hashes.push(tran.hash()); [INFO] [stdout] 83 + } else if mempool.add_with_check(&tran) { [INFO] [stdout] 84 + new_hashes.push(tran.hash()); [INFO] [stdout] 85 + } [INFO] [stdout] 86 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/spread.rs:92:32 [INFO] [stdout] | [INFO] [stdout] 92 | ... if new_hashes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_hashes.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 a legacy numeric method [INFO] [stdout] --> src/spread.rs:211:47 [INFO] [stdout] | [INFO] [stdout] 211 | target_index: Arc::new(Mutex::new(usize::max_value())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 211 - target_index: Arc::new(Mutex::new(usize::max_value())), [INFO] [stdout] 211 + target_index: Arc::new(Mutex::new(usize::MAX)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/spread.rs:254:31 [INFO] [stdout] | [INFO] [stdout] 254 | } else if peer_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!peer_list.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: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/spread.rs:304:13 [INFO] [stdout] | [INFO] [stdout] 304 | / if rand_num < self.is_diffuser_prob { [INFO] [stdout] 305 | | self.is_diffuser = true; [INFO] [stdout] 306 | | } else { [INFO] [stdout] 307 | | self.is_diffuser = false; [INFO] [stdout] 308 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `self.is_diffuser = rand_num < self.is_diffuser_prob;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/spread.rs:363:53 [INFO] [stdout] | [INFO] [stdout] 363 | if mempool.exist(&t.hash()) { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 364 | | new_hashes.push(t.hash()); [INFO] [stdout] 365 | | } else if mempool.add_with_check(t) { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/spread.rs:365:61 [INFO] [stdout] | [INFO] [stdout] 365 | } else if mempool.add_with_check(t) { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 366 | | new_hashes.push(t.hash()); [INFO] [stdout] 367 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `H256` which implements the `Copy` trait [INFO] [stdout] --> src/spread.rs:380:41 [INFO] [stdout] | [INFO] [stdout] 380 | ... hashes.push(t.hash.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `t.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/spread.rs:384:24 [INFO] [stdout] | [INFO] [stdout] 384 | if hashes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!hashes.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/spread.rs:453:48 [INFO] [stdout] | [INFO] [stdout] 453 | fn check_mempools_total_size(mempool_list: &Vec>>, expect_size: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 453 - fn check_mempools_total_size(mempool_list: &Vec>>, expect_size: usize) { [INFO] [stdout] 453 + fn check_mempools_total_size(mempool_list: &[Arc>], expect_size: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/spread.rs:559:20 [INFO] [stdout] | [INFO] [stdout] 559 | assert_eq!(usize::max_value(), *dandelion_sreapder.target_index.lock().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 559 - assert_eq!(usize::max_value(), *dandelion_sreapder.target_index.lock().unwrap()); [INFO] [stdout] 559 + assert_eq!(usize::MAX, *dandelion_sreapder.target_index.lock().unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:206:28 [INFO] [stdout] | [INFO] [stdout] 206 | let mut new_node = nodes_addr[0].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nodes_addr[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:222:62 [INFO] [stdout] | [INFO] [stdout] 222 | ... let (server_ctx, server, spreader_ctx) = server::new(addr.clone(), msg_tx, spread::Spreader::Default, mempool.clone()).unwrap(); [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/api/mod.rs:31:10 [INFO] [stdout] | [INFO] [stdout] 31 | #[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] 32 | 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/api/mod.rs:37:10 [INFO] [stdout] | [INFO] [stdout] 37 | #[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_EstimatorRes` [INFO] [stdout] 38 | struct EstimatorRes { [INFO] [stdout] | ------------ `EstimatorRes` 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/block.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | #[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] 15 | 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/block.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | #[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] 15 | 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/block.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableBlock` [INFO] [stdout] 23 | pub struct PrintableBlock { [INFO] [stdout] | -------------- `PrintableBlock` 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/block.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableBlock` [INFO] [stdout] 23 | pub struct PrintableBlock { [INFO] [stdout] | -------------- `PrintableBlock` 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/block.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | #[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] 34 | 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/block.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | #[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] 34 | 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/block.rs:42:10 [INFO] [stdout] | [INFO] [stdout] 42 | #[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] 43 | 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/block.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | #[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] 43 | 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/block.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableContent` [INFO] [stdout] 48 | pub struct PrintableContent { [INFO] [stdout] | ---------------- `PrintableContent` 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/block.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableContent` [INFO] [stdout] 48 | pub struct PrintableContent { [INFO] [stdout] | ---------------- `PrintableContent` 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/block.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableState` [INFO] [stdout] 57 | pub struct PrintableState { [INFO] [stdout] | -------------- `PrintableState` 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/block.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableState` [INFO] [stdout] 57 | pub struct PrintableState { [INFO] [stdout] | -------------- `PrintableState` 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/crypto/hash.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[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] 13 | 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/crypto/hash.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[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] 13 | 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/crypto/hash.rs:16:25 [INFO] [stdout] | [INFO] [stdout] 16 | #[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_H160` [INFO] [stdout] 17 | pub struct H160([u8; 20]); // H160 (address) [INFO] [stdout] | ---- `H160` 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/crypto/hash.rs:16:36 [INFO] [stdout] | [INFO] [stdout] 16 | #[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_H160` [INFO] [stdout] 17 | pub struct H160([u8; 20]); // H160 (address) [INFO] [stdout] | ---- `H160` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/network/message.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Message` [INFO] [stdout] 9 | 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:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | #[derive(Serialize, Deserialize, Debug, Clone)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Message` [INFO] [stdout] 9 | 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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/transaction.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 13 | 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/transaction.rs:12:36 [INFO] [stdout] | [INFO] [stdout] 12 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 13 | pub struct SignedTransaction { [INFO] [stdout] | ----------------- `SignedTransaction` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/transaction.rs:20:25 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 21 | 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/transaction.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [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] 21 | 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/transaction.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableTransaction` [INFO] [stdout] 28 | pub struct PrintableTransaction { [INFO] [stdout] | -------------------- `PrintableTransaction` 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/transaction.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableTransaction` [INFO] [stdout] 28 | pub struct PrintableTransaction { [INFO] [stdout] | -------------------- `PrintableTransaction` 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/transaction.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_TxInput` [INFO] [stdout] 37 | pub struct TxInput { [INFO] [stdout] | ------- `TxInput` 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/transaction.rs:36:36 [INFO] [stdout] | [INFO] [stdout] 36 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_TxInput` [INFO] [stdout] 37 | pub struct TxInput { [INFO] [stdout] | ------- `TxInput` 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/transaction.rs:42:25 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_TxOutput` [INFO] [stdout] 43 | pub struct TxOutput { [INFO] [stdout] | -------- `TxOutput` 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/transaction.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | #[derive(Eq, PartialEq, Serialize, Deserialize, Debug, Default, Clone, Hash)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_TxOutput` [INFO] [stdout] 43 | pub struct TxOutput { [INFO] [stdout] | -------- `TxOutput` 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/transaction.rs:48:10 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableTxInput` [INFO] [stdout] 49 | pub struct PrintableTxInput { [INFO] [stdout] | ---------------- `PrintableTxInput` 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/transaction.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableTxInput` [INFO] [stdout] 49 | pub struct PrintableTxInput { [INFO] [stdout] | ---------------- `PrintableTxInput` 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/transaction.rs:54:10 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_PrintableTxOutput` [INFO] [stdout] 55 | pub struct PrintableTxOutput { [INFO] [stdout] | ----------------- `PrintableTxOutput` 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/transaction.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_PrintableTxOutput` [INFO] [stdout] 55 | pub struct PrintableTxOutput { [INFO] [stdout] | ----------------- `PrintableTxOutput` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 48.22s [INFO] running `Command { std: "docker" "inspect" "8fc37cf35a20d43fc1e7ea203b87f3c09300232267edebeafb5a2298cef07c38", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8fc37cf35a20d43fc1e7ea203b87f3c09300232267edebeafb5a2298cef07c38", kill_on_drop: false }` [INFO] [stdout] 8fc37cf35a20d43fc1e7ea203b87f3c09300232267edebeafb5a2298cef07c38