[INFO] cloning repository https://github.com/clownfish733/COIN_NET [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/clownfish733/COIN_NET" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fclownfish733%2FCOIN_NET", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fclownfish733%2FCOIN_NET'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4278af7f0c706a1e903f66a1582c91b7df147cfd [INFO] linting clownfish733/COIN_NET against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fclownfish733%2FCOIN_NET" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/clownfish733/COIN_NET [INFO] finished tweaking git repo https://github.com/clownfish733/COIN_NET [INFO] tweaked toml for git repo https://github.com/clownfish733/COIN_NET written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/clownfish733/COIN_NET 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/clownfish733/COIN_NET 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 base64ct v1.8.1 [INFO] [stderr] Downloaded ff v0.13.1 [INFO] [stderr] Downloaded webbrowser v1.0.6 [INFO] [stderr] Downloaded jiff-static v0.2.16 [INFO] [stderr] Downloaded portable-atomic v1.12.0 [INFO] [stderr] Downloaded keyring v3.6.3 [INFO] [stderr] Downloaded jiff v0.2.16 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 067e76c45d67c7b90bc1d58f5c1145c4e01ae1b5a034063fa9d736b72f594eb3 [INFO] running `Command { std: "docker" "start" "-a" "067e76c45d67c7b90bc1d58f5c1145c4e01ae1b5a034063fa9d736b72f594eb3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "067e76c45d67c7b90bc1d58f5c1145c4e01ae1b5a034063fa9d736b72f594eb3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "067e76c45d67c7b90bc1d58f5c1145c4e01ae1b5a034063fa9d736b72f594eb3", kill_on_drop: false }` [INFO] [stdout] 067e76c45d67c7b90bc1d58f5c1145c4e01ae1b5a034063fa9d736b72f594eb3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] ad9245de67dd4951437f744bb708455358a78f1af1f993cfcaca16025301f8f8 [INFO] running `Command { std: "docker" "start" "-a" "ad9245de67dd4951437f744bb708455358a78f1af1f993cfcaca16025301f8f8", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.177 [INFO] [stderr] Compiling unicode-ident v1.0.19 [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling find-msvc-tools v0.1.6 [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Checking itoa v1.0.16 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Checking futures-task v0.3.31 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Checking der v0.7.10 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling unicase v2.8.1 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking ryu v1.0.21 [INFO] [stderr] Checking http-range-header v0.4.2 [INFO] [stderr] Checking cpufeatures v0.2.17 [INFO] [stderr] Checking bitflags v2.9.4 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking iana-time-zone v0.1.64 [INFO] [stderr] Checking spki v0.7.3 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Checking pkcs8 v0.10.2 [INFO] [stderr] Checking matchit v0.8.4 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking jiff v0.2.16 [INFO] [stderr] Checking axum-core v0.5.6 [INFO] [stderr] Checking keyring v3.6.3 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Compiling cc v1.2.51 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking signal-hook-registry v1.4.6 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking ff v0.13.1 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking group v0.13.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking crypto-bigint v0.5.5 [INFO] [stderr] Checking sec1 v0.7.3 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking serde_path_to_error v0.1.20 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking signature v2.2.0 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking rfc6979 v0.4.0 [INFO] [stderr] Compiling cmake v0.1.57 [INFO] [stderr] Checking env_filter v0.1.4 [INFO] [stderr] Compiling aws-lc-sys v0.35.0 [INFO] [stderr] Checking elliptic-curve v0.13.8 [INFO] [stderr] Checking ecdsa v0.16.9 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking k256 v0.13.4 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking tokio v1.48.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Checking webbrowser v1.0.6 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Compiling aws-lc-rs v1.15.2 [INFO] [stderr] Compiling rustls v0.23.36 [INFO] [stderr] Checking rustls-webpki v0.103.8 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking hyper-util v0.1.19 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking rustls-platform-verifier v0.6.2 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking axum v0.8.8 [INFO] [stderr] Checking reqwest v0.13.1 [INFO] [stderr] Checking COIN_NET v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `IpAddr` and `Ipv4Addr` [INFO] [stdout] --> src/network.rs:2:43 [INFO] [stdout] | [INFO] [stdout] 2 | collections::HashMap, fs::File, net::{IpAddr, Ipv4Addr, SocketAddr}, path::Path, sync::Arc, time::Duration, [INFO] [stdout] | ^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `IpAddr` and `Ipv4Addr` [INFO] [stdout] --> src/network.rs:2:43 [INFO] [stdout] | [INFO] [stdout] 2 | collections::HashMap, fs::File, net::{IpAddr, Ipv4Addr, SocketAddr}, path::Path, sync::Arc, time::Duration, [INFO] [stdout] | ^^^^^^ ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `info` [INFO] [stdout] --> src/transactions.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | use log::{info, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/transactions.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | pub_key: pub_key [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `pub_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] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `info` [INFO] [stdout] --> src/transactions.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | use log::{info, warn}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/transactions.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | pub_key: pub_key [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `pub_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] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TransactionWithFee` [INFO] [stdout] --> src/transactions.rs:492:36 [INFO] [stdout] | [INFO] [stdout] 492 | use crate::messages::{Mempool, TransactionWithFee}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `peer_manager_lock` [INFO] [stdout] --> src/network.rs:613:17 [INFO] [stdout] | [INFO] [stdout] 613 | let peer_manager_lock = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_peer_manager_lock` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `peer_manager_lock` [INFO] [stdout] --> src/network.rs:613:17 [INFO] [stdout] | [INFO] [stdout] 613 | let peer_manager_lock = [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_peer_manager_lock` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fee` [INFO] [stdout] --> src/transactions.rs:630:29 [INFO] [stdout] | [INFO] [stdout] 630 | if let Some(fee) = utxos.get_fee(tx.clone()){ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fee` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fee` [INFO] [stdout] --> src/transactions.rs:679:29 [INFO] [stdout] | [INFO] [stdout] 679 | if let Some(fee) = utxos.get_fee(tx.clone()){ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fee` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Node` [INFO] [stdout] --> src/network.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self{ [INFO] [stdout] 37 | | let user = User::new(); [INFO] [stdout] 38 | | [INFO] [stdout] 39 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 35 + impl Default for Node { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/network.rs:136:92 [INFO] [stdout] | [INFO] [stdout] 136 | Block::new(next_transactions, self.get_prev_hash(), self.difficulty, self.version, self.height.clone() + 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.height` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/network.rs:164:28 [INFO] [stdout] | [INFO] [stdout] 164 | fn from_string(string: &String) -> Result{ [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] 164 - fn from_string(string: &String) -> Result{ [INFO] [stdout] 164 + fn from_string(string: &str) -> Result{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `network::NetMessage` [INFO] [stdout] --> src/network.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / fn to_string(&self) -> String{ [INFO] [stdout] 169 | | serde_json::to_string(self).unwrap() [INFO] [stdout] 170 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `network::NetMessage` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/network.rs:249:24 [INFO] [stdout] | [INFO] [stdout] 249 | self.peers.get(&peer).unwrap().tx.send(response).await?; [INFO] [stdout] | ^^^^^ help: change this to: `peer` [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: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/network.rs:255:35 [INFO] [stdout] | [INFO] [stdout] 255 | for (peer, _peer_info) in &self.peers { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 255 - for (peer, _peer_info) in &self.peers { [INFO] [stdout] 255 + for peer in self.peers.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/network.rs:326:59 [INFO] [stdout] | [INFO] [stdout] 326 | !peer_manager_lock.contains(&peer) && !(peer.ip().to_string() == "192.168.1.1") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(peer.ip().to_string() != "192.168.1.1")` [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: `to_string` applied to a type that implements `Display` in `info!` args [INFO] [stdout] --> src/network.rs:325:65 [INFO] [stdout] | [INFO] [stdout] 325 | info!("new peer to connect to {}", peer.ip().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network.rs:341:50 [INFO] [stdout] | [INFO] [stdout] 341 | ... let new_peer_clone = peer.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/network.rs:445:41 [INFO] [stdout] | [INFO] [stdout] 445 | / ... if should_connect{ [INFO] [stdout] 446 | | ... if let Ok(stream) = TcpStream::connect(&new_peer).await{ [INFO] [stdout] 447 | | ... let (tx, rx) = mpsc::channel::(100); [INFO] [stdout] ... | [INFO] [stdout] 476 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 445 ~ if should_connect [INFO] [stdout] 446 ~ && let Ok(stream) = TcpStream::connect(&new_peer).await{ [INFO] [stdout] 447 | let (tx, rx) = mpsc::channel::(100); [INFO] [stdout] ... [INFO] [stdout] 473 | } [INFO] [stdout] 474 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network.rs:455:70 [INFO] [stdout] | [INFO] [stdout] 455 | ... let new_peer_clone = new_peer.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*new_peer` [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.rs:472:72 [INFO] [stdout] | [INFO] [stdout] 472 | ... peer_manager_lock.send(&new_peer, msg).await.unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `new_peer` [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.rs:566:48 [INFO] [stdout] | [INFO] [stdout] 566 | tx.send(ConnectionEvent::close(peer.clone())).await?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [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.rs:571:48 [INFO] [stdout] | [INFO] [stdout] 571 | tx.send(ConnectionEvent::close(peer.clone())).await?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [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: method `get_pub_key_hash` is never used [INFO] [stdout] --> src/transactions.rs:273:8 [INFO] [stdout] | [INFO] [stdout] 242 | impl User{ [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 273 | fn get_pub_key_hash(&self) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `miner::Block` [INFO] [stdout] --> src/miner.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / pub fn to_string(&self) -> String{ [INFO] [stdout] 77 | | serde_json::to_string(self).unwrap() [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `miner::Block` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/miner.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | if count%250000 == 0 && id==0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `count.is_multiple_of(250000)` [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: implementation of inherent method `to_string(&self) -> String` for type `miner::BlockHeader` [INFO] [stdout] --> src/miner.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | / pub fn to_string(&self) -> String{ [INFO] [stdout] 187 | | serde_json::to_string(self).unwrap() [INFO] [stdout] 188 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `miner::BlockHeader` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Node` [INFO] [stdout] --> src/network.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self{ [INFO] [stdout] 37 | | let user = User::new(); [INFO] [stdout] 38 | | [INFO] [stdout] 39 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 35 + impl Default for Node { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Mempool` [INFO] [stdout] --> src/messages.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / pub fn new() -> Self{ [INFO] [stdout] 89 | | Self(HeapSet::new()) [INFO] [stdout] 90 | | } [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] 87 + impl Default for Mempool { [INFO] [stdout] 88 + fn default() -> Self { [INFO] [stdout] 89 + Self::new() [INFO] [stdout] 90 + } [INFO] [stdout] 91 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/network.rs:136:92 [INFO] [stdout] | [INFO] [stdout] 136 | Block::new(next_transactions, self.get_prev_hash(), self.difficulty, self.version, self.height.clone() + 1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.height` [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: you should consider adding a `Default` implementation for `GetInv` [INFO] [stdout] --> src/messages.rs:220:5 [INFO] [stdout] | [INFO] [stdout] 220 | / pub fn new() -> Self{ [INFO] [stdout] 221 | | Self{ } [INFO] [stdout] 222 | | } [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] 219 + impl Default for GetInv { [INFO] [stdout] 220 + fn default() -> Self { [INFO] [stdout] 221 + Self::new() [INFO] [stdout] 222 + } [INFO] [stdout] 223 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/network.rs:164:28 [INFO] [stdout] | [INFO] [stdout] 164 | fn from_string(string: &String) -> Result{ [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] 164 - fn from_string(string: &String) -> Result{ [INFO] [stdout] 164 + fn from_string(string: &str) -> Result{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `network::NetMessage` [INFO] [stdout] --> src/network.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | / fn to_string(&self) -> String{ [INFO] [stdout] 169 | | serde_json::to_string(self).unwrap() [INFO] [stdout] 170 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `network::NetMessage` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GetPeerAddrs` [INFO] [stdout] --> src/messages.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 272 | / pub fn new() -> Self{ [INFO] [stdout] 273 | | Self [INFO] [stdout] 274 | | } [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] 271 + impl Default for GetPeerAddrs { [INFO] [stdout] 272 + fn default() -> Self { [INFO] [stdout] 273 + Self::new() [INFO] [stdout] 274 + } [INFO] [stdout] 275 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/network.rs:249:24 [INFO] [stdout] | [INFO] [stdout] 249 | self.peers.get(&peer).unwrap().tx.send(response).await?; [INFO] [stdout] | ^^^^^ help: change this to: `peer` [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: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/network.rs:255:35 [INFO] [stdout] | [INFO] [stdout] 255 | for (peer, _peer_info) in &self.peers { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 255 - for (peer, _peer_info) in &self.peers { [INFO] [stdout] 255 + for peer in self.peers.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/network.rs:326:59 [INFO] [stdout] | [INFO] [stdout] 326 | !peer_manager_lock.contains(&peer) && !(peer.ip().to_string() == "192.168.1.1") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(peer.ip().to_string() != "192.168.1.1")` [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: `to_string` applied to a type that implements `Display` in `info!` args [INFO] [stdout] --> src/network.rs:325:65 [INFO] [stdout] | [INFO] [stdout] 325 | info!("new peer to connect to {}", peer.ip().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UTXOS` [INFO] [stdout] --> src/transactions.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self{ [INFO] [stdout] 21 | | Self(HashMap::new()) [INFO] [stdout] 22 | | } [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] 19 + impl Default for UTXOS { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transactions.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - return None [INFO] [stdout] 50 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/transactions.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | if self.get_fee(transaction.clone()) == None{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.get_fee(transaction.clone()).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transactions.rs:139:47 [INFO] [stdout] | [INFO] [stdout] 139 | pub fn get_inputs(&self, value: usize) -> Option<(Vec<(([u8; 32], usize), TxOutput)>, usize)>{ [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 `SocketAddr` which implements the `Copy` trait [INFO] [stdout] --> src/network.rs:341:50 [INFO] [stdout] | [INFO] [stdout] 341 | ... let new_peer_clone = peer.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `peer` [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 `User` [INFO] [stdout] --> src/transactions.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / pub fn new() -> Self{ [INFO] [stdout] 244 | | let sk = SigningKey::random(&mut OsRng); [INFO] [stdout] 245 | | let pk = VerifyingKey::from(&sk); [INFO] [stdout] 246 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [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] 242 + impl Default for User { [INFO] [stdout] 243 + fn default() -> Self { [INFO] [stdout] 244 + Self::new() [INFO] [stdout] 245 + } [INFO] [stdout] 246 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:253:22 [INFO] [stdout] | [INFO] [stdout] 253 | HexUser::new(self.public_key.clone(), self.private_key.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/transactions.rs:274:28 [INFO] [stdout] | [INFO] [stdout] 274 | sha256(hex::encode(&self.get_pub_key())).to_vec() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.get_pub_key()` [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: this `if` statement can be collapsed [INFO] [stdout] --> src/network.rs:445:41 [INFO] [stdout] | [INFO] [stdout] 445 | / ... if should_connect{ [INFO] [stdout] 446 | | ... if let Ok(stream) = TcpStream::connect(&new_peer).await{ [INFO] [stdout] 447 | | ... let (tx, rx) = mpsc::channel::(100); [INFO] [stdout] ... | [INFO] [stdout] 476 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 445 ~ if should_connect [INFO] [stdout] 446 ~ && let Ok(stream) = TcpStream::connect(&new_peer).await{ [INFO] [stdout] 447 | let (tx, rx) = mpsc::channel::(100); [INFO] [stdout] ... [INFO] [stdout] 473 | } [INFO] [stdout] 474 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 32]` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:336:27 [INFO] [stdout] | [INFO] [stdout] 336 | prev: 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:337:35 [INFO] [stdout] | [INFO] [stdout] 337 | output_index: index.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:343:24 [INFO] [stdout] | [INFO] [stdout] 343 | value: amount.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*amount` [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.rs:455:70 [INFO] [stdout] | [INFO] [stdout] 455 | ... let new_peer_clone = new_peer.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*new_peer` [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/transactions.rs:349:90 [INFO] [stdout] | [INFO] [stdout] 349 | let sig = user.sign(hex::encode(compute_sig_hash(transaction.clone(), index, &output))).to_vec(); [INFO] [stdout] | ^^^^^^^ help: change this to: `output` [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/network.rs:472:72 [INFO] [stdout] | [INFO] [stdout] 472 | ... peer_manager_lock.send(&new_peer, msg).await.unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `new_peer` [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.rs:566:48 [INFO] [stdout] | [INFO] [stdout] 566 | tx.send(ConnectionEvent::close(peer.clone())).await?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [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.rs:571:48 [INFO] [stdout] | [INFO] [stdout] 571 | tx.send(ConnectionEvent::close(peer.clone())).await?; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/transactions.rs:545:9 [INFO] [stdout] | [INFO] [stdout] 545 | assert_eq!(script.validate_script(&tx, 0, &utxo), true) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 545 - assert_eq!(script.validate_script(&tx, 0, &utxo), true) [INFO] [stdout] 545 + assert!(script.validate_script(&tx, 0, &utxo)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `miner::Block` [INFO] [stdout] --> src/miner.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / pub fn to_string(&self) -> String{ [INFO] [stdout] 77 | | serde_json::to_string(self).unwrap() [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `miner::Block` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/miner.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | if count%250000 == 0 && id==0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `count.is_multiple_of(250000)` [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: implementation of inherent method `to_string(&self) -> String` for type `miner::BlockHeader` [INFO] [stdout] --> src/miner.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | / pub fn to_string(&self) -> String{ [INFO] [stdout] 187 | | serde_json::to_string(self).unwrap() [INFO] [stdout] 188 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `miner::BlockHeader` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/ui.rs:188:15 [INFO] [stdout] | [INFO] [stdout] 188 | let url = format!("http://127.0.0.1:3000"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"http://127.0.0.1:3000".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Mempool` [INFO] [stdout] --> src/messages.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / pub fn new() -> Self{ [INFO] [stdout] 89 | | Self(HeapSet::new()) [INFO] [stdout] 90 | | } [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] 87 + impl Default for Mempool { [INFO] [stdout] 88 + fn default() -> Self { [INFO] [stdout] 89 + Self::new() [INFO] [stdout] 90 + } [INFO] [stdout] 91 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GetInv` [INFO] [stdout] --> src/messages.rs:220:5 [INFO] [stdout] | [INFO] [stdout] 220 | / pub fn new() -> Self{ [INFO] [stdout] 221 | | Self{ } [INFO] [stdout] 222 | | } [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] 219 + impl Default for GetInv { [INFO] [stdout] 220 + fn default() -> Self { [INFO] [stdout] 221 + Self::new() [INFO] [stdout] 222 + } [INFO] [stdout] 223 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GetPeerAddrs` [INFO] [stdout] --> src/messages.rs:272:5 [INFO] [stdout] | [INFO] [stdout] 272 | / pub fn new() -> Self{ [INFO] [stdout] 273 | | Self [INFO] [stdout] 274 | | } [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] 271 + impl Default for GetPeerAddrs { [INFO] [stdout] 272 + fn default() -> Self { [INFO] [stdout] 273 + Self::new() [INFO] [stdout] 274 + } [INFO] [stdout] 275 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UTXOS` [INFO] [stdout] --> src/transactions.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> Self{ [INFO] [stdout] 21 | | Self(HashMap::new()) [INFO] [stdout] 22 | | } [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] 19 + impl Default for UTXOS { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/transactions.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - return None [INFO] [stdout] 50 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/transactions.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | if self.get_fee(transaction.clone()) == None{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.get_fee(transaction.clone()).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/transactions.rs:139:47 [INFO] [stdout] | [INFO] [stdout] 139 | pub fn get_inputs(&self, value: usize) -> Option<(Vec<(([u8; 32], usize), TxOutput)>, usize)>{ [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: you should consider adding a `Default` implementation for `User` [INFO] [stdout] --> src/transactions.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / pub fn new() -> Self{ [INFO] [stdout] 244 | | let sk = SigningKey::random(&mut OsRng); [INFO] [stdout] 245 | | let pk = VerifyingKey::from(&sk); [INFO] [stdout] 246 | | Self { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [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] 242 + impl Default for User { [INFO] [stdout] 243 + fn default() -> Self { [INFO] [stdout] 244 + Self::new() [INFO] [stdout] 245 + } [INFO] [stdout] 246 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:253:22 [INFO] [stdout] | [INFO] [stdout] 253 | HexUser::new(self.public_key.clone(), self.private_key.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/transactions.rs:274:28 [INFO] [stdout] | [INFO] [stdout] 274 | sha256(hex::encode(&self.get_pub_key())).to_vec() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.get_pub_key()` [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 `[u8; 32]` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:336:27 [INFO] [stdout] | [INFO] [stdout] 336 | prev: 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 `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:337:35 [INFO] [stdout] | [INFO] [stdout] 337 | output_index: index.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/transactions.rs:343:24 [INFO] [stdout] | [INFO] [stdout] 343 | value: amount.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*amount` [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/transactions.rs:349:90 [INFO] [stdout] | [INFO] [stdout] 349 | let sig = user.sign(hex::encode(compute_sig_hash(transaction.clone(), index, &output))).to_vec(); [INFO] [stdout] | ^^^^^^^ help: change this to: `output` [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: useless use of `format!` [INFO] [stdout] --> src/ui.rs:188:15 [INFO] [stdout] | [INFO] [stdout] 188 | let url = format!("http://127.0.0.1:3000"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"http://127.0.0.1:3000".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `anyhow` [INFO] [stdout] --> src/bin/bootstrap.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use anyhow::{Result, anyhow}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `anyhow` [INFO] [stdout] --> src/bin/bootstrap.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use anyhow::{Result, anyhow}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 02s [INFO] running `Command { std: "docker" "inspect" "ad9245de67dd4951437f744bb708455358a78f1af1f993cfcaca16025301f8f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ad9245de67dd4951437f744bb708455358a78f1af1f993cfcaca16025301f8f8", kill_on_drop: false }` [INFO] [stdout] ad9245de67dd4951437f744bb708455358a78f1af1f993cfcaca16025301f8f8