[INFO] fetching crate nour 1.0.0... [INFO] linting nour-1.0.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate nour 1.0.0 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate nour 1.0.0 [INFO] finished tweaking crates.io crate nour 1.0.0 [INFO] tweaked toml for crates.io crate nour 1.0.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate nour 1.0.0 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 crates.io crate nour 1.0.0 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 murmur3 v0.5.2 [INFO] [stderr] Downloaded current_platform v0.2.0 [INFO] [stderr] Downloaded dns-lookup v3.0.1 [INFO] [stderr] Downloaded base58 v0.2.0 [INFO] [stderr] Downloaded hex-literal v1.1.0 [INFO] [stderr] Downloaded ripemd v0.1.3 [INFO] [stderr] Downloaded bitcoin-internals v0.4.1 [INFO] [stderr] Downloaded cargo-fuzz v0.13.1 [INFO] [stderr] Downloaded hex-conservative v0.3.0 [INFO] [stderr] Downloaded camino v1.2.1 [INFO] [stderr] Downloaded cargo_metadata v0.18.1 [INFO] [stderr] Downloaded secp256k1 v0.31.1 [INFO] [stderr] Downloaded bitcoin_hashes v0.17.0 [INFO] [stderr] Downloaded syn v2.0.108 [INFO] [stderr] Downloaded secp256k1-sys v0.11.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d829e1d73e872c6b693741a46a9b639f8b0e8de20f35486520effa10d5168f45 [INFO] running `Command { std: "docker" "start" "-a" "d829e1d73e872c6b693741a46a9b639f8b0e8de20f35486520effa10d5168f45", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d829e1d73e872c6b693741a46a9b639f8b0e8de20f35486520effa10d5168f45", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d829e1d73e872c6b693741a46a9b639f8b0e8de20f35486520effa10d5168f45", kill_on_drop: false }` [INFO] [stdout] d829e1d73e872c6b693741a46a9b639f8b0e8de20f35486520effa10d5168f45 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 94e076391db9781f6787dd9e5b17c04d75fe17f4fec01179eed10ac02afc9f90 [INFO] running `Command { std: "docker" "start" "-a" "94e076391db9781f6787dd9e5b17c04d75fe17f4fec01179eed10ac02afc9f90", kill_on_drop: false }` [INFO] [stderr] warning: nour v1.0.0 (/opt/rustwide/workdir) ignoring invalid dependency `cargo-fuzz` which is missing a lib target [INFO] [stderr] Compiling quote v1.0.41 [INFO] [stderr] Compiling zerocopy v0.8.27 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Compiling generic-array v0.14.9 [INFO] [stderr] Compiling cc v1.2.44 [INFO] [stderr] Compiling bitcoin-internals v0.4.1 [INFO] [stderr] Checking anstyle v1.0.13 [INFO] [stderr] Checking colorchoice v1.0.4 [INFO] [stderr] Checking anstyle-query v1.1.4 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking clap_lex v0.7.6 [INFO] [stderr] Checking plotters-backend v0.3.7 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking ciborium-io v0.2.2 [INFO] [stderr] Checking strsim v0.11.1 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking cast v0.3.0 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking anstyle-parse v0.2.7 [INFO] [stderr] Checking murmur3 v0.5.2 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking yansi v1.0.1 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking oorandom v11.1.5 [INFO] [stderr] Checking plotters-svg v0.3.7 [INFO] [stderr] Checking anes v0.1.6 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking snowflake v1.3.0 [INFO] [stderr] Checking base58 v0.2.0 [INFO] [stderr] Compiling syn v2.0.108 [INFO] [stderr] Checking hex-literal v1.1.0 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking dns-lookup v3.0.1 [INFO] [stderr] Checking bitcoin_hashes v0.17.0 [INFO] [stderr] Checking pretty_assertions v1.4.1 [INFO] [stderr] Checking clap_builder v4.5.51 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking ripemd v0.1.3 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling secp256k1-sys v0.11.0 [INFO] [stderr] Checking criterion-plot v0.6.0 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Compiling zerocopy-derive v0.8.27 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking clap v4.5.51 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking criterion v0.7.0 [INFO] [stderr] Checking secp256k1 v0.31.1 [INFO] [stderr] Checking nour v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn encode_address(_network: Network, version: u8, payload: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] = note: `#[warn(clippy::double_must_use)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | pub fn decode_address(input: &str) -> Result<(u8, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/address/mod.rs:55:45 [INFO] [stdout] | [INFO] [stdout] 55 | let bytes = input.from_base58().map_err(|e| Error::FromBase58Error(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::FromBase58Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:70:1 [INFO] [stdout] | [INFO] [stdout] 70 | pub fn encode_p2pkh_address(network: Network, pubkey_hash: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn encode_p2sh_address(network: Network, script_hash: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:93:1 [INFO] [stdout] | [INFO] [stdout] 93 | pub fn validate_address(network: Network, address: &str) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/messages/block_header.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | if exp < 3 || exp > 32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(3..=32).contains(&exp)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:114:22 [INFO] [stdout] | [INFO] [stdout] 114 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:119:22 [INFO] [stdout] | [INFO] [stdout] 119 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:124:22 [INFO] [stdout] | [INFO] [stdout] 124 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/messages/block_locator.rs:35:27 [INFO] [stdout] | [INFO] [stdout] 35 | if self.version < MIN_SUPPORTED_PROTOCOL_VERSION as u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `MIN_SUPPORTED_PROTOCOL_VERSION` [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: redundant closure [INFO] [stdout] --> src/messages/block_locator.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/fee_filter.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_add.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:42:22 [INFO] [stdout] | [INFO] [stdout] 42 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:51:22 [INFO] [stdout] | [INFO] [stdout] 51 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:53:46 [INFO] [stdout] | [INFO] [stdout] 53 | let flags = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/headers.rs:31:54 [INFO] [stdout] | [INFO] [stdout] 31 | let txn_count = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/inv_vect.rs:41:22 [INFO] [stdout] | [INFO] [stdout] 41 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | matches.push(h.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:133:17 [INFO] [stdout] | [INFO] [stdout] 133 | let h = self.hashes[*idx].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.hashes[*idx]` [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 closure [INFO] [stdout] --> src/messages/merkle_block.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/messages/message.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Error::IOError(e) = &e { [INFO] [stdout] 163 | | if e.kind() == io::ErrorKind::TimedOut || e.kind() == io::ErrorKind::WouldBlock [INFO] [stdout] 164 | | { [INFO] [stdout] 165 | | return Ok(Message::Partial(header)); [INFO] [stdout] 166 | | } [INFO] [stdout] 167 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Error::IOError(e) = &e [INFO] [stdout] 163 ~ && (e.kind() == io::ErrorKind::TimedOut || e.kind() == io::ErrorKind::WouldBlock) [INFO] [stdout] 164 | { [INFO] [stdout] 165 | return Ok(Message::Partial(header)); [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:59:43 [INFO] [stdout] | [INFO] [stdout] 59 | reader.read_exact(&mut p).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:87:43 [INFO] [stdout] | [INFO] [stdout] 87 | reader.read_exact(&mut p).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:91:22 [INFO] [stdout] | [INFO] [stdout] 91 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:96:22 [INFO] [stdout] | [INFO] [stdout] 96 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:98:22 [INFO] [stdout] | [INFO] [stdout] 98 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr.rs:55:44 [INFO] [stdout] | [INFO] [stdout] 55 | reader.read_exact(&mut ip).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr.rs:59:22 [INFO] [stdout] | [INFO] [stdout] 59 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr_ex.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/out_point.rs:41:22 [INFO] [stdout] | [INFO] [stdout] 41 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/out_point.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/ping.rs:23:22 [INFO] [stdout] | [INFO] [stdout] 23 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:71:45 [INFO] [stdout] | [INFO] [stdout] 71 | let code = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:85:47 [INFO] [stdout] | [INFO] [stdout] 85 | reader.read_exact(&mut d).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | var_int::write(self.message.as_bytes().len() as u64, writer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.message.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:100:24 [INFO] [stdout] | [INFO] [stdout] 100 | var_int::write(self.reason.as_bytes().len() as u64, writer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.reason.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:160:23 [INFO] [stdout] | [INFO] [stdout] 160 | var_int::size(self.message.as_bytes().len() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.message.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:161:15 [INFO] [stdout] | [INFO] [stdout] 161 | + self.message.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.message.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:163:29 [INFO] [stdout] | [INFO] [stdout] 163 | + var_int::size(self.reason.as_bytes().len() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.reason.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:164:15 [INFO] [stdout] | [INFO] [stdout] 164 | + self.reason.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.reason.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/send_cmpct.rs:29:47 [INFO] [stdout] | [INFO] [stdout] 29 | let enable = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/send_cmpct.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx.rs:169:22 [INFO] [stdout] | [INFO] [stdout] 169 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx.rs:190:22 [INFO] [stdout] | [INFO] [stdout] 190 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_in.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_in.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_out.rs:47:22 [INFO] [stdout] | [INFO] [stdout] 47 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_out.rs:59:22 [INFO] [stdout] | [INFO] [stdout] 59 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:91:22 [INFO] [stdout] | [INFO] [stdout] 91 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:96:22 [INFO] [stdout] | [INFO] [stdout] 96 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:101:22 [INFO] [stdout] | [INFO] [stdout] 101 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:120:22 [INFO] [stdout] | [INFO] [stdout] 120 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:126:22 [INFO] [stdout] | [INFO] [stdout] 126 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:128:46 [INFO] [stdout] | [INFO] [stdout] 128 | let relay = reader.read_u8().map_err(|e| Error::IOError(e))? == 0x01; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/version.rs:150:24 [INFO] [stdout] | [INFO] [stdout] 150 | var_int::write(self.user_agent.as_bytes().len() as u64, writer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.user_agent.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/version.rs:243:29 [INFO] [stdout] | [INFO] [stdout] 243 | + var_int::size(self.user_agent.as_bytes().len() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.user_agent.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/version.rs:244:15 [INFO] [stdout] | [INFO] [stdout] 244 | + self.user_agent.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.user_agent.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/network/mod.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | mod network; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/network/network.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn new(network_type: u8) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/network/network.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn from_u8(x: u8) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/peer/mod.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | mod peer; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/peer/peer.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / if let Some(tcp_stream) = tcp_stream.as_mut() { [INFO] [stdout] 172 | | if let Err(e) = tcp_stream.shutdown(Shutdown::Both) { [INFO] [stdout] 173 | | warn!("{:?} Problem shutting down tcp stream: {:?}", self, e); [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 171 ~ if let Some(tcp_stream) = tcp_stream.as_mut() [INFO] [stdout] 172 ~ && let Err(e) = tcp_stream.shutdown(Shutdown::Both) { [INFO] [stdout] 173 | warn!("{:?} Problem shutting down tcp stream: {:?}", self, e); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/peer/peer.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | pub fn version(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/script/interpreter.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if branch_exec.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `branch_exec.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: deref which would be done by auto-deref [INFO] [stdout] --> src/script/interpreter.rs:237:42 [INFO] [stdout] | [INFO] [stdout] 237 | second.extend_from_slice(&*top); [INFO] [stdout] | ^^^^^ help: try: `&top` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/script/interpreter.rs:583:25 [INFO] [stdout] | [INFO] [stdout] 583 | v[0] |= neg as u8; [INFO] [stdout] | ^^^^^^^^^ help: try: `neg` [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: length comparison to zero [INFO] [stdout] --> src/script/interpreter.rs:753:5 [INFO] [stdout] | [INFO] [stdout] 753 | sig.len() > 0 && sig[sig.len() - 1] & SIGHASH_FORKID == 0 [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sig.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: casting the result of `i64::abs()` to u64 [INFO] [stdout] --> src/script/interpreter.rs:855:21 [INFO] [stdout] | [INFO] [stdout] 855 | let mut abs_n = n.abs() as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `n.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using a reference to `Cow` is not recommended [INFO] [stdout] --> src/script/interpreter.rs:949:26 [INFO] [stdout] | [INFO] [stdout] 949 | fn decode_bool<'a>(item: &Cow<'a, [u8]>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `&[u8]` [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] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/script/mod.rs:108:5 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn eval(&self, checker: &mut T, flags: u32) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `script` [INFO] [stdout] --> src/script/mod.rs:273:22 [INFO] [stdout] | [INFO] [stdout] 273 | for j in i..script.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 273 - for j in i..script.len() { [INFO] [stdout] 273 + for in script.iter().skip(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/transaction/p2pkh.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | if sig_len < OP_PUSH + 71 || sig_len > OP_PUSH + 73 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(OP_PUSH + 71..=OP_PUSH + 73).contains(&sig_len)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/p2pkh.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn extract_pubkey(unlock_script: &[u8]) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/p2pkh.rs:89:1 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn extract_pubkeyhash(lock_script: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/sighash.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn sighash( [INFO] [stdout] 55 | | tx: &Tx, [INFO] [stdout] 56 | | n_input: usize, [INFO] [stdout] 57 | | script_code: &[u8], [INFO] [stdout] ... | [INFO] [stdout] 60 | | cache: &mut SigHashCache, [INFO] [stdout] 61 | | ) -> Result { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/transaction/sighash.rs:165:34 [INFO] [stdout] | [INFO] [stdout] 165 | s.write_u32::(((FORK_ID as u32) << 8) | (sighash_type as u32))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `FORK_ID` [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: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/mod.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / pub fn generate_signature( [INFO] [stdout] 41 | | private_key: &[u8; 32], [INFO] [stdout] 42 | | sighash: &Hash256, [INFO] [stdout] 43 | | sighash_type: u8, [INFO] [stdout] 44 | | ) -> Result> { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/util/bits.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | vec.truncate((len + 7) / 8); [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/util/bits.rs:86:25 [INFO] [stdout] | [INFO] [stdout] 86 | for j in i / 8..((i + len + 7) / 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(i + len).div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/util/bloom_filter.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn new(insert: f64, pr_false_pos: f64) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/util/bloom_filter.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | if !(0.0 < pr_false_pos && pr_false_pos < 1.0) || !pr_false_pos.is_normal() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(0.0 < pr_false_pos && pr_false_pos < 1.0 && pr_false_pos.is_normal())` [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: redundant closure [INFO] [stdout] --> src/util/bloom_filter.rs:121:22 [INFO] [stdout] | [INFO] [stdout] 121 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/bloom_filter.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/bloom_filter.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/util/hash256.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn decode(s: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/hash256.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/util/rx.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | fn poll_timeout(&self, duration: Duration) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Subject` [INFO] [stdout] --> src/util/rx.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn new() -> Self { [INFO] [stdout] 39 | | Self { [INFO] [stdout] 40 | | observers: RwLock::new(Vec::new()), [INFO] [stdout] 41 | | pending: RwLock::new(Vec::new()), [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [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 Subject { [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 `Single` [INFO] [stdout] --> src/util/rx.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | / pub fn new() -> Self { [INFO] [stdout] 93 | | Self { [INFO] [stdout] 94 | | subject: Subject::new(), [INFO] [stdout] 95 | | value: RwLock::new(None), [INFO] [stdout] 96 | | } [INFO] [stdout] 97 | | } [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] 89 + impl Default for Single { [INFO] [stdout] 90 + fn default() -> Self { [INFO] [stdout] 91 + Self::new() [INFO] [stdout] 92 + } [INFO] [stdout] 93 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/serdes.rs:43:43 [INFO] [stdout] | [INFO] [stdout] 43 | reader.read_exact(&mut d).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/serdes.rs:54:43 [INFO] [stdout] | [INFO] [stdout] 54 | reader.read_exact(&mut d).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/wallet/extended_key.rs:111:41 [INFO] [stdout] | [INFO] [stdout] 111 | let v = s.from_base58().map_err(|e| Error::FromBase58Error(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::FromBase58Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wallet/extended_key.rs:194:49 [INFO] [stdout] | [INFO] [stdout] 194 | child_key.0[46..78].copy_from_slice(&child_secret.secret_bytes().as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `child_secret.secret_bytes().as_ref()` [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: redundant closure [INFO] [stdout] --> src/wallet/extended_key.rs:210:22 [INFO] [stdout] | [INFO] [stdout] 210 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/wallet/extended_key.rs:241:47 [INFO] [stdout] | [INFO] [stdout] 241 | let index_str = part.trim_end_matches(|c| c == 'H' || c == '\''); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['H', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` 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/wallet/extended_key.rs:283:35 [INFO] [stdout] | [INFO] [stdout] 283 | key.0[46..78].copy_from_slice(&secret_key.secret_bytes().as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `secret_key.secret_bytes().as_ref()` [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 function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn encode_address(_network: Network, version: u8, payload: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] = note: `#[warn(clippy::double_must_use)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | pub fn decode_address(input: &str) -> Result<(u8, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/address/mod.rs:55:45 [INFO] [stdout] | [INFO] [stdout] 55 | let bytes = input.from_base58().map_err(|e| Error::FromBase58Error(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::FromBase58Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:70:1 [INFO] [stdout] | [INFO] [stdout] 70 | pub fn encode_p2pkh_address(network: Network, pubkey_hash: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn encode_p2sh_address(network: Network, script_hash: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/address/mod.rs:93:1 [INFO] [stdout] | [INFO] [stdout] 93 | pub fn validate_address(network: Network, address: &str) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/messages/block_header.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | if exp < 3 || exp > 32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(3..=32).contains(&exp)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:114:22 [INFO] [stdout] | [INFO] [stdout] 114 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:119:22 [INFO] [stdout] | [INFO] [stdout] 119 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/block_header.rs:124:22 [INFO] [stdout] | [INFO] [stdout] 124 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/messages/block_locator.rs:35:27 [INFO] [stdout] | [INFO] [stdout] 35 | if self.version < MIN_SUPPORTED_PROTOCOL_VERSION as u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `MIN_SUPPORTED_PROTOCOL_VERSION` [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: redundant closure [INFO] [stdout] --> src/messages/block_locator.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/messages/block_locator.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | version: MIN_SUPPORTED_PROTOCOL_VERSION as u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `MIN_SUPPORTED_PROTOCOL_VERSION` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/messages/block_locator.rs:165:21 [INFO] [stdout] | [INFO] [stdout] 165 | p.version = MIN_SUPPORTED_PROTOCOL_VERSION as u32 - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `MIN_SUPPORTED_PROTOCOL_VERSION` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/messages/block_locator.rs:172:21 [INFO] [stdout] | [INFO] [stdout] 172 | p.version = MIN_SUPPORTED_PROTOCOL_VERSION as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `MIN_SUPPORTED_PROTOCOL_VERSION` [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: redundant closure [INFO] [stdout] --> src/messages/fee_filter.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_add.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:42:22 [INFO] [stdout] | [INFO] [stdout] 42 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:51:22 [INFO] [stdout] | [INFO] [stdout] 51 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/filter_load.rs:53:46 [INFO] [stdout] | [INFO] [stdout] 53 | let flags = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/headers.rs:31:54 [INFO] [stdout] | [INFO] [stdout] 31 | let txn_count = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/inv_vect.rs:41:22 [INFO] [stdout] | [INFO] [stdout] 41 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | matches.push(h.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:133:17 [INFO] [stdout] | [INFO] [stdout] 133 | let h = self.hashes[*idx].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.hashes[*idx]` [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 closure [INFO] [stdout] --> src/messages/merkle_block.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:297:26 [INFO] [stdout] | [INFO] [stdout] 297 | let hash_right = hash_left.clone(); // Dup [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `hash_left` [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 `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:310:26 [INFO] [stdout] | [INFO] [stdout] 310 | hashes: vec![hash_left.clone(), hash_right], // Both leaves [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `hash_left` [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 `Hash256` which implements the `Copy` trait [INFO] [stdout] --> src/messages/merkle_block.rs:325:26 [INFO] [stdout] | [INFO] [stdout] 325 | merkle_root: h.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/messages/message.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | / if let Error::IOError(e) = &e { [INFO] [stdout] 163 | | if e.kind() == io::ErrorKind::TimedOut || e.kind() == io::ErrorKind::WouldBlock [INFO] [stdout] 164 | | { [INFO] [stdout] 165 | | return Ok(Message::Partial(header)); [INFO] [stdout] 166 | | } [INFO] [stdout] 167 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 162 ~ if let Error::IOError(e) = &e [INFO] [stdout] 163 ~ && (e.kind() == io::ErrorKind::TimedOut || e.kind() == io::ErrorKind::WouldBlock) [INFO] [stdout] 164 | { [INFO] [stdout] 165 | return Ok(Message::Partial(header)); [INFO] [stdout] 166 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:59:43 [INFO] [stdout] | [INFO] [stdout] 59 | reader.read_exact(&mut p).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:87:43 [INFO] [stdout] | [INFO] [stdout] 87 | reader.read_exact(&mut p).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:91:22 [INFO] [stdout] | [INFO] [stdout] 91 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:96:22 [INFO] [stdout] | [INFO] [stdout] 96 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/message_header.rs:98:22 [INFO] [stdout] | [INFO] [stdout] 98 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr.rs:55:44 [INFO] [stdout] | [INFO] [stdout] 55 | reader.read_exact(&mut ip).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr.rs:59:22 [INFO] [stdout] | [INFO] [stdout] 59 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/node_addr_ex.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/out_point.rs:41:22 [INFO] [stdout] | [INFO] [stdout] 41 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/out_point.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/ping.rs:23:22 [INFO] [stdout] | [INFO] [stdout] 23 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:71:45 [INFO] [stdout] | [INFO] [stdout] 71 | let code = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/reject.rs:85:47 [INFO] [stdout] | [INFO] [stdout] 85 | reader.read_exact(&mut d).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | var_int::write(self.message.as_bytes().len() as u64, writer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.message.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:100:24 [INFO] [stdout] | [INFO] [stdout] 100 | var_int::write(self.reason.as_bytes().len() as u64, writer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.reason.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:160:23 [INFO] [stdout] | [INFO] [stdout] 160 | var_int::size(self.message.as_bytes().len() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.message.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:161:15 [INFO] [stdout] | [INFO] [stdout] 161 | + self.message.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.message.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:163:29 [INFO] [stdout] | [INFO] [stdout] 163 | + var_int::size(self.reason.as_bytes().len() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.reason.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/reject.rs:164:15 [INFO] [stdout] | [INFO] [stdout] 164 | + self.reason.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.reason.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/send_cmpct.rs:29:47 [INFO] [stdout] | [INFO] [stdout] 29 | let enable = reader.read_u8().map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/send_cmpct.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx.rs:169:22 [INFO] [stdout] | [INFO] [stdout] 169 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx.rs:190:22 [INFO] [stdout] | [INFO] [stdout] 190 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_in.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_in.rs:53:22 [INFO] [stdout] | [INFO] [stdout] 53 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_out.rs:47:22 [INFO] [stdout] | [INFO] [stdout] 47 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/tx_out.rs:59:22 [INFO] [stdout] | [INFO] [stdout] 59 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:91:22 [INFO] [stdout] | [INFO] [stdout] 91 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:96:22 [INFO] [stdout] | [INFO] [stdout] 96 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:101:22 [INFO] [stdout] | [INFO] [stdout] 101 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:108:22 [INFO] [stdout] | [INFO] [stdout] 108 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:120:22 [INFO] [stdout] | [INFO] [stdout] 120 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:126:22 [INFO] [stdout] | [INFO] [stdout] 126 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/messages/version.rs:128:46 [INFO] [stdout] | [INFO] [stdout] 128 | let relay = reader.read_u8().map_err(|e| Error::IOError(e))? == 0x01; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/version.rs:150:24 [INFO] [stdout] | [INFO] [stdout] 150 | var_int::write(self.user_agent.as_bytes().len() as u64, writer)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.user_agent.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/version.rs:243:29 [INFO] [stdout] | [INFO] [stdout] 243 | + var_int::size(self.user_agent.as_bytes().len() as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.user_agent.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/messages/version.rs:244:15 [INFO] [stdout] | [INFO] [stdout] 244 | + self.user_agent.as_bytes().len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `self.user_agent.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/network/mod.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 16 | mod network; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/network/network.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn new(network_type: u8) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/network/network.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn from_u8(x: u8) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/peer/mod.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | mod peer; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/peer/peer.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / if let Some(tcp_stream) = tcp_stream.as_mut() { [INFO] [stdout] 172 | | if let Err(e) = tcp_stream.shutdown(Shutdown::Both) { [INFO] [stdout] 173 | | warn!("{:?} Problem shutting down tcp stream: {:?}", self, e); [INFO] [stdout] 174 | | } [INFO] [stdout] 175 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 171 ~ if let Some(tcp_stream) = tcp_stream.as_mut() [INFO] [stdout] 172 ~ && let Err(e) = tcp_stream.shutdown(Shutdown::Both) { [INFO] [stdout] 173 | warn!("{:?} Problem shutting down tcp stream: {:?}", self, e); [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/peer/peer.rs:231:5 [INFO] [stdout] | [INFO] [stdout] 231 | pub fn version(&self) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/script/checker.rs:423:27 [INFO] [stdout] | [INFO] [stdout] 423 | sequence: (499 | SEQUENCE_LOCKTIME_TYPE_FLAG) as u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(499 | SEQUENCE_LOCKTIME_TYPE_FLAG)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/script/checker.rs:431:30 [INFO] [stdout] | [INFO] [stdout] 431 | c.check_sequence((500 | SEQUENCE_LOCKTIME_TYPE_FLAG as i32) as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((500 | SEQUENCE_LOCKTIME_TYPE_FLAG as i32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/script/checker.rs:436:33 [INFO] [stdout] | [INFO] [stdout] 436 | tx.inputs[0].sequence = (500 | SEQUENCE_LOCKTIME_TYPE_FLAG) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(500 | SEQUENCE_LOCKTIME_TYPE_FLAG)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/script/checker.rs:440:30 [INFO] [stdout] | [INFO] [stdout] 440 | c.check_sequence((500 | SEQUENCE_LOCKTIME_TYPE_FLAG as i32) as i32) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `{ (500 | SEQUENCE_LOCKTIME_TYPE_FLAG as i32) }` [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: length comparison to zero [INFO] [stdout] --> src/script/interpreter.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | if branch_exec.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `branch_exec.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: deref which would be done by auto-deref [INFO] [stdout] --> src/script/interpreter.rs:237:42 [INFO] [stdout] | [INFO] [stdout] 237 | second.extend_from_slice(&*top); [INFO] [stdout] | ^^^^^ help: try: `&top` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/script/interpreter.rs:583:25 [INFO] [stdout] | [INFO] [stdout] 583 | v[0] |= neg as u8; [INFO] [stdout] | ^^^^^^^^^ help: try: `neg` [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: length comparison to zero [INFO] [stdout] --> src/script/interpreter.rs:753:5 [INFO] [stdout] | [INFO] [stdout] 753 | sig.len() > 0 && sig[sig.len() - 1] & SIGHASH_FORKID == 0 [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!sig.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: casting the result of `i64::abs()` to u64 [INFO] [stdout] --> src/script/interpreter.rs:855:21 [INFO] [stdout] | [INFO] [stdout] 855 | let mut abs_n = n.abs() as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `n.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using a reference to `Cow` is not recommended [INFO] [stdout] --> src/script/interpreter.rs:949:26 [INFO] [stdout] | [INFO] [stdout] 949 | fn decode_bool<'a>(item: &Cow<'a, [u8]>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `&[u8]` [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] [INFO] [stdout] [INFO] [stdout] warning: use of `default` to create a unit struct [INFO] [stdout] --> src/script/interpreter.rs:976:27 [INFO] [stdout] | [INFO] [stdout] 976 | let mut checker = TransactionlessChecker::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs [INFO] [stdout] = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default [INFO] [stdout] help: remove this call to `default` [INFO] [stdout] | [INFO] [stdout] 976 - let mut checker = TransactionlessChecker::default(); [INFO] [stdout] 976 + let mut checker = TransactionlessChecker; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/script/mod.rs:108:5 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn eval(&self, checker: &mut T, flags: u32) -> Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `script` [INFO] [stdout] --> src/script/mod.rs:273:22 [INFO] [stdout] | [INFO] [stdout] 273 | for j in i..script.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 273 - for j in i..script.len() { [INFO] [stdout] 273 + for in script.iter().skip(i) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/transaction/p2pkh.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | if sig_len < OP_PUSH + 71 || sig_len > OP_PUSH + 73 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(OP_PUSH + 71..=OP_PUSH + 73).contains(&sig_len)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/p2pkh.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn extract_pubkey(unlock_script: &[u8]) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/p2pkh.rs:89:1 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn extract_pubkeyhash(lock_script: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/sighash.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | / pub fn sighash( [INFO] [stdout] 55 | | tx: &Tx, [INFO] [stdout] 56 | | n_input: usize, [INFO] [stdout] 57 | | script_code: &[u8], [INFO] [stdout] ... | [INFO] [stdout] 60 | | cache: &mut SigHashCache, [INFO] [stdout] 61 | | ) -> Result { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/transaction/sighash.rs:165:34 [INFO] [stdout] | [INFO] [stdout] 165 | s.write_u32::(((FORK_ID as u32) << 8) | (sighash_type as u32))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `FORK_ID` [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: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/transaction/sighash.rs:309:21 [INFO] [stdout] | [INFO] [stdout] 309 | hex::decode("76a9147865b0b301119fc3eadc7f3406ff1339908e46d488ac")?.into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `hex::decode("76a9147865b0b301119fc3eadc7f3406ff1339908e46d488ac")?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/transaction/mod.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / pub fn generate_signature( [INFO] [stdout] 41 | | private_key: &[u8; 32], [INFO] [stdout] 42 | | sighash: &Hash256, [INFO] [stdout] 43 | | sighash_type: u8, [INFO] [stdout] 44 | | ) -> Result> { [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/util/bits.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | vec.truncate((len + 7) / 8); [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `len.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/util/bits.rs:86:25 [INFO] [stdout] | [INFO] [stdout] 86 | for j in i / 8..((i + len + 7) / 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(i + len).div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/util/bloom_filter.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn new(insert: f64, pr_false_pos: f64) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/util/bloom_filter.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | if !(0.0 < pr_false_pos && pr_false_pos < 1.0) || !pr_false_pos.is_normal() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(0.0 < pr_false_pos && pr_false_pos < 1.0 && pr_false_pos.is_normal())` [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: redundant closure [INFO] [stdout] --> src/util/bloom_filter.rs:121:22 [INFO] [stdout] | [INFO] [stdout] 121 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/bloom_filter.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/bloom_filter.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/util/hash256.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn decode(s: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/hash256.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has a `#[must_use]` attribute with no message, but returns a type already marked as `#[must_use]` [INFO] [stdout] --> src/util/rx.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | fn poll_timeout(&self, duration: Duration) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: either add some descriptive message or remove the attribute [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Subject` [INFO] [stdout] --> src/util/rx.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn new() -> Self { [INFO] [stdout] 39 | | Self { [INFO] [stdout] 40 | | observers: RwLock::new(Vec::new()), [INFO] [stdout] 41 | | pending: RwLock::new(Vec::new()), [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [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 Subject { [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 `Single` [INFO] [stdout] --> src/util/rx.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | / pub fn new() -> Self { [INFO] [stdout] 93 | | Self { [INFO] [stdout] 94 | | subject: Subject::new(), [INFO] [stdout] 95 | | value: RwLock::new(None), [INFO] [stdout] 96 | | } [INFO] [stdout] 97 | | } [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] 89 + impl Default for Single { [INFO] [stdout] 90 + fn default() -> Self { [INFO] [stdout] 91 + Self::new() [INFO] [stdout] 92 + } [INFO] [stdout] 93 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/serdes.rs:43:43 [INFO] [stdout] | [INFO] [stdout] 43 | reader.read_exact(&mut d).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/util/serdes.rs:54:43 [INFO] [stdout] | [INFO] [stdout] 54 | reader.read_exact(&mut d).map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/wallet/extended_key.rs:111:41 [INFO] [stdout] | [INFO] [stdout] 111 | let v = s.from_base58().map_err(|e| Error::FromBase58Error(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::FromBase58Error` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/wallet/extended_key.rs:194:49 [INFO] [stdout] | [INFO] [stdout] 194 | child_key.0[46..78].copy_from_slice(&child_secret.secret_bytes().as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `child_secret.secret_bytes().as_ref()` [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: redundant closure [INFO] [stdout] --> src/wallet/extended_key.rs:210:22 [INFO] [stdout] | [INFO] [stdout] 210 | .map_err(|e| Error::IOError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::IOError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/wallet/extended_key.rs:241:47 [INFO] [stdout] | [INFO] [stdout] 241 | let index_str = part.trim_end_matches(|c| c == 'H' || c == '\''); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['H', '\'']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` 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/wallet/extended_key.rs:283:35 [INFO] [stdout] | [INFO] [stdout] 283 | key.0[46..78].copy_from_slice(&secret_key.secret_bytes().as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `secret_key.secret_bytes().as_ref()` [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 `vec!` [INFO] [stdout] --> src/script/mod.rs:294:23 [INFO] [stdout] | [INFO] [stdout] 294 | s.append_data(&vec![0; 1]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ help: you can use a slice directly: `&[0; 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/script/mod.rs:298:23 [INFO] [stdout] | [INFO] [stdout] 298 | s.append_data(&vec![0; 75]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use a slice directly: `&[0; 75]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/script/mod.rs:302:23 [INFO] [stdout] | [INFO] [stdout] 302 | s.append_data(&vec![0; 76]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: you can use a slice directly: `&[0; 76]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/util/bloom_filter.rs:171:20 [INFO] [stdout] | [INFO] [stdout] 171 | bf.add(&vec![i as u8; 32]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[i as u8; 32]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/util/bloom_filter.rs:181:16 [INFO] [stdout] | [INFO] [stdout] 181 | bf.add(&vec![5u8; 32]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use a slice directly: `&[5u8; 32]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/util/bloom_filter.rs:182:29 [INFO] [stdout] | [INFO] [stdout] 182 | assert!(bf.contains(&vec![5u8; 32])); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use a slice directly: `&[5u8; 32]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/util/bloom_filter.rs:183:30 [INFO] [stdout] | [INFO] [stdout] 183 | assert!(!bf.contains(&vec![6u8; 32])); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use a slice directly: `&[6u8; 32]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.59s [INFO] running `Command { std: "docker" "inspect" "94e076391db9781f6787dd9e5b17c04d75fe17f4fec01179eed10ac02afc9f90", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "94e076391db9781f6787dd9e5b17c04d75fe17f4fec01179eed10ac02afc9f90", kill_on_drop: false }` [INFO] [stdout] 94e076391db9781f6787dd9e5b17c04d75fe17f4fec01179eed10ac02afc9f90