[INFO] fetching crate hotstuff_rs 0.4.0... [INFO] linting hotstuff_rs-0.4.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate hotstuff_rs 0.4.0 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate hotstuff_rs 0.4.0 [INFO] finished tweaking crates.io crate hotstuff_rs 0.4.0 [INFO] tweaked toml for crates.io crate hotstuff_rs 0.4.0 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate hotstuff_rs 0.4.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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 59 packages to latest compatible versions [INFO] [stderr] Adding base64 v0.21.7 (available: v0.22.1) [INFO] [stderr] Adding borsh v0.10.4 (available: v1.6.1) [INFO] [stderr] Adding fern v0.6.2 (available: v0.7.1) [INFO] [stderr] Adding generic-array v0.14.7 (available: v0.14.9) [INFO] [stderr] Adding rand v0.7.3 (available: v0.10.0) [INFO] [stderr] Adding rand_core v0.6.4 (available: v0.10.0) [INFO] [stderr] Adding typed-builder v0.16.2 (available: v0.23.2) [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] Downloading crates ... [INFO] [stderr] Downloaded borsh-derive-internal v0.10.4 [INFO] [stderr] Downloaded borsh v0.10.4 [INFO] [stderr] Downloaded borsh-schema-derive-internal v0.10.4 [INFO] [stderr] Downloaded typed-builder v0.16.2 [INFO] [stderr] Downloaded borsh-derive v0.10.4 [INFO] [stderr] Downloaded typed-builder-macro v0.16.2 [INFO] [stderr] Downloaded fern v0.6.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] d2b431d431ebff24adf28da9782cc785fc09a19ab82c29eaedd1b398bcfb2c11 [INFO] running `Command { std: "docker" "start" "-a" "d2b431d431ebff24adf28da9782cc785fc09a19ab82c29eaedd1b398bcfb2c11", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d2b431d431ebff24adf28da9782cc785fc09a19ab82c29eaedd1b398bcfb2c11", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2b431d431ebff24adf28da9782cc785fc09a19ab82c29eaedd1b398bcfb2c11", kill_on_drop: false }` [INFO] [stdout] d2b431d431ebff24adf28da9782cc785fc09a19ab82c29eaedd1b398bcfb2c11 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] b7a3c6e186bd859e6deb0829b95113f99ea20655761feab83887e7936c78d137 [INFO] running `Command { std: "docker" "start" "-a" "b7a3c6e186bd859e6deb0829b95113f99ea20655761feab83887e7936c78d137", kill_on_drop: false }` [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling libc v0.2.183 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling getrandom v0.1.16 [INFO] [stderr] Compiling semver v1.0.27 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking once_cell v1.21.4 [INFO] [stderr] Checking cpufeatures v0.2.17 [INFO] [stderr] Compiling proc-macro-crate v0.1.5 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Checking signature v2.2.0 [INFO] [stderr] Checking ed25519 v2.2.3 [INFO] [stderr] Checking hashbrown v0.13.2 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Checking base64 v0.21.7 [INFO] [stderr] Compiling curve25519-dalek v4.1.3 [INFO] [stderr] Checking fern v0.6.2 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking crypto-common v0.1.7 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Compiling borsh-schema-derive-internal v0.10.4 [INFO] [stderr] Compiling borsh-derive-internal v0.10.4 [INFO] [stderr] Compiling borsh-derive v0.10.4 [INFO] [stderr] Compiling curve25519-dalek-derive v0.1.1 [INFO] [stderr] Compiling typed-builder-macro v0.16.2 [INFO] [stderr] Checking borsh v0.10.4 [INFO] [stderr] Checking typed-builder v0.16.2 [INFO] [stderr] Checking ed25519-dalek v2.2.0 [INFO] [stderr] Checking hotstuff_rs v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/app.rs:76:1 [INFO] [stdout] | [INFO] [stdout] 76 | / /// `BlockTreeSnapshot`, but reading it only through [`AppBlockTreeView`]. [INFO] [stdout] 77 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 140 | pub trait App: Send { [INFO] [stdout] | ------------- the comment documents this trait [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 77 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/block_tree/accessors/internal.rs:567:17 [INFO] [stdout] | [INFO] [stdout] 567 | highest_pc: highest_pc, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `highest_pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/block_sync/server.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | ... highest_pc: highest_pc, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `highest_pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/app.rs:76:1 [INFO] [stdout] | [INFO] [stdout] 76 | / /// `BlockTreeSnapshot`, but reading it only through [`AppBlockTreeView`]. [INFO] [stdout] 77 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 140 | pub trait App: Send { [INFO] [stdout] | ------------- the comment documents this trait [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 77 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/block_tree/accessors/internal.rs:567:17 [INFO] [stdout] | [INFO] [stdout] 567 | highest_pc: highest_pc, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `highest_pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/block_sync/server.rs:142:29 [INFO] [stdout] | [INFO] [stdout] 142 | ... highest_pc: highest_pc, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `highest_pc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `chain_id` and `view` are never used [INFO] [stdout] --> src/types/signed_messages.rs:71:8 [INFO] [stdout] | [INFO] [stdout] 69 | pub(crate) trait Vote: SignedMessage { [INFO] [stdout] | ---- methods in this trait [INFO] [stdout] 70 | /// Get the `chain_id` of the chain that the `Vote` is about. [INFO] [stdout] 71 | fn chain_id(&self) -> ChainID; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | fn view(&self) -> ViewNumber; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `quorum` is never used [INFO] [stdout] --> src/types/signed_messages.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 80 | pub(crate) trait Certificate { [INFO] [stdout] | ----------- associated function in this trait [INFO] [stdout] ... [INFO] [stdout] 142 | fn quorum(validator_set_power: TotalPower) -> TotalPower { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:592:21 [INFO] [stdout] | [INFO] [stdout] 592 | UpdateViewError(UpdateViewError), [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `PacemakerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 592 - UpdateViewError(UpdateViewError), [INFO] [stdout] 592 + UpdateViewError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:595:21 [INFO] [stdout] | [INFO] [stdout] 595 | ExtendViewError(ExtendViewError), [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `PacemakerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 595 - ExtendViewError(ExtendViewError), [INFO] [stdout] 595 + ExtendViewError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:598:20 [INFO] [stdout] | [INFO] [stdout] 598 | BlockTreeError(BlockTreeError), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `PacemakerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 598 - BlockTreeError(BlockTreeError), [INFO] [stdout] 598 + BlockTreeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `cur_view` and `next_view` are never read [INFO] [stdout] --> src/pacemaker/implementation.rs:626:9 [INFO] [stdout] | [INFO] [stdout] 624 | NonIncreasingViewError { [INFO] [stdout] | ---------------------- fields in this variant [INFO] [stdout] 625 | /// The current view. [INFO] [stdout] 626 | cur_view: ViewNumber, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 629 | next_view: ViewNumber, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UpdateViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `view` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:635:27 [INFO] [stdout] | [INFO] [stdout] 635 | GetViewTimeoutError { view: ViewNumber }, [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `UpdateViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `view` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:642:33 [INFO] [stdout] | [INFO] [stdout] 642 | TriedToExtendNonEpochView { view: ViewNumber }, [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ExtendViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `view` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:645:27 [INFO] [stdout] | [INFO] [stdout] 645 | GetViewTimeoutError { view: ViewNumber }, [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ExtendViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/hotstuff/implementation.rs:683:20 [INFO] [stdout] | [INFO] [stdout] 683 | BlockTreeError(BlockTreeError), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `HotStuffError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 683 - BlockTreeError(BlockTreeError), [INFO] [stdout] 683 + BlockTreeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/block_sync/client.rs:585:20 [INFO] [stdout] | [INFO] [stdout] 585 | BlockTreeError(BlockTreeError), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `BlockSyncClientError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 585 - BlockTreeError(BlockTreeError), [INFO] [stdout] 585 + BlockTreeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/algorithm.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / pub(crate) fn new( [INFO] [stdout] 52 | | chain_id: ChainID, [INFO] [stdout] 53 | | hotstuff_config: HotStuffConfiguration, [INFO] [stdout] 54 | | pacemaker_config: PacemakerConfiguration, [INFO] [stdout] ... | [INFO] [stdout] 63 | | event_publisher: Option>, [INFO] [stdout] 64 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SignatureSet` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/types/data_types.rs:374:5 [INFO] [stdout] | [INFO] [stdout] 374 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UpdateSet` [INFO] [stdout] --> src/types/update_sets.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | / pub fn new() -> Self { [INFO] [stdout] 36 | | Self { [INFO] [stdout] 37 | | inserts: HashMap::new(), [INFO] [stdout] 38 | | deletes: HashSet::new(), [INFO] [stdout] 39 | | } [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 30 + impl Default for UpdateSet [INFO] [stdout] 31 + where [INFO] [stdout] 32 + K:, [INFO] [stdout] 33 + { [INFO] [stdout] 34 + fn default() -> Self { [INFO] [stdout] 35 + Self::new() [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/update_sets.rs:110:22 [INFO] [stdout] | [INFO] [stdout] 110 | .map(|vk_bytes| VerifyingKey::from_bytes(vk_bytes)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `VerifyingKey::from_bytes` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/types/crypto_primitives.rs:32:40 [INFO] [stdout] | [INFO] [stdout] 32 | pub(crate) fn sign(&self, message: &Vec) -> SignatureBytes { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub(crate) fn sign(&self, message: &Vec) -> SignatureBytes { [INFO] [stdout] 32 + pub(crate) fn sign(&self, message: &[u8]) -> SignatureBytes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/types/block.rs:79:23 [INFO] [stdout] | [INFO] [stdout] 79 | hasher.update(&height.try_to_vec().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `height.try_to_vec().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/types/block.rs:80:23 [INFO] [stdout] | [INFO] [stdout] 80 | hasher.update(&justify.try_to_vec().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `justify.try_to_vec().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/types/block.rs:81:23 [INFO] [stdout] | [INFO] [stdout] 81 | hasher.update(&data_hash.try_to_vec().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_hash.try_to_vec().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/types/validator_set.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | / match self [INFO] [stdout] 147 | | .validators [INFO] [stdout] 148 | | .binary_search_by(|v| v.to_bytes().cmp(&validator_bytes)) [INFO] [stdout] ... | [INFO] [stdout] 151 | | Err(_) => None, [INFO] [stdout] 152 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] help: replace with [INFO] [stdout] | [INFO] [stdout] 146 ~ self [INFO] [stdout] 147 + .validators [INFO] [stdout] 148 + .binary_search_by(|v| v.to_bytes().cmp(&validator_bytes)).ok() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/validator_set.rs:203:23 [INFO] [stdout] | [INFO] [stdout] 203 | .flat_map(|pk_bytes| VerifyingKey::from_bytes(pk_bytes)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `VerifyingKey::from_bytes` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/types/validator_set.rs:226:1 [INFO] [stdout] | [INFO] [stdout] 226 | impl Into for &ValidatorSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From<&types::validator_set::ValidatorSet>` [INFO] [stdout] | [INFO] [stdout] 226 ~ impl From<&ValidatorSet> for ValidatorSetBytes { [INFO] [stdout] 227 ~ fn from(val: &ValidatorSet) -> Self { [INFO] [stdout] 228 ~ let new_validators = val.validators.iter().map(|pk| pk.to_bytes()).collect(); [INFO] [stdout] 229 | [INFO] [stdout] 230 | let mut new_powers = >::new(); [INFO] [stdout] 231 ~ val.powers [INFO] [stdout] 232 | .keys() [INFO] [stdout] 233 ~ .zip(val.powers.values()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its scrutinee and body [INFO] [stdout] --> src/types/validator_set.rs:234:32 [INFO] [stdout] | [INFO] [stdout] 234 | .for_each(|(k, v)| match new_powers.insert(k.to_bytes(), *v) { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 235 | | _ => (), [INFO] [stdout] 236 | | }); // Safety: Insert should always return None [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using the scrutinee and body instead [INFO] [stdout] | [INFO] [stdout] 234 ~ .for_each(|(k, v)| { [INFO] [stdout] 235 + new_powers.insert(k.to_bytes(), *v); [INFO] [stdout] 236 + () [INFO] [stdout] 237 ~ }); // Safety: Insert should always return None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/types/validator_set.rs:325:9 [INFO] [stdout] | [INFO] [stdout] 325 | / match self { [INFO] [stdout] 326 | | Self::Pending(_) => true, [INFO] [stdout] 327 | | _ => false, [INFO] [stdout] 328 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 325 - match self { [INFO] [stdout] 326 - Self::Pending(_) => true, [INFO] [stdout] 327 - _ => false, [INFO] [stdout] 328 - } [INFO] [stdout] 325 + matches!(self, Self::Pending(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/logging.rs:510:54 [INFO] [stdout] | [INFO] [stdout] 510 | ProgressCertificate::PhaseCertificate(pc) => String::from(format!( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 511 | | "Phase Certificate, view: {}, phase: {:?}, block: {}, no. of signatures: {}", [INFO] [stdout] 512 | | pc.view, [INFO] [stdout] 513 | | pc.phase, [INFO] [stdout] 514 | | first_seven_base64_chars(&pc.block.bytes()), [INFO] [stdout] 515 | | pc.signatures.iter().filter(|sig| sig.is_some()).count() [INFO] [stdout] 516 | | )), [INFO] [stdout] | |__________^ [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] help: consider removing `String::from()` [INFO] [stdout] | [INFO] [stdout] 510 ~ ProgressCertificate::PhaseCertificate(pc) => format!( [INFO] [stdout] 511 + "Phase Certificate, view: {}, phase: {:?}, block: {}, no. of signatures: {}", [INFO] [stdout] 512 + pc.view, [INFO] [stdout] 513 + pc.phase, [INFO] [stdout] 514 + first_seven_base64_chars(&pc.block.bytes()), [INFO] [stdout] 515 + pc.signatures.iter().filter(|sig| sig.is_some()).count() [INFO] [stdout] 516 ~ ), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/logging.rs:518:13 [INFO] [stdout] | [INFO] [stdout] 518 | String::from(format!("Timeout Certificate, view: {}", tc.view)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Timeout Certificate, view: {}", tc.view)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `chain_id` and `view` are never used [INFO] [stdout] --> src/types/signed_messages.rs:71:8 [INFO] [stdout] | [INFO] [stdout] 69 | pub(crate) trait Vote: SignedMessage { [INFO] [stdout] | ---- methods in this trait [INFO] [stdout] 70 | /// Get the `chain_id` of the chain that the `Vote` is about. [INFO] [stdout] 71 | fn chain_id(&self) -> ChainID; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 74 | fn view(&self) -> ViewNumber; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `quorum` is never used [INFO] [stdout] --> src/types/signed_messages.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 80 | pub(crate) trait Certificate { [INFO] [stdout] | ----------- associated function in this trait [INFO] [stdout] ... [INFO] [stdout] 142 | fn quorum(validator_set_power: TotalPower) -> TotalPower { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:592:21 [INFO] [stdout] | [INFO] [stdout] 592 | UpdateViewError(UpdateViewError), [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `PacemakerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 592 - UpdateViewError(UpdateViewError), [INFO] [stdout] 592 + UpdateViewError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:595:21 [INFO] [stdout] | [INFO] [stdout] 595 | ExtendViewError(ExtendViewError), [INFO] [stdout] | --------------- ^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `PacemakerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 595 - ExtendViewError(ExtendViewError), [INFO] [stdout] 595 + ExtendViewError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:598:20 [INFO] [stdout] | [INFO] [stdout] 598 | BlockTreeError(BlockTreeError), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `PacemakerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 598 - BlockTreeError(BlockTreeError), [INFO] [stdout] 598 + BlockTreeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `cur_view` and `next_view` are never read [INFO] [stdout] --> src/pacemaker/implementation.rs:626:9 [INFO] [stdout] | [INFO] [stdout] 624 | NonIncreasingViewError { [INFO] [stdout] | ---------------------- fields in this variant [INFO] [stdout] 625 | /// The current view. [INFO] [stdout] 626 | cur_view: ViewNumber, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 629 | next_view: ViewNumber, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UpdateViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `view` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:635:27 [INFO] [stdout] | [INFO] [stdout] 635 | GetViewTimeoutError { view: ViewNumber }, [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `UpdateViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `view` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:642:33 [INFO] [stdout] | [INFO] [stdout] 642 | TriedToExtendNonEpochView { view: ViewNumber }, [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ExtendViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `view` is never read [INFO] [stdout] --> src/pacemaker/implementation.rs:645:27 [INFO] [stdout] | [INFO] [stdout] 645 | GetViewTimeoutError { view: ViewNumber }, [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ExtendViewError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/hotstuff/implementation.rs:683:20 [INFO] [stdout] | [INFO] [stdout] 683 | BlockTreeError(BlockTreeError), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `HotStuffError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 683 - BlockTreeError(BlockTreeError), [INFO] [stdout] 683 + BlockTreeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/block_sync/client.rs:585:20 [INFO] [stdout] | [INFO] [stdout] 585 | BlockTreeError(BlockTreeError), [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `BlockSyncClientError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 585 - BlockTreeError(BlockTreeError), [INFO] [stdout] 585 + BlockTreeError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/pacemaker/messages.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | impl Into for PacemakerMessage { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 103 ~ impl From for ProgressMessage { [INFO] [stdout] 104 ~ fn from(val: PacemakerMessage) -> Self { [INFO] [stdout] 105 ~ ProgressMessage::PacemakerMessage(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (12/7) [INFO] [stdout] --> src/algorithm.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / pub(crate) fn new( [INFO] [stdout] 52 | | chain_id: ChainID, [INFO] [stdout] 53 | | hotstuff_config: HotStuffConfiguration, [INFO] [stdout] 54 | | pacemaker_config: PacemakerConfiguration, [INFO] [stdout] ... | [INFO] [stdout] 63 | | event_publisher: Option>, [INFO] [stdout] 64 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&Instant>` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:74:23 [INFO] [stdout] | [INFO] [stdout] 74 | let timeout = state [INFO] [stdout] | _______________________^ [INFO] [stdout] 75 | | .timeouts [INFO] [stdout] 76 | | .get(&init_view) [INFO] [stdout] 77 | | .clone() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 74 ~ let timeout = state [INFO] [stdout] 75 + .timeouts [INFO] [stdout] 76 + .get(&init_view) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:215:21 [INFO] [stdout] | [INFO] [stdout] 215 | origin: origin.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*origin` [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 `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:328:21 [INFO] [stdout] | [INFO] [stdout] 328 | origin: origin.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*origin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pacemaker/implementation.rs:344:31 [INFO] [stdout] | [INFO] [stdout] 344 | tc.is_correct(&block_tree)? [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `block_tree` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pacemaker/implementation.rs:359:47 [INFO] [stdout] | [INFO] [stdout] 359 | block_tree.set_highest_tc(&tc)?; [INFO] [stdout] | ^^^ help: change this to: `tc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ViewNumber` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:458:23 [INFO] [stdout] | [INFO] [stdout] 458 | view: cur_view.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cur_view` [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: all variants have the same postfix: `Error` [INFO] [stdout] --> src/pacemaker/implementation.rs:590:1 [INFO] [stdout] | [INFO] [stdout] 590 | / pub enum PacemakerError { [INFO] [stdout] 591 | | /// See: [`UpdateViewError`]. [INFO] [stdout] 592 | | UpdateViewError(UpdateViewError), [INFO] [stdout] ... | [INFO] [stdout] 598 | | BlockTreeError(BlockTreeError), [INFO] [stdout] 599 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:683:17 [INFO] [stdout] | [INFO] [stdout] 683 | let p_max = validator_set [INFO] [stdout] | _________________^ [INFO] [stdout] 684 | | .validators_and_powers() [INFO] [stdout] 685 | | .iter() [INFO] [stdout] 686 | | .map(|(_, power)| power.int()) [INFO] [stdout] 687 | | .max() [INFO] [stdout] 688 | | .expect("The validator set cannot be empty!") [INFO] [stdout] 689 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 683 ~ let p_max = validator_set [INFO] [stdout] 684 + .validators_and_powers() [INFO] [stdout] 685 + .iter() [INFO] [stdout] 686 + .map(|(_, power)| power.int()) [INFO] [stdout] 687 + .max() [INFO] [stdout] 688 ~ .expect("The validator set cannot be empty!"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SignatureSet` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/types/data_types.rs:374:5 [INFO] [stdout] | [INFO] [stdout] 374 | pub fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pacemaker/implementation.rs:712:5 [INFO] [stdout] | [INFO] [stdout] 712 | view.int() % (epoch_length.int() as u64) == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `view.int().is_multiple_of(epoch_length.int() as u64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/pacemaker/implementation.rs:744:46 [INFO] [stdout] | [INFO] [stdout] 744 | let leader_sequence: Vec = (0..total_power) [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 745 | | .into_iter() [INFO] [stdout] | |____________________^ help: consider removing `.into_iter()`: `(0..total_power)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UpdateSet` [INFO] [stdout] --> src/types/update_sets.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | / pub fn new() -> Self { [INFO] [stdout] 36 | | Self { [INFO] [stdout] 37 | | inserts: HashMap::new(), [INFO] [stdout] 38 | | deletes: HashSet::new(), [INFO] [stdout] 39 | | } [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 30 + impl Default for UpdateSet [INFO] [stdout] 31 + where [INFO] [stdout] 32 + K:, [INFO] [stdout] 33 + { [INFO] [stdout] 34 + fn default() -> Self { [INFO] [stdout] 35 + Self::new() [INFO] [stdout] 36 + } [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/update_sets.rs:110:22 [INFO] [stdout] | [INFO] [stdout] 110 | .map(|vk_bytes| VerifyingKey::from_bytes(vk_bytes)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `VerifyingKey::from_bytes` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/types/crypto_primitives.rs:32:40 [INFO] [stdout] | [INFO] [stdout] 32 | pub(crate) fn sign(&self, message: &Vec) -> SignatureBytes { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - pub(crate) fn sign(&self, message: &Vec) -> SignatureBytes { [INFO] [stdout] 32 + pub(crate) fn sign(&self, message: &[u8]) -> SignatureBytes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/hotstuff/messages.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into for HotStuffMessage { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for ProgressMessage { [INFO] [stdout] 107 ~ fn from(val: HotStuffMessage) -> Self { [INFO] [stdout] 108 ~ ProgressMessage::HotStuffMessage(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/types/block.rs:79:23 [INFO] [stdout] | [INFO] [stdout] 79 | hasher.update(&height.try_to_vec().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `height.try_to_vec().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/types/block.rs:80:23 [INFO] [stdout] | [INFO] [stdout] 80 | hasher.update(&justify.try_to_vec().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `justify.try_to_vec().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/types/block.rs:81:23 [INFO] [stdout] | [INFO] [stdout] 81 | hasher.update(&data_hash.try_to_vec().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_hash.try_to_vec().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/types/validator_set.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | / match self [INFO] [stdout] 147 | | .validators [INFO] [stdout] 148 | | .binary_search_by(|v| v.to_bytes().cmp(&validator_bytes)) [INFO] [stdout] ... | [INFO] [stdout] 151 | | Err(_) => None, [INFO] [stdout] 152 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] help: replace with [INFO] [stdout] | [INFO] [stdout] 146 ~ self [INFO] [stdout] 147 + .validators [INFO] [stdout] 148 + .binary_search_by(|v| v.to_bytes().cmp(&validator_bytes)).ok() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/validator_set.rs:203:23 [INFO] [stdout] | [INFO] [stdout] 203 | .flat_map(|pk_bytes| VerifyingKey::from_bytes(pk_bytes)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `VerifyingKey::from_bytes` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/types/validator_set.rs:226:1 [INFO] [stdout] | [INFO] [stdout] 226 | impl Into for &ValidatorSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From<&types::validator_set::ValidatorSet>` [INFO] [stdout] | [INFO] [stdout] 226 ~ impl From<&ValidatorSet> for ValidatorSetBytes { [INFO] [stdout] 227 ~ fn from(val: &ValidatorSet) -> Self { [INFO] [stdout] 228 ~ let new_validators = val.validators.iter().map(|pk| pk.to_bytes()).collect(); [INFO] [stdout] 229 | [INFO] [stdout] 230 | let mut new_powers = >::new(); [INFO] [stdout] 231 ~ val.powers [INFO] [stdout] 232 | .keys() [INFO] [stdout] 233 ~ .zip(val.powers.values()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be replaced by its scrutinee and body [INFO] [stdout] --> src/types/validator_set.rs:234:32 [INFO] [stdout] | [INFO] [stdout] 234 | .for_each(|(k, v)| match new_powers.insert(k.to_bytes(), *v) { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 235 | | _ => (), [INFO] [stdout] 236 | | }); // Safety: Insert should always return None [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using the scrutinee and body instead [INFO] [stdout] | [INFO] [stdout] 234 ~ .for_each(|(k, v)| { [INFO] [stdout] 235 + new_powers.insert(k.to_bytes(), *v); [INFO] [stdout] 236 + () [INFO] [stdout] 237 ~ }); // Safety: Insert should always return None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/types/validator_set.rs:325:9 [INFO] [stdout] | [INFO] [stdout] 325 | / match self { [INFO] [stdout] 326 | | Self::Pending(_) => true, [INFO] [stdout] 327 | | _ => false, [INFO] [stdout] 328 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 325 - match self { [INFO] [stdout] 326 - Self::Pending(_) => true, [INFO] [stdout] 327 - _ => false, [INFO] [stdout] 328 - } [INFO] [stdout] 325 + matches!(self, Self::Pending(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ViewNumber` which implements the `Copy` trait [INFO] [stdout] --> src/hotstuff/implementation.rs:178:19 [INFO] [stdout] | [INFO] [stdout] 178 | view: self.view_info.view.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.view_info.view` [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: doc list item overindented [INFO] [stdout] --> src/hotstuff/roles.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | /// [advance view messages](crate::pacemaker::messages::AdvanceView). [INFO] [stdout] | ^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` 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/hotstuff/roles.rs:122:23 [INFO] [stdout] | [INFO] [stdout] 122 | .contains(&replica) [INFO] [stdout] | ^^^^^^^^ help: change this to: `replica` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hotstuff/roles.rs:128:31 [INFO] [stdout] | [INFO] [stdout] 128 | .contains(&replica) [INFO] [stdout] | ^^^^^^^^ help: change this to: `replica` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hotstuff/roles.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 132 | .contains(&replica), [INFO] [stdout] | ^^^^^^^^ help: change this to: `replica` [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: doc list item overindented [INFO] [stdout] --> src/hotstuff/roles.rs:187:5 [INFO] [stdout] | [INFO] [stdout] 187 | /// if the most recently initiated validator set update has been decided). [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/block_tree/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | //! when a "conflicting" block is committed. [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 19 | //! when a "conflicting" block is committed. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/public.rs:58:28 [INFO] [stdout] | [INFO] [stdout] 58 | block: block_hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/public.rs:94:36 [INFO] [stdout] | [INFO] [stdout] 94 | ... block: cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor` [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: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/logging.rs:510:54 [INFO] [stdout] | [INFO] [stdout] 510 | ProgressCertificate::PhaseCertificate(pc) => String::from(format!( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 511 | | "Phase Certificate, view: {}, phase: {:?}, block: {}, no. of signatures: {}", [INFO] [stdout] 512 | | pc.view, [INFO] [stdout] 513 | | pc.phase, [INFO] [stdout] 514 | | first_seven_base64_chars(&pc.block.bytes()), [INFO] [stdout] 515 | | pc.signatures.iter().filter(|sig| sig.is_some()).count() [INFO] [stdout] 516 | | )), [INFO] [stdout] | |__________^ [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] help: consider removing `String::from()` [INFO] [stdout] | [INFO] [stdout] 510 ~ ProgressCertificate::PhaseCertificate(pc) => format!( [INFO] [stdout] 511 + "Phase Certificate, view: {}, phase: {:?}, block: {}, no. of signatures: {}", [INFO] [stdout] 512 + pc.view, [INFO] [stdout] 513 + pc.phase, [INFO] [stdout] 514 + first_seven_base64_chars(&pc.block.bytes()), [INFO] [stdout] 515 + pc.signatures.iter().filter(|sig| sig.is_some()).count() [INFO] [stdout] 516 ~ ), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:119:40 [INFO] [stdout] | [INFO] [stdout] 119 | wb.set_committed_validator_set(&committed_validator_set)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `committed_validator_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:120:39 [INFO] [stdout] | [INFO] [stdout] 120 | wb.set_previous_validator_set(&previous_validator_set)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `previous_validator_set` [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 conversion to the same type: `std::string::String` [INFO] [stdout] --> src/logging.rs:518:13 [INFO] [stdout] | [INFO] [stdout] 518 | String::from(format!("Timeout Certificate, view: {}", tc.view)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Timeout Certificate, view: {}", tc.view)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:154:22 [INFO] [stdout] | [INFO] [stdout] 154 | let parent = match parent { [INFO] [stdout] | ______________________^ [INFO] [stdout] 155 | | None => None, [INFO] [stdout] 156 | | Some(&b) => Some(b), [INFO] [stdout] 157 | | }; [INFO] [stdout] | |_________^ help: try: `parent.map(|&b| b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:164:18 [INFO] [stdout] | [INFO] [stdout] 164 | .map(|pc| { [INFO] [stdout] | __________________^ [INFO] [stdout] 165 | | if !pc.is_genesis_pc() { [INFO] [stdout] 166 | | Some(pc.block) [INFO] [stdout] 167 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 170 | | }) [INFO] [stdout] 171 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 164 ~ .and_then(|pc| { [INFO] [stdout] 165 + if !pc.is_genesis_pc() { [INFO] [stdout] 166 + Some(pc.block) [INFO] [stdout] 167 + } else { [INFO] [stdout] 168 + None [INFO] [stdout] 169 + } [INFO] [stdout] 170 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:176:14 [INFO] [stdout] | [INFO] [stdout] 176 | .map(|block| { [INFO] [stdout] | ______________^ [INFO] [stdout] 177 | | self.block_height(&block).map(|res| { [INFO] [stdout] 178 | | if res.is_none() { [INFO] [stdout] 179 | | Err(BlockTreeError::BlockExpectedButNotFound { [INFO] [stdout] ... | [INFO] [stdout] 186 | | }) [INFO] [stdout] 187 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 176 ~ .flat_map(|block| { [INFO] [stdout] 177 + self.block_height(&block).map(|res| { [INFO] [stdout] 178 + if res.is_none() { [INFO] [stdout] 179 + Err(BlockTreeError::BlockExpectedButNotFound { [INFO] [stdout] 180 + block: block.clone(), [INFO] [stdout] 181 + }) [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + Ok(res.unwrap()) [INFO] [stdout] 184 + } [INFO] [stdout] 185 + }) [INFO] [stdout] 186 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `res` after checking its variant with `is_none` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:183:28 [INFO] [stdout] | [INFO] [stdout] 178 | if res.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = res` [INFO] [stdout] ... [INFO] [stdout] 183 | Ok(res.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:180:36 [INFO] [stdout] | [INFO] [stdout] 180 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `block` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:204:18 [INFO] [stdout] | [INFO] [stdout] 204 | .map(|block| self.pending_app_state_updates(&block)) [INFO] [stdout] | __________________^ [INFO] [stdout] 205 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|block| self.pending_app_state_updates(&block))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/block_tree/accessors/internal.rs:258:14 [INFO] [stdout] | [INFO] [stdout] 258 | .unwrap_or(ChildrenList::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/pacemaker/messages.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | impl Into for PacemakerMessage { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 103 ~ impl From for ProgressMessage { [INFO] [stdout] 104 ~ fn from(val: PacemakerMessage) -> Self { [INFO] [stdout] 105 ~ ProgressMessage::PacemakerMessage(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:304:70 [INFO] [stdout] | [INFO] [stdout] 304 | if let Some(new_locked_pc) = invariants::pc_to_lock(justify, &self)? { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:310:67 [INFO] [stdout] | [INFO] [stdout] 310 | if let Some(block) = invariants::block_to_commit(justify, &self)? { [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:398:18 [INFO] [stdout] | [INFO] [stdout] 398 | .map(|pc| { [INFO] [stdout] | __________________^ [INFO] [stdout] 399 | | if !pc.is_genesis_pc() { [INFO] [stdout] 400 | | Some(pc.block) [INFO] [stdout] 401 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 404 | | }) [INFO] [stdout] 405 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 398 ~ .and_then(|pc| { [INFO] [stdout] 399 + if !pc.is_genesis_pc() { [INFO] [stdout] 400 + Some(pc.block) [INFO] [stdout] 401 + } else { [INFO] [stdout] 402 + None [INFO] [stdout] 403 + } [INFO] [stdout] 404 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:438:78 [INFO] [stdout] | [INFO] [stdout] 438 | .ok_or(BlockTreeError::BlockExpectedButNotFound { block: b.clone() })?; [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [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 `Option<&Instant>` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:74:23 [INFO] [stdout] | [INFO] [stdout] 74 | let timeout = state [INFO] [stdout] | _______________________^ [INFO] [stdout] 75 | | .timeouts [INFO] [stdout] 76 | | .get(&init_view) [INFO] [stdout] 77 | | .clone() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 74 ~ let timeout = state [INFO] [stdout] 75 + .timeouts [INFO] [stdout] 76 + .get(&init_view) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/block_tree/accessors/internal.rs:562:27 [INFO] [stdout] | [INFO] [stdout] 562 | committed_blocks: &Vec<(CryptoHash, Option)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 562 - committed_blocks: &Vec<(CryptoHash, Option)>, [INFO] [stdout] 562 + committed_blocks: &[(CryptoHash, Option)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:585:28 [INFO] [stdout] | [INFO] [stdout] 585 | block: b.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [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 `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:215:21 [INFO] [stdout] | [INFO] [stdout] 215 | origin: origin.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*origin` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:590:28 [INFO] [stdout] | [INFO] [stdout] 590 | block: b.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [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 `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:328:21 [INFO] [stdout] | [INFO] [stdout] 328 | origin: origin.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*origin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pacemaker/implementation.rs:344:31 [INFO] [stdout] | [INFO] [stdout] 344 | tc.is_correct(&block_tree)? [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `block_tree` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pacemaker/implementation.rs:359:47 [INFO] [stdout] | [INFO] [stdout] 359 | block_tree.set_highest_tc(&tc)?; [INFO] [stdout] | ^^^ help: change this to: `tc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ViewNumber` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:458:23 [INFO] [stdout] | [INFO] [stdout] 458 | view: cur_view.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cur_view` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:795:32 [INFO] [stdout] | [INFO] [stdout] 795 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:807:32 [INFO] [stdout] | [INFO] [stdout] 807 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:819:32 [INFO] [stdout] | [INFO] [stdout] 819 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:832:32 [INFO] [stdout] | [INFO] [stdout] 832 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> src/pacemaker/implementation.rs:590:1 [INFO] [stdout] | [INFO] [stdout] 590 | / pub enum PacemakerError { [INFO] [stdout] 591 | | /// See: [`UpdateViewError`]. [INFO] [stdout] 592 | | UpdateViewError(UpdateViewError), [INFO] [stdout] ... | [INFO] [stdout] 598 | | BlockTreeError(BlockTreeError), [INFO] [stdout] 599 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:847:36 [INFO] [stdout] | [INFO] [stdout] 847 | ... block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:884:9 [INFO] [stdout] | [INFO] [stdout] 884 | / Ok(self.0.set( [INFO] [stdout] 885 | | &concat(&variables::BLOCK_AT_HEIGHT, &height.try_to_vec().unwrap()), [INFO] [stdout] 886 | | &block [INFO] [stdout] 887 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 891 | | })?, [INFO] [stdout] 892 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 884 ~ let _: () = self.0.set( [INFO] [stdout] 885 + &concat(&variables::BLOCK_AT_HEIGHT, &height.try_to_vec().unwrap()), [INFO] [stdout] 886 + &block [INFO] [stdout] 887 + .try_to_vec() [INFO] [stdout] 888 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 889 + key: Key::BlockAtHeight { height }, [INFO] [stdout] 890 + source: err, [INFO] [stdout] 891 + })?, [INFO] [stdout] 892 + ); [INFO] [stdout] 893 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:902:9 [INFO] [stdout] | [INFO] [stdout] 902 | / Ok(self.0.set( [INFO] [stdout] 903 | | &concat(&variables::BLOCK_TO_CHILDREN, &block.bytes()), [INFO] [stdout] 904 | | &children [INFO] [stdout] 905 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 911 | | })?, [INFO] [stdout] 912 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 902 ~ let _: () = self.0.set( [INFO] [stdout] 903 + &concat(&variables::BLOCK_TO_CHILDREN, &block.bytes()), [INFO] [stdout] 904 + &children [INFO] [stdout] 905 + .try_to_vec() [INFO] [stdout] 906 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 907 + key: Key::BlockChildren { [INFO] [stdout] 908 + block: block.clone(), [INFO] [stdout] 909 + }, [INFO] [stdout] 910 + source: err, [INFO] [stdout] 911 + })?, [INFO] [stdout] 912 + ); [INFO] [stdout] 913 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:908:32 [INFO] [stdout] | [INFO] [stdout] 908 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:938:9 [INFO] [stdout] | [INFO] [stdout] 938 | / Ok(self.0.set( [INFO] [stdout] 939 | | &concat(&variables::PENDING_APP_STATE_UPDATES, &block.bytes()), [INFO] [stdout] 940 | | &app_state_updates [INFO] [stdout] 941 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 947 | | })?, [INFO] [stdout] 948 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 938 ~ let _: () = self.0.set( [INFO] [stdout] 939 + &concat(&variables::PENDING_APP_STATE_UPDATES, &block.bytes()), [INFO] [stdout] 940 + &app_state_updates [INFO] [stdout] 941 + .try_to_vec() [INFO] [stdout] 942 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 943 + key: Key::PendingAppStateUpdates { [INFO] [stdout] 944 + block: block.clone(), [INFO] [stdout] 945 + }, [INFO] [stdout] 946 + source: err, [INFO] [stdout] 947 + })?, [INFO] [stdout] 948 + ); [INFO] [stdout] 949 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/pacemaker/implementation.rs:683:17 [INFO] [stdout] | [INFO] [stdout] 683 | let p_max = validator_set [INFO] [stdout] | _________________^ [INFO] [stdout] 684 | | .validators_and_powers() [INFO] [stdout] 685 | | .iter() [INFO] [stdout] 686 | | .map(|(_, power)| power.int()) [INFO] [stdout] 687 | | .max() [INFO] [stdout] 688 | | .expect("The validator set cannot be empty!") [INFO] [stdout] 689 | | .clone(); [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] help: try removing the `clone` call [INFO] [stdout] | [INFO] [stdout] 683 ~ let p_max = validator_set [INFO] [stdout] 684 + .validators_and_powers() [INFO] [stdout] 685 + .iter() [INFO] [stdout] 686 + .map(|(_, power)| power.int()) [INFO] [stdout] 687 + .max() [INFO] [stdout] 688 ~ .expect("The validator set cannot be empty!"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:944:32 [INFO] [stdout] | [INFO] [stdout] 944 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pacemaker/implementation.rs:712:5 [INFO] [stdout] | [INFO] [stdout] 712 | view.int() % (epoch_length.int() as u64) == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `view.int().is_multiple_of(epoch_length.int() as u64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:975:9 [INFO] [stdout] | [INFO] [stdout] 975 | / Ok(self.0.set( [INFO] [stdout] 976 | | &variables::COMMITTED_VALIDATOR_SET, [INFO] [stdout] 977 | | &validator_set_bytes [INFO] [stdout] 978 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 982 | | })?, [INFO] [stdout] 983 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 975 ~ let _: () = self.0.set( [INFO] [stdout] 976 + &variables::COMMITTED_VALIDATOR_SET, [INFO] [stdout] 977 + &validator_set_bytes [INFO] [stdout] 978 + .try_to_vec() [INFO] [stdout] 979 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 980 + key: Key::CommittedValidatorSet, [INFO] [stdout] 981 + source: err, [INFO] [stdout] 982 + })?, [INFO] [stdout] 983 + ); [INFO] [stdout] 984 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:995:9 [INFO] [stdout] | [INFO] [stdout] 995 | / Ok(self.0.set( [INFO] [stdout] 996 | | &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 997 | | &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 998 | | KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1004 | | })?, [INFO] [stdout] 1005 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 995 ~ let _: () = self.0.set( [INFO] [stdout] 996 + &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 997 + &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 998 + KVSetError::SerializeValueError { [INFO] [stdout] 999 + key: Key::ValidatorSetUpdatesStatus { [INFO] [stdout] 1000 + block: block.clone(), [INFO] [stdout] 1001 + }, [INFO] [stdout] 1002 + source: err, [INFO] [stdout] 1003 + } [INFO] [stdout] 1004 + })?, [INFO] [stdout] 1005 + ); [INFO] [stdout] 1006 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1000:32 [INFO] [stdout] | [INFO] [stdout] 1000 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1013:9 [INFO] [stdout] | [INFO] [stdout] 1013 | / Ok(self.0.set( [INFO] [stdout] 1014 | | &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 1015 | | &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 1016 | | KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1022 | | })?, [INFO] [stdout] 1023 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1013 ~ let _: () = self.0.set( [INFO] [stdout] 1014 + &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 1015 + &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 1016 + KVSetError::SerializeValueError { [INFO] [stdout] 1017 + key: Key::ValidatorSetUpdatesStatus { [INFO] [stdout] 1018 + block: block.clone(), [INFO] [stdout] 1019 + }, [INFO] [stdout] 1020 + source: err, [INFO] [stdout] 1021 + } [INFO] [stdout] 1022 + })?, [INFO] [stdout] 1023 + ); [INFO] [stdout] 1024 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1018:32 [INFO] [stdout] | [INFO] [stdout] 1018 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1036:9 [INFO] [stdout] | [INFO] [stdout] 1036 | / Ok(self.0.set( [INFO] [stdout] 1037 | | &variables::LOCKED_PC, [INFO] [stdout] 1038 | | &pc.try_to_vec() [INFO] [stdout] 1039 | | .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1042 | | })?, [INFO] [stdout] 1043 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1036 ~ let _: () = self.0.set( [INFO] [stdout] 1037 + &variables::LOCKED_PC, [INFO] [stdout] 1038 + &pc.try_to_vec() [INFO] [stdout] 1039 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1040 + key: Key::LockedPC, [INFO] [stdout] 1041 + source: err, [INFO] [stdout] 1042 + })?, [INFO] [stdout] 1043 + ); [INFO] [stdout] 1044 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1049:9 [INFO] [stdout] | [INFO] [stdout] 1049 | / Ok(self.0.set( [INFO] [stdout] 1050 | | &variables::HIGHEST_VIEW_ENTERED, [INFO] [stdout] 1051 | | &view [INFO] [stdout] 1052 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1056 | | })?, [INFO] [stdout] 1057 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1049 ~ let _: () = self.0.set( [INFO] [stdout] 1050 + &variables::HIGHEST_VIEW_ENTERED, [INFO] [stdout] 1051 + &view [INFO] [stdout] 1052 + .try_to_vec() [INFO] [stdout] 1053 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1054 + key: Key::HighestTC, [INFO] [stdout] 1055 + source: err, [INFO] [stdout] 1056 + })?, [INFO] [stdout] 1057 + ); [INFO] [stdout] 1058 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1063:9 [INFO] [stdout] | [INFO] [stdout] 1063 | / Ok(self.0.set( [INFO] [stdout] 1064 | | &variables::HIGHEST_PC, [INFO] [stdout] 1065 | | &pc.try_to_vec() [INFO] [stdout] 1066 | | .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1069 | | })?, [INFO] [stdout] 1070 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1063 ~ let _: () = self.0.set( [INFO] [stdout] 1064 + &variables::HIGHEST_PC, [INFO] [stdout] 1065 + &pc.try_to_vec() [INFO] [stdout] 1066 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1067 + key: Key::HighestTC, [INFO] [stdout] 1068 + source: err, [INFO] [stdout] 1069 + })?, [INFO] [stdout] 1070 + ); [INFO] [stdout] 1071 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1079:9 [INFO] [stdout] | [INFO] [stdout] 1079 | / Ok(self.0.set( [INFO] [stdout] 1080 | | &variables::HIGHEST_COMMITTED_BLOCK, [INFO] [stdout] 1081 | | &block [INFO] [stdout] 1082 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1086 | | })?, [INFO] [stdout] 1087 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1079 ~ let _: () = self.0.set( [INFO] [stdout] 1080 + &variables::HIGHEST_COMMITTED_BLOCK, [INFO] [stdout] 1081 + &block [INFO] [stdout] 1082 + .try_to_vec() [INFO] [stdout] 1083 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1084 + key: Key::HighestCommittedBlock, [INFO] [stdout] 1085 + source: err, [INFO] [stdout] 1086 + })?, [INFO] [stdout] 1087 + ); [INFO] [stdout] 1088 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1093:9 [INFO] [stdout] | [INFO] [stdout] 1093 | / Ok(self.0.set( [INFO] [stdout] 1094 | | &variables::NEWEST_BLOCK, [INFO] [stdout] 1095 | | &block [INFO] [stdout] 1096 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1100 | | })?, [INFO] [stdout] 1101 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1093 ~ let _: () = self.0.set( [INFO] [stdout] 1094 + &variables::NEWEST_BLOCK, [INFO] [stdout] 1095 + &block [INFO] [stdout] 1096 + .try_to_vec() [INFO] [stdout] 1097 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1098 + key: Key::NewestBlock, [INFO] [stdout] 1099 + source: err, [INFO] [stdout] 1100 + })?, [INFO] [stdout] 1101 + ); [INFO] [stdout] 1102 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1107:9 [INFO] [stdout] | [INFO] [stdout] 1107 | / Ok(self.0.set( [INFO] [stdout] 1108 | | &variables::HIGHEST_TC, [INFO] [stdout] 1109 | | &tc.try_to_vec() [INFO] [stdout] 1110 | | .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1113 | | })?, [INFO] [stdout] 1114 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1107 ~ let _: () = self.0.set( [INFO] [stdout] 1108 + &variables::HIGHEST_TC, [INFO] [stdout] 1109 + &tc.try_to_vec() [INFO] [stdout] 1110 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1111 + key: Key::HighestTC, [INFO] [stdout] 1112 + source: err, [INFO] [stdout] 1113 + })?, [INFO] [stdout] 1114 + ); [INFO] [stdout] 1115 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1123:9 [INFO] [stdout] | [INFO] [stdout] 1123 | / Ok(self.0.set( [INFO] [stdout] 1124 | | &variables::PREVIOUS_VALIDATOR_SET, [INFO] [stdout] 1125 | | &validator_set_bytes [INFO] [stdout] 1126 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1130 | | })?, [INFO] [stdout] 1131 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1123 ~ let _: () = self.0.set( [INFO] [stdout] 1124 + &variables::PREVIOUS_VALIDATOR_SET, [INFO] [stdout] 1125 + &validator_set_bytes [INFO] [stdout] 1126 + .try_to_vec() [INFO] [stdout] 1127 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1128 + key: Key::PreviousValidatorSet, [INFO] [stdout] 1129 + source: err, [INFO] [stdout] 1130 + })?, [INFO] [stdout] 1131 + ); [INFO] [stdout] 1132 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1139:9 [INFO] [stdout] | [INFO] [stdout] 1139 | / Ok(self.0.set( [INFO] [stdout] 1140 | | &variables::VALIDATOR_SET_UPDATE_BLOCK_HEIGHT, [INFO] [stdout] 1141 | | &height [INFO] [stdout] 1142 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1146 | | })?, [INFO] [stdout] 1147 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1139 ~ let _: () = self.0.set( [INFO] [stdout] 1140 + &variables::VALIDATOR_SET_UPDATE_BLOCK_HEIGHT, [INFO] [stdout] 1141 + &height [INFO] [stdout] 1142 + .try_to_vec() [INFO] [stdout] 1143 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1144 + key: Key::ValidatorSetUpdateHeight, [INFO] [stdout] 1145 + source: err, [INFO] [stdout] 1146 + })?, [INFO] [stdout] 1147 + ); [INFO] [stdout] 1148 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1156:9 [INFO] [stdout] | [INFO] [stdout] 1156 | / Ok(self.0.set( [INFO] [stdout] 1157 | | &variables::VALIDATOR_SET_UPDATE_DECIDED, [INFO] [stdout] 1158 | | &update_complete [INFO] [stdout] 1159 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1163 | | })?, [INFO] [stdout] 1164 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1156 ~ let _: () = self.0.set( [INFO] [stdout] 1157 + &variables::VALIDATOR_SET_UPDATE_DECIDED, [INFO] [stdout] 1158 + &update_complete [INFO] [stdout] 1159 + .try_to_vec() [INFO] [stdout] 1160 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1161 + key: Key::ValidatorSetUpdateDecided, [INFO] [stdout] 1162 + source: err, [INFO] [stdout] 1163 + })?, [INFO] [stdout] 1164 + ); [INFO] [stdout] 1165 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1170:9 [INFO] [stdout] | [INFO] [stdout] 1170 | / Ok(self.0.set( [INFO] [stdout] 1171 | | &variables::HIGHEST_VIEW_PHASE_VOTED, [INFO] [stdout] 1172 | | &view [INFO] [stdout] 1173 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1177 | | })?, [INFO] [stdout] 1178 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1170 ~ let _: () = self.0.set( [INFO] [stdout] 1171 + &variables::HIGHEST_VIEW_PHASE_VOTED, [INFO] [stdout] 1172 + &view [INFO] [stdout] 1173 + .try_to_vec() [INFO] [stdout] 1174 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1175 + key: Key::HighestViewPhaseVoted, [INFO] [stdout] 1176 + source: err, [INFO] [stdout] 1177 + })?, [INFO] [stdout] 1178 + ); [INFO] [stdout] 1179 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/block_tree/invariants.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | //! but before being committed, that is, being "Locked". [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 110 | //! but before being committed, that is, being "Locked". [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/hotstuff/messages.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into for HotStuffMessage { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for ProgressMessage { [INFO] [stdout] 107 ~ fn from(val: HotStuffMessage) -> Self { [INFO] [stdout] 108 ~ ProgressMessage::HotStuffMessage(val) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/invariants.rs:525:32 [INFO] [stdout] | [INFO] [stdout] 525 | block: grandparent_justify.block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `grandparent_justify.block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/invariants.rs:551:32 [INFO] [stdout] | [INFO] [stdout] 551 | block: justify.block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `justify.block` [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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/block_tree/invariants.rs:615:10 [INFO] [stdout] | [INFO] [stdout] 615 | .map(|b| block_tree.block_justify(&b).ok().map(|pc| pc.block)) [INFO] [stdout] | __________^ [INFO] [stdout] 616 | | .flatten(); [INFO] [stdout] | |__________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|b| block_tree.block_justify(&b).ok().map(|pc| pc.block))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/block_tree/pluggables.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 29 - fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] 29 + fn snapshot(&self) -> Self::Snapshot<'_>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:57:28 [INFO] [stdout] | [INFO] [stdout] 57 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:79:36 [INFO] [stdout] | [INFO] [stdout] 79 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:99:32 [INFO] [stdout] | [INFO] [stdout] 99 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:105:24 [INFO] [stdout] | [INFO] [stdout] 105 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:119:32 [INFO] [stdout] | [INFO] [stdout] 119 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:137:32 [INFO] [stdout] | [INFO] [stdout] 137 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/block_tree/pluggables.rs:153:24 [INFO] [stdout] | [INFO] [stdout] 153 | if let None = data.find(|datum| datum.is_none()) { [INFO] [stdout] | -------^^^^------------------------------------- help: try: `if data.find(|datum| datum.is_none()).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `ViewNumber` which implements the `Copy` trait [INFO] [stdout] --> src/hotstuff/implementation.rs:178:19 [INFO] [stdout] | [INFO] [stdout] 178 | view: self.view_info.view.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.view_info.view` [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: doc list item overindented [INFO] [stdout] --> src/hotstuff/roles.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | /// [advance view messages](crate::pacemaker::messages::AdvanceView). [INFO] [stdout] | ^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` 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/hotstuff/roles.rs:122:23 [INFO] [stdout] | [INFO] [stdout] 122 | .contains(&replica) [INFO] [stdout] | ^^^^^^^^ help: change this to: `replica` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hotstuff/roles.rs:128:31 [INFO] [stdout] | [INFO] [stdout] 128 | .contains(&replica) [INFO] [stdout] | ^^^^^^^^ help: change this to: `replica` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/hotstuff/roles.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 132 | .contains(&replica), [INFO] [stdout] | ^^^^^^^^ help: change this to: `replica` [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: doc list item overindented [INFO] [stdout] --> src/hotstuff/roles.rs:187:5 [INFO] [stdout] | [INFO] [stdout] 187 | /// if the most recently initiated validator set update has been decided). [INFO] [stdout] | ^^^^ help: try using ` ` (3 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/block_tree/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | //! when a "conflicting" block is committed. [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 19 | //! when a "conflicting" block is committed. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/public.rs:58:28 [INFO] [stdout] | [INFO] [stdout] 58 | block: block_hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block_hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/public.rs:94:36 [INFO] [stdout] | [INFO] [stdout] 94 | ... block: cursor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `cursor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:119:40 [INFO] [stdout] | [INFO] [stdout] 119 | wb.set_committed_validator_set(&committed_validator_set)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `committed_validator_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:120:39 [INFO] [stdout] | [INFO] [stdout] 120 | wb.set_previous_validator_set(&previous_validator_set)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `previous_validator_set` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:154:22 [INFO] [stdout] | [INFO] [stdout] 154 | let parent = match parent { [INFO] [stdout] | ______________________^ [INFO] [stdout] 155 | | None => None, [INFO] [stdout] 156 | | Some(&b) => Some(b), [INFO] [stdout] 157 | | }; [INFO] [stdout] | |_________^ help: try: `parent.map(|&b| b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:164:18 [INFO] [stdout] | [INFO] [stdout] 164 | .map(|pc| { [INFO] [stdout] | __________________^ [INFO] [stdout] 165 | | if !pc.is_genesis_pc() { [INFO] [stdout] 166 | | Some(pc.block) [INFO] [stdout] 167 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 170 | | }) [INFO] [stdout] 171 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 164 ~ .and_then(|pc| { [INFO] [stdout] 165 + if !pc.is_genesis_pc() { [INFO] [stdout] 166 + Some(pc.block) [INFO] [stdout] 167 + } else { [INFO] [stdout] 168 + None [INFO] [stdout] 169 + } [INFO] [stdout] 170 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:176:14 [INFO] [stdout] | [INFO] [stdout] 176 | .map(|block| { [INFO] [stdout] | ______________^ [INFO] [stdout] 177 | | self.block_height(&block).map(|res| { [INFO] [stdout] 178 | | if res.is_none() { [INFO] [stdout] 179 | | Err(BlockTreeError::BlockExpectedButNotFound { [INFO] [stdout] ... | [INFO] [stdout] 186 | | }) [INFO] [stdout] 187 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 176 ~ .flat_map(|block| { [INFO] [stdout] 177 + self.block_height(&block).map(|res| { [INFO] [stdout] 178 + if res.is_none() { [INFO] [stdout] 179 + Err(BlockTreeError::BlockExpectedButNotFound { [INFO] [stdout] 180 + block: block.clone(), [INFO] [stdout] 181 + }) [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + Ok(res.unwrap()) [INFO] [stdout] 184 + } [INFO] [stdout] 185 + }) [INFO] [stdout] 186 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `res` after checking its variant with `is_none` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:183:28 [INFO] [stdout] | [INFO] [stdout] 178 | if res.is_none() { [INFO] [stdout] | ---------------- help: try: `if let Some() = res` [INFO] [stdout] ... [INFO] [stdout] 183 | Ok(res.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:180:36 [INFO] [stdout] | [INFO] [stdout] 180 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `block` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:204:18 [INFO] [stdout] | [INFO] [stdout] 204 | .map(|block| self.pending_app_state_updates(&block)) [INFO] [stdout] | __________________^ [INFO] [stdout] 205 | | .flatten() [INFO] [stdout] | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|block| self.pending_app_state_updates(&block))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/block_tree/accessors/internal.rs:258:14 [INFO] [stdout] | [INFO] [stdout] 258 | .unwrap_or(ChildrenList::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` 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/block_tree/accessors/internal.rs:304:70 [INFO] [stdout] | [INFO] [stdout] 304 | if let Some(new_locked_pc) = invariants::pc_to_lock(justify, &self)? { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/block_tree/accessors/internal.rs:310:67 [INFO] [stdout] | [INFO] [stdout] 310 | if let Some(block) = invariants::block_to_commit(justify, &self)? { [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:158:36 [INFO] [stdout] | [INFO] [stdout] 158 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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/block_tree/pluggables.rs:175:14 [INFO] [stdout] | [INFO] [stdout] 175 | .map(|bytes| Datum::new(bytes)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Datum::new` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:204:32 [INFO] [stdout] | [INFO] [stdout] 204 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:235:32 [INFO] [stdout] | [INFO] [stdout] 235 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:282:36 [INFO] [stdout] | [INFO] [stdout] 282 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:292:28 [INFO] [stdout] | [INFO] [stdout] 292 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/block_tree/pluggables.rs:517:9 [INFO] [stdout] | [INFO] [stdout] 517 | / match &self { [INFO] [stdout] 518 | | &Key::BlockHeight { block } => write!(f, "Block Height for block {}", block), [INFO] [stdout] 519 | | &Key::BlockJustify { block } => write!(f, "Block Justify for block {}", block), [INFO] [stdout] 520 | | &Key::BlockDataHash { block } => write!(f, "Block Data Hash for block {}", block), [INFO] [stdout] ... | [INFO] [stdout] 542 | | &Key::HighestViewPhaseVoted => write!(f, "Highest View Phase-Voted"), [INFO] [stdout] 543 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 517 ~ match self { [INFO] [stdout] 518 ~ Key::BlockHeight { block } => write!(f, "Block Height for block {}", block), [INFO] [stdout] 519 ~ Key::BlockJustify { block } => write!(f, "Block Justify for block {}", block), [INFO] [stdout] 520 ~ Key::BlockDataHash { block } => write!(f, "Block Data Hash for block {}", block), [INFO] [stdout] 521 ~ Key::BlockDataLength { block } => write!(f, "Block Data length for block {}", block), [INFO] [stdout] 522 ~ Key::BlockData { block } => write!(f, "Block Data for block {}", block), [INFO] [stdout] 523 ~ Key::BlockAtHeight { height } => write!(f, "Block at height {}", height.int()), [INFO] [stdout] 524 ~ Key::BlockChildren { block } => write!(f, "Block children for block {}", block), [INFO] [stdout] 525 ~ Key::CommittedAppState { key } => write!(f, "Committed App State for key {:#?}", key), [INFO] [stdout] 526 ~ Key::PendingAppStateUpdates { block } => { [INFO] [stdout] 527 | write!(f, "Pending App State Updates for block {}", block) [INFO] [stdout] 528 | } [INFO] [stdout] 529 ~ Key::CommittedValidatorSet => write!(f, "Committed Validator Set"), [INFO] [stdout] 530 ~ Key::ValidatorSetUpdatesStatus { block } => { [INFO] [stdout] 531 | write!(f, "Validator Set Updates Status for block {}", block) [INFO] [stdout] 532 | } [INFO] [stdout] 533 ~ Key::LockedPC => write!(f, "Locked PC"), [INFO] [stdout] 534 ~ Key::HighestViewEntered => write!(f, "Highest View Entered"), [INFO] [stdout] 535 ~ Key::HighestPC => write!(f, "Highest Phase Certificate"), [INFO] [stdout] 536 ~ Key::HighestCommittedBlock => write!(f, "Highest Committed Block"), [INFO] [stdout] 537 ~ Key::NewestBlock => write!(f, "Newest Block"), [INFO] [stdout] 538 ~ Key::HighestTC => write!(f, "Highest Timeout Certificate"), [INFO] [stdout] 539 ~ Key::PreviousValidatorSet => write!(f, "Previous Validator Set"), [INFO] [stdout] 540 ~ Key::ValidatorSetUpdateHeight => write!(f, "Validator Set Update Block Height"), [INFO] [stdout] 541 ~ Key::ValidatorSetUpdateDecided => write!(f, "Validator Set Update Decided"), [INFO] [stdout] 542 ~ Key::HighestViewPhaseVoted => write!(f, "Highest View Phase-Voted"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/networking/messages.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | / match self { [INFO] [stdout] 98 | | ProgressMessage::BlockSyncAdvertiseMessage(_) => true, [INFO] [stdout] 99 | | _ => false, [INFO] [stdout] 100 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 97 - match self { [INFO] [stdout] 98 - ProgressMessage::BlockSyncAdvertiseMessage(_) => true, [INFO] [stdout] 99 - _ => false, [INFO] [stdout] 100 - } [INFO] [stdout] 97 + matches!(self, ProgressMessage::BlockSyncAdvertiseMessage(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/networking/receiving.rs:34:6 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 35 | | JoinHandle<()>, [INFO] [stdout] 36 | | Receiver<(VerifyingKey, ProgressMessage)>, [INFO] [stdout] 37 | | Receiver<(VerifyingKey, BlockSyncRequest)>, [INFO] [stdout] 38 | | Receiver<(VerifyingKey, BlockSyncResponse)>, [INFO] [stdout] 39 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/networking/receiving.rs:271:12 [INFO] [stdout] | [INFO] [stdout] 271 | if !buffer_will_be_overloaded [INFO] [stdout] | ____________^ [INFO] [stdout] 272 | | || (buffer_will_be_overloaded && cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] | |________________________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 271 - if !buffer_will_be_overloaded [INFO] [stdout] 272 - || (buffer_will_be_overloaded && cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] 271 + if !(buffer_will_be_overloaded && !cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] | [INFO] [stdout] 271 - if !buffer_will_be_overloaded [INFO] [stdout] 272 - || (buffer_will_be_overloaded && cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] 271 + if !buffer_will_be_overloaded || cache_message_if_buffer_will_be_overloaded [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/networking/receiving.rs:294:14 [INFO] [stdout] | [INFO] [stdout] 294 | .map(|msg_queue| msg_queue.pop_front()) [INFO] [stdout] | ______________^ [INFO] [stdout] 295 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|msg_queue| msg_queue.pop_front())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/networking/receiving.rs:323:17 [INFO] [stdout] | [INFO] [stdout] 323 | / let _ = (0..removals).into_iter().for_each(|_| { [INFO] [stdout] 324 | | let _ = msg_queue.pop_back(); [INFO] [stdout] 325 | | }); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 323 - let _ = (0..removals).into_iter().for_each(|_| { [INFO] [stdout] 323 + (0..removals).into_iter().for_each(|_| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/networking/receiving.rs:323:25 [INFO] [stdout] | [INFO] [stdout] 323 | let _ = (0..removals).into_iter().for_each(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..removals)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:289:19 [INFO] [stdout] | [INFO] [stdout] 289 | peer: peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:334:33 [INFO] [stdout] | [INFO] [stdout] 334 | ... peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:354:33 [INFO] [stdout] | [INFO] [stdout] 354 | ... peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:405:33 [INFO] [stdout] | [INFO] [stdout] 405 | ... peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:437:52 [INFO] [stdout] | [INFO] [stdout] 437 | ... .blacklist_sync_server(peer.clone(), self.config.blacklist_expiry_time) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/block_tree/accessors/internal.rs:398:18 [INFO] [stdout] | [INFO] [stdout] 398 | .map(|pc| { [INFO] [stdout] | __________________^ [INFO] [stdout] 399 | | if !pc.is_genesis_pc() { [INFO] [stdout] 400 | | Some(pc.block) [INFO] [stdout] 401 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 404 | | }) [INFO] [stdout] 405 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `and_then` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 398 ~ .and_then(|pc| { [INFO] [stdout] 399 + if !pc.is_genesis_pc() { [INFO] [stdout] 400 + Some(pc.block) [INFO] [stdout] 401 + } else { [INFO] [stdout] 402 + None [INFO] [stdout] 403 + } [INFO] [stdout] 404 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:438:78 [INFO] [stdout] | [INFO] [stdout] 438 | .ok_or(BlockTreeError::BlockExpectedButNotFound { block: b.clone() })?; [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/block_tree/accessors/internal.rs:562:27 [INFO] [stdout] | [INFO] [stdout] 562 | committed_blocks: &Vec<(CryptoHash, Option)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 562 - committed_blocks: &Vec<(CryptoHash, Option)>, [INFO] [stdout] 562 + committed_blocks: &[(CryptoHash, Option)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:585:28 [INFO] [stdout] | [INFO] [stdout] 585 | block: b.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:590:28 [INFO] [stdout] | [INFO] [stdout] 590 | block: b.clone(), [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [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: doc list item without indentation [INFO] [stdout] --> src/replica.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | //! merely replicates the block tree. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 28 | //! merely replicates the block tree. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:795:32 [INFO] [stdout] | [INFO] [stdout] 795 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:807:32 [INFO] [stdout] | [INFO] [stdout] 807 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:819:32 [INFO] [stdout] | [INFO] [stdout] 819 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:832:32 [INFO] [stdout] | [INFO] [stdout] 832 | block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/replica.rs:248:1 [INFO] [stdout] | [INFO] [stdout] 248 | / impl [INFO] [stdout] 249 | | Into<( [INFO] [stdout] 250 | | HotStuffConfiguration, [INFO] [stdout] 251 | | PacemakerConfiguration, [INFO] [stdout] ... | [INFO] [stdout] 296 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 249 ~ From for ( [INFO] [stdout] 250 + HotStuffConfiguration, [INFO] [stdout] 251 + PacemakerConfiguration, [INFO] [stdout] 252 + BlockSyncClientConfiguration, [INFO] [stdout] 253 + BlockSyncServerConfiguration, [INFO] [stdout] 254 + ) [INFO] [stdout] 255 | { [INFO] [stdout] 256 ~ fn from( [INFO] [stdout] 257 ~ val: Configuration, [INFO] [stdout] 258 ~ ) -> Self { [INFO] [stdout] 259 ~ let keypair = Keypair::new(val.me); [INFO] [stdout] 260 | let hotstuff_config = HotStuffConfiguration { [INFO] [stdout] 261 ~ chain_id: val.chain_id, [INFO] [stdout] 262 | keypair: keypair.clone(), [INFO] [stdout] 263 | }; [INFO] [stdout] 264 | let pacemaker_config = PacemakerConfiguration { [INFO] [stdout] 265 ~ chain_id: val.chain_id, [INFO] [stdout] 266 | keypair: keypair.clone(), [INFO] [stdout] 267 ~ epoch_length: val.epoch_length, [INFO] [stdout] 268 ~ max_view_time: val.max_view_time, [INFO] [stdout] 269 | }; [INFO] [stdout] 270 | let block_sync_client_config = BlockSyncClientConfiguration { [INFO] [stdout] 271 ~ chain_id: val.chain_id, [INFO] [stdout] 272 ~ request_limit: val.block_sync_request_limit, [INFO] [stdout] 273 ~ response_timeout: val.block_sync_response_timeout, [INFO] [stdout] 274 ~ blacklist_expiry_time: val.block_sync_blacklist_expiry_time, [INFO] [stdout] 275 ~ block_sync_trigger_min_view_difference: val.block_sync_trigger_min_view_difference, [INFO] [stdout] 276 ~ block_sync_trigger_timeout: val.block_sync_trigger_timeout, [INFO] [stdout] 277 | }; [INFO] [stdout] 278 | let block_sync_server_config = BlockSyncServerConfiguration { [INFO] [stdout] 279 ~ chain_id: val.chain_id, [INFO] [stdout] 280 | keypair: keypair.clone(), [INFO] [stdout] 281 ~ request_limit: val.block_sync_request_limit, [INFO] [stdout] 282 ~ advertise_time: val.block_sync_server_advertise_time, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:847:36 [INFO] [stdout] | [INFO] [stdout] 847 | ... block: block.hash.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `block.hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:884:9 [INFO] [stdout] | [INFO] [stdout] 884 | / Ok(self.0.set( [INFO] [stdout] 885 | | &concat(&variables::BLOCK_AT_HEIGHT, &height.try_to_vec().unwrap()), [INFO] [stdout] 886 | | &block [INFO] [stdout] 887 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 891 | | })?, [INFO] [stdout] 892 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 884 ~ let _: () = self.0.set( [INFO] [stdout] 885 + &concat(&variables::BLOCK_AT_HEIGHT, &height.try_to_vec().unwrap()), [INFO] [stdout] 886 + &block [INFO] [stdout] 887 + .try_to_vec() [INFO] [stdout] 888 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 889 + key: Key::BlockAtHeight { height }, [INFO] [stdout] 890 + source: err, [INFO] [stdout] 891 + })?, [INFO] [stdout] 892 + ); [INFO] [stdout] 893 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:902:9 [INFO] [stdout] | [INFO] [stdout] 902 | / Ok(self.0.set( [INFO] [stdout] 903 | | &concat(&variables::BLOCK_TO_CHILDREN, &block.bytes()), [INFO] [stdout] 904 | | &children [INFO] [stdout] 905 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 911 | | })?, [INFO] [stdout] 912 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 902 ~ let _: () = self.0.set( [INFO] [stdout] 903 + &concat(&variables::BLOCK_TO_CHILDREN, &block.bytes()), [INFO] [stdout] 904 + &children [INFO] [stdout] 905 + .try_to_vec() [INFO] [stdout] 906 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 907 + key: Key::BlockChildren { [INFO] [stdout] 908 + block: block.clone(), [INFO] [stdout] 909 + }, [INFO] [stdout] 910 + source: err, [INFO] [stdout] 911 + })?, [INFO] [stdout] 912 + ); [INFO] [stdout] 913 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:908:32 [INFO] [stdout] | [INFO] [stdout] 908 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:938:9 [INFO] [stdout] | [INFO] [stdout] 938 | / Ok(self.0.set( [INFO] [stdout] 939 | | &concat(&variables::PENDING_APP_STATE_UPDATES, &block.bytes()), [INFO] [stdout] 940 | | &app_state_updates [INFO] [stdout] 941 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 947 | | })?, [INFO] [stdout] 948 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 938 ~ let _: () = self.0.set( [INFO] [stdout] 939 + &concat(&variables::PENDING_APP_STATE_UPDATES, &block.bytes()), [INFO] [stdout] 940 + &app_state_updates [INFO] [stdout] 941 + .try_to_vec() [INFO] [stdout] 942 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 943 + key: Key::PendingAppStateUpdates { [INFO] [stdout] 944 + block: block.clone(), [INFO] [stdout] 945 + }, [INFO] [stdout] 946 + source: err, [INFO] [stdout] 947 + })?, [INFO] [stdout] 948 + ); [INFO] [stdout] 949 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:944:32 [INFO] [stdout] | [INFO] [stdout] 944 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:975:9 [INFO] [stdout] | [INFO] [stdout] 975 | / Ok(self.0.set( [INFO] [stdout] 976 | | &variables::COMMITTED_VALIDATOR_SET, [INFO] [stdout] 977 | | &validator_set_bytes [INFO] [stdout] 978 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 982 | | })?, [INFO] [stdout] 983 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 975 ~ let _: () = self.0.set( [INFO] [stdout] 976 + &variables::COMMITTED_VALIDATOR_SET, [INFO] [stdout] 977 + &validator_set_bytes [INFO] [stdout] 978 + .try_to_vec() [INFO] [stdout] 979 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 980 + key: Key::CommittedValidatorSet, [INFO] [stdout] 981 + source: err, [INFO] [stdout] 982 + })?, [INFO] [stdout] 983 + ); [INFO] [stdout] 984 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:995:9 [INFO] [stdout] | [INFO] [stdout] 995 | / Ok(self.0.set( [INFO] [stdout] 996 | | &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 997 | | &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 998 | | KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1004 | | })?, [INFO] [stdout] 1005 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 995 ~ let _: () = self.0.set( [INFO] [stdout] 996 + &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 997 + &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 998 + KVSetError::SerializeValueError { [INFO] [stdout] 999 + key: Key::ValidatorSetUpdatesStatus { [INFO] [stdout] 1000 + block: block.clone(), [INFO] [stdout] 1001 + }, [INFO] [stdout] 1002 + source: err, [INFO] [stdout] 1003 + } [INFO] [stdout] 1004 + })?, [INFO] [stdout] 1005 + ); [INFO] [stdout] 1006 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1000:32 [INFO] [stdout] | [INFO] [stdout] 1000 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1013:9 [INFO] [stdout] | [INFO] [stdout] 1013 | / Ok(self.0.set( [INFO] [stdout] 1014 | | &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 1015 | | &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 1016 | | KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1022 | | })?, [INFO] [stdout] 1023 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1013 ~ let _: () = self.0.set( [INFO] [stdout] 1014 + &concat(&variables::VALIDATOR_SET_UPDATES_STATUS, &block.bytes()), [INFO] [stdout] 1015 + &block_vs_updates_bytes.try_to_vec().map_err(|err| { [INFO] [stdout] 1016 + KVSetError::SerializeValueError { [INFO] [stdout] 1017 + key: Key::ValidatorSetUpdatesStatus { [INFO] [stdout] 1018 + block: block.clone(), [INFO] [stdout] 1019 + }, [INFO] [stdout] 1020 + source: err, [INFO] [stdout] 1021 + } [INFO] [stdout] 1022 + })?, [INFO] [stdout] 1023 + ); [INFO] [stdout] 1024 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1018:32 [INFO] [stdout] | [INFO] [stdout] 1018 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1036:9 [INFO] [stdout] | [INFO] [stdout] 1036 | / Ok(self.0.set( [INFO] [stdout] 1037 | | &variables::LOCKED_PC, [INFO] [stdout] 1038 | | &pc.try_to_vec() [INFO] [stdout] 1039 | | .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1042 | | })?, [INFO] [stdout] 1043 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1036 ~ let _: () = self.0.set( [INFO] [stdout] 1037 + &variables::LOCKED_PC, [INFO] [stdout] 1038 + &pc.try_to_vec() [INFO] [stdout] 1039 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1040 + key: Key::LockedPC, [INFO] [stdout] 1041 + source: err, [INFO] [stdout] 1042 + })?, [INFO] [stdout] 1043 + ); [INFO] [stdout] 1044 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1049:9 [INFO] [stdout] | [INFO] [stdout] 1049 | / Ok(self.0.set( [INFO] [stdout] 1050 | | &variables::HIGHEST_VIEW_ENTERED, [INFO] [stdout] 1051 | | &view [INFO] [stdout] 1052 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1056 | | })?, [INFO] [stdout] 1057 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1049 ~ let _: () = self.0.set( [INFO] [stdout] 1050 + &variables::HIGHEST_VIEW_ENTERED, [INFO] [stdout] 1051 + &view [INFO] [stdout] 1052 + .try_to_vec() [INFO] [stdout] 1053 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1054 + key: Key::HighestTC, [INFO] [stdout] 1055 + source: err, [INFO] [stdout] 1056 + })?, [INFO] [stdout] 1057 + ); [INFO] [stdout] 1058 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1063:9 [INFO] [stdout] | [INFO] [stdout] 1063 | / Ok(self.0.set( [INFO] [stdout] 1064 | | &variables::HIGHEST_PC, [INFO] [stdout] 1065 | | &pc.try_to_vec() [INFO] [stdout] 1066 | | .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1069 | | })?, [INFO] [stdout] 1070 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1063 ~ let _: () = self.0.set( [INFO] [stdout] 1064 + &variables::HIGHEST_PC, [INFO] [stdout] 1065 + &pc.try_to_vec() [INFO] [stdout] 1066 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1067 + key: Key::HighestTC, [INFO] [stdout] 1068 + source: err, [INFO] [stdout] 1069 + })?, [INFO] [stdout] 1070 + ); [INFO] [stdout] 1071 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1079:9 [INFO] [stdout] | [INFO] [stdout] 1079 | / Ok(self.0.set( [INFO] [stdout] 1080 | | &variables::HIGHEST_COMMITTED_BLOCK, [INFO] [stdout] 1081 | | &block [INFO] [stdout] 1082 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1086 | | })?, [INFO] [stdout] 1087 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1079 ~ let _: () = self.0.set( [INFO] [stdout] 1080 + &variables::HIGHEST_COMMITTED_BLOCK, [INFO] [stdout] 1081 + &block [INFO] [stdout] 1082 + .try_to_vec() [INFO] [stdout] 1083 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1084 + key: Key::HighestCommittedBlock, [INFO] [stdout] 1085 + source: err, [INFO] [stdout] 1086 + })?, [INFO] [stdout] 1087 + ); [INFO] [stdout] 1088 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1093:9 [INFO] [stdout] | [INFO] [stdout] 1093 | / Ok(self.0.set( [INFO] [stdout] 1094 | | &variables::NEWEST_BLOCK, [INFO] [stdout] 1095 | | &block [INFO] [stdout] 1096 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1100 | | })?, [INFO] [stdout] 1101 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1093 ~ let _: () = self.0.set( [INFO] [stdout] 1094 + &variables::NEWEST_BLOCK, [INFO] [stdout] 1095 + &block [INFO] [stdout] 1096 + .try_to_vec() [INFO] [stdout] 1097 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1098 + key: Key::NewestBlock, [INFO] [stdout] 1099 + source: err, [INFO] [stdout] 1100 + })?, [INFO] [stdout] 1101 + ); [INFO] [stdout] 1102 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1107:9 [INFO] [stdout] | [INFO] [stdout] 1107 | / Ok(self.0.set( [INFO] [stdout] 1108 | | &variables::HIGHEST_TC, [INFO] [stdout] 1109 | | &tc.try_to_vec() [INFO] [stdout] 1110 | | .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] ... | [INFO] [stdout] 1113 | | })?, [INFO] [stdout] 1114 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1107 ~ let _: () = self.0.set( [INFO] [stdout] 1108 + &variables::HIGHEST_TC, [INFO] [stdout] 1109 + &tc.try_to_vec() [INFO] [stdout] 1110 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1111 + key: Key::HighestTC, [INFO] [stdout] 1112 + source: err, [INFO] [stdout] 1113 + })?, [INFO] [stdout] 1114 + ); [INFO] [stdout] 1115 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1123:9 [INFO] [stdout] | [INFO] [stdout] 1123 | / Ok(self.0.set( [INFO] [stdout] 1124 | | &variables::PREVIOUS_VALIDATOR_SET, [INFO] [stdout] 1125 | | &validator_set_bytes [INFO] [stdout] 1126 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1130 | | })?, [INFO] [stdout] 1131 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1123 ~ let _: () = self.0.set( [INFO] [stdout] 1124 + &variables::PREVIOUS_VALIDATOR_SET, [INFO] [stdout] 1125 + &validator_set_bytes [INFO] [stdout] 1126 + .try_to_vec() [INFO] [stdout] 1127 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1128 + key: Key::PreviousValidatorSet, [INFO] [stdout] 1129 + source: err, [INFO] [stdout] 1130 + })?, [INFO] [stdout] 1131 + ); [INFO] [stdout] 1132 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1139:9 [INFO] [stdout] | [INFO] [stdout] 1139 | / Ok(self.0.set( [INFO] [stdout] 1140 | | &variables::VALIDATOR_SET_UPDATE_BLOCK_HEIGHT, [INFO] [stdout] 1141 | | &height [INFO] [stdout] 1142 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1146 | | })?, [INFO] [stdout] 1147 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1139 ~ let _: () = self.0.set( [INFO] [stdout] 1140 + &variables::VALIDATOR_SET_UPDATE_BLOCK_HEIGHT, [INFO] [stdout] 1141 + &height [INFO] [stdout] 1142 + .try_to_vec() [INFO] [stdout] 1143 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1144 + key: Key::ValidatorSetUpdateHeight, [INFO] [stdout] 1145 + source: err, [INFO] [stdout] 1146 + })?, [INFO] [stdout] 1147 + ); [INFO] [stdout] 1148 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1156:9 [INFO] [stdout] | [INFO] [stdout] 1156 | / Ok(self.0.set( [INFO] [stdout] 1157 | | &variables::VALIDATOR_SET_UPDATE_DECIDED, [INFO] [stdout] 1158 | | &update_complete [INFO] [stdout] 1159 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1163 | | })?, [INFO] [stdout] 1164 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1156 ~ let _: () = self.0.set( [INFO] [stdout] 1157 + &variables::VALIDATOR_SET_UPDATE_DECIDED, [INFO] [stdout] 1158 + &update_complete [INFO] [stdout] 1159 + .try_to_vec() [INFO] [stdout] 1160 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1161 + key: Key::ValidatorSetUpdateDecided, [INFO] [stdout] 1162 + source: err, [INFO] [stdout] 1163 + })?, [INFO] [stdout] 1164 + ); [INFO] [stdout] 1165 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/block_tree/accessors/internal.rs:1170:9 [INFO] [stdout] | [INFO] [stdout] 1170 | / Ok(self.0.set( [INFO] [stdout] 1171 | | &variables::HIGHEST_VIEW_PHASE_VOTED, [INFO] [stdout] 1172 | | &view [INFO] [stdout] 1173 | | .try_to_vec() [INFO] [stdout] ... | [INFO] [stdout] 1177 | | })?, [INFO] [stdout] 1178 | | )) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 1170 ~ let _: () = self.0.set( [INFO] [stdout] 1171 + &variables::HIGHEST_VIEW_PHASE_VOTED, [INFO] [stdout] 1172 + &view [INFO] [stdout] 1173 + .try_to_vec() [INFO] [stdout] 1174 + .map_err(|err| KVSetError::SerializeValueError { [INFO] [stdout] 1175 + key: Key::HighestViewPhaseVoted, [INFO] [stdout] 1176 + source: err, [INFO] [stdout] 1177 + })?, [INFO] [stdout] 1178 + ); [INFO] [stdout] 1179 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/block_tree/invariants.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | //! but before being committed, that is, being "Locked". [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 110 | //! but before being committed, that is, being "Locked". [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (28/7) [INFO] [stdout] --> src/event_bus.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | / pub(crate) fn new( [INFO] [stdout] 103 | | log: bool, [INFO] [stdout] 104 | | insert_block_handler: Option>, [INFO] [stdout] 105 | | commit_block_handler: Option>, [INFO] [stdout] ... | [INFO] [stdout] 130 | | send_sync_response_handler: Option>, [INFO] [stdout] 131 | | ) -> EventHandlers { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/invariants.rs:525:32 [INFO] [stdout] | [INFO] [stdout] 525 | block: grandparent_justify.block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `grandparent_justify.block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/invariants.rs:551:32 [INFO] [stdout] | [INFO] [stdout] 551 | block: justify.block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `justify.block` [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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/block_tree/invariants.rs:615:10 [INFO] [stdout] | [INFO] [stdout] 615 | .map(|b| block_tree.block_justify(&b).ok().map(|pc| pc.block)) [INFO] [stdout] | __________^ [INFO] [stdout] 616 | | .flatten(); [INFO] [stdout] | |__________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|b| block_tree.block_justify(&b).ok().map(|pc| pc.block))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/block_tree/pluggables.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 29 - fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] 29 + fn snapshot(&self) -> Self::Snapshot<'_>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:49:28 [INFO] [stdout] | [INFO] [stdout] 49 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:57:28 [INFO] [stdout] | [INFO] [stdout] 57 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:79:36 [INFO] [stdout] | [INFO] [stdout] 79 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:99:32 [INFO] [stdout] | [INFO] [stdout] 99 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:105:24 [INFO] [stdout] | [INFO] [stdout] 105 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:119:32 [INFO] [stdout] | [INFO] [stdout] 119 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:137:32 [INFO] [stdout] | [INFO] [stdout] 137 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/block_tree/pluggables.rs:153:24 [INFO] [stdout] | [INFO] [stdout] 153 | if let None = data.find(|datum| datum.is_none()) { [INFO] [stdout] | -------^^^^------------------------------------- help: try: `if data.find(|datum| datum.is_none()).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:158:36 [INFO] [stdout] | [INFO] [stdout] 158 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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/block_tree/pluggables.rs:175:14 [INFO] [stdout] | [INFO] [stdout] 175 | .map(|bytes| Datum::new(bytes)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Datum::new` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:204:32 [INFO] [stdout] | [INFO] [stdout] 204 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:210:24 [INFO] [stdout] | [INFO] [stdout] 210 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/event_bus.rs:491:13 [INFO] [stdout] | [INFO] [stdout] 491 | (&event_handlers).fire_handlers(event) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `event_handlers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:235:32 [INFO] [stdout] | [INFO] [stdout] 235 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/app.rs:258:23 [INFO] [stdout] | [INFO] [stdout] 258 | pub fn block_tree(&self) -> &AppBlockTreeView { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | || [INFO] [stdout] | | |the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 258 | pub fn block_tree(&self) -> &AppBlockTreeView<'_, K> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:282:36 [INFO] [stdout] | [INFO] [stdout] 282 | ... block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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 `CryptoHash` which implements the `Copy` trait [INFO] [stdout] --> src/block_tree/pluggables.rs:292:28 [INFO] [stdout] | [INFO] [stdout] 292 | block: block.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*block` [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/types/update_sets.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn inserts(&self) -> hash_map::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 72 | pub fn inserts(&self) -> hash_map::Iter<'_, K, V> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/types/update_sets.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn deletes(&self) -> hash_set::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 77 | pub fn deletes(&self) -> hash_set::Iter<'_, K> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/types/validator_set.rs:121:23 [INFO] [stdout] | [INFO] [stdout] 121 | pub fn validators(&self) -> slice::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 121 | pub fn validators(&self) -> slice::Iter<'_, VerifyingKey> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/block_tree/pluggables.rs:29:49 [INFO] [stdout] | [INFO] [stdout] 29 | fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] | -- ^^ the same lifetime is elided here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'b` [INFO] [stdout] | [INFO] [stdout] 29 - fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] 29 + fn snapshot<'b>(&'b self) -> Self::Snapshot<'b>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stdout] --> src/block_tree/pluggables.rs:517:9 [INFO] [stdout] | [INFO] [stdout] 517 | / match &self { [INFO] [stdout] 518 | | &Key::BlockHeight { block } => write!(f, "Block Height for block {}", block), [INFO] [stdout] 519 | | &Key::BlockJustify { block } => write!(f, "Block Justify for block {}", block), [INFO] [stdout] 520 | | &Key::BlockDataHash { block } => write!(f, "Block Data Hash for block {}", block), [INFO] [stdout] ... | [INFO] [stdout] 542 | | &Key::HighestViewPhaseVoted => write!(f, "Highest View Phase-Voted"), [INFO] [stdout] 543 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 517 ~ match self { [INFO] [stdout] 518 ~ Key::BlockHeight { block } => write!(f, "Block Height for block {}", block), [INFO] [stdout] 519 ~ Key::BlockJustify { block } => write!(f, "Block Justify for block {}", block), [INFO] [stdout] 520 ~ Key::BlockDataHash { block } => write!(f, "Block Data Hash for block {}", block), [INFO] [stdout] 521 ~ Key::BlockDataLength { block } => write!(f, "Block Data length for block {}", block), [INFO] [stdout] 522 ~ Key::BlockData { block } => write!(f, "Block Data for block {}", block), [INFO] [stdout] 523 ~ Key::BlockAtHeight { height } => write!(f, "Block at height {}", height.int()), [INFO] [stdout] 524 ~ Key::BlockChildren { block } => write!(f, "Block children for block {}", block), [INFO] [stdout] 525 ~ Key::CommittedAppState { key } => write!(f, "Committed App State for key {:#?}", key), [INFO] [stdout] 526 ~ Key::PendingAppStateUpdates { block } => { [INFO] [stdout] 527 | write!(f, "Pending App State Updates for block {}", block) [INFO] [stdout] 528 | } [INFO] [stdout] 529 ~ Key::CommittedValidatorSet => write!(f, "Committed Validator Set"), [INFO] [stdout] 530 ~ Key::ValidatorSetUpdatesStatus { block } => { [INFO] [stdout] 531 | write!(f, "Validator Set Updates Status for block {}", block) [INFO] [stdout] 532 | } [INFO] [stdout] 533 ~ Key::LockedPC => write!(f, "Locked PC"), [INFO] [stdout] 534 ~ Key::HighestViewEntered => write!(f, "Highest View Entered"), [INFO] [stdout] 535 ~ Key::HighestPC => write!(f, "Highest Phase Certificate"), [INFO] [stdout] 536 ~ Key::HighestCommittedBlock => write!(f, "Highest Committed Block"), [INFO] [stdout] 537 ~ Key::NewestBlock => write!(f, "Newest Block"), [INFO] [stdout] 538 ~ Key::HighestTC => write!(f, "Highest Timeout Certificate"), [INFO] [stdout] 539 ~ Key::PreviousValidatorSet => write!(f, "Previous Validator Set"), [INFO] [stdout] 540 ~ Key::ValidatorSetUpdateHeight => write!(f, "Validator Set Update Block Height"), [INFO] [stdout] 541 ~ Key::ValidatorSetUpdateDecided => write!(f, "Validator Set Update Decided"), [INFO] [stdout] 542 ~ Key::HighestViewPhaseVoted => write!(f, "Highest View Phase-Voted"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/networking/messages.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | / match self { [INFO] [stdout] 98 | | ProgressMessage::BlockSyncAdvertiseMessage(_) => true, [INFO] [stdout] 99 | | _ => false, [INFO] [stdout] 100 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 97 - match self { [INFO] [stdout] 98 - ProgressMessage::BlockSyncAdvertiseMessage(_) => true, [INFO] [stdout] 99 - _ => false, [INFO] [stdout] 100 - } [INFO] [stdout] 97 + matches!(self, ProgressMessage::BlockSyncAdvertiseMessage(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/networking/receiving.rs:34:6 [INFO] [stdout] | [INFO] [stdout] 34 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 35 | | JoinHandle<()>, [INFO] [stdout] 36 | | Receiver<(VerifyingKey, ProgressMessage)>, [INFO] [stdout] 37 | | Receiver<(VerifyingKey, BlockSyncRequest)>, [INFO] [stdout] 38 | | Receiver<(VerifyingKey, BlockSyncResponse)>, [INFO] [stdout] 39 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/networking/receiving.rs:271:12 [INFO] [stdout] | [INFO] [stdout] 271 | if !buffer_will_be_overloaded [INFO] [stdout] | ____________^ [INFO] [stdout] 272 | | || (buffer_will_be_overloaded && cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] | |________________________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 271 - if !buffer_will_be_overloaded [INFO] [stdout] 272 - || (buffer_will_be_overloaded && cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] 271 + if !(buffer_will_be_overloaded && !cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] | [INFO] [stdout] 271 - if !buffer_will_be_overloaded [INFO] [stdout] 272 - || (buffer_will_be_overloaded && cache_message_if_buffer_will_be_overloaded) [INFO] [stdout] 271 + if !buffer_will_be_overloaded || cache_message_if_buffer_will_be_overloaded [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> src/networking/receiving.rs:294:14 [INFO] [stdout] | [INFO] [stdout] 294 | .map(|msg_queue| msg_queue.pop_front()) [INFO] [stdout] | ______________^ [INFO] [stdout] 295 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|msg_queue| msg_queue.pop_front())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/networking/receiving.rs:323:17 [INFO] [stdout] | [INFO] [stdout] 323 | / let _ = (0..removals).into_iter().for_each(|_| { [INFO] [stdout] 324 | | let _ = msg_queue.pop_back(); [INFO] [stdout] 325 | | }); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 323 - let _ = (0..removals).into_iter().for_each(|_| { [INFO] [stdout] 323 + (0..removals).into_iter().for_each(|_| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/networking/receiving.rs:323:25 [INFO] [stdout] | [INFO] [stdout] 323 | let _ = (0..removals).into_iter().for_each(|_| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..removals)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:289:19 [INFO] [stdout] | [INFO] [stdout] 289 | peer: peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:334:33 [INFO] [stdout] | [INFO] [stdout] 334 | ... peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:354:33 [INFO] [stdout] | [INFO] [stdout] 354 | ... peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:405:33 [INFO] [stdout] | [INFO] [stdout] 405 | ... peer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `VerifyingKey` which implements the `Copy` trait [INFO] [stdout] --> src/block_sync/client.rs:437:52 [INFO] [stdout] | [INFO] [stdout] 437 | ... .blacklist_sync_server(peer.clone(), self.config.blacklist_expiry_time) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/replica.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | //! merely replicates the block tree. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 28 | //! merely replicates the block tree. [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/replica.rs:248:1 [INFO] [stdout] | [INFO] [stdout] 248 | / impl [INFO] [stdout] 249 | | Into<( [INFO] [stdout] 250 | | HotStuffConfiguration, [INFO] [stdout] 251 | | PacemakerConfiguration, [INFO] [stdout] ... | [INFO] [stdout] 296 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 249 ~ From for ( [INFO] [stdout] 250 + HotStuffConfiguration, [INFO] [stdout] 251 + PacemakerConfiguration, [INFO] [stdout] 252 + BlockSyncClientConfiguration, [INFO] [stdout] 253 + BlockSyncServerConfiguration, [INFO] [stdout] 254 + ) [INFO] [stdout] 255 | { [INFO] [stdout] 256 ~ fn from( [INFO] [stdout] 257 ~ val: Configuration, [INFO] [stdout] 258 ~ ) -> Self { [INFO] [stdout] 259 ~ let keypair = Keypair::new(val.me); [INFO] [stdout] 260 | let hotstuff_config = HotStuffConfiguration { [INFO] [stdout] 261 ~ chain_id: val.chain_id, [INFO] [stdout] 262 | keypair: keypair.clone(), [INFO] [stdout] 263 | }; [INFO] [stdout] 264 | let pacemaker_config = PacemakerConfiguration { [INFO] [stdout] 265 ~ chain_id: val.chain_id, [INFO] [stdout] 266 | keypair: keypair.clone(), [INFO] [stdout] 267 ~ epoch_length: val.epoch_length, [INFO] [stdout] 268 ~ max_view_time: val.max_view_time, [INFO] [stdout] 269 | }; [INFO] [stdout] 270 | let block_sync_client_config = BlockSyncClientConfiguration { [INFO] [stdout] 271 ~ chain_id: val.chain_id, [INFO] [stdout] 272 ~ request_limit: val.block_sync_request_limit, [INFO] [stdout] 273 ~ response_timeout: val.block_sync_response_timeout, [INFO] [stdout] 274 ~ blacklist_expiry_time: val.block_sync_blacklist_expiry_time, [INFO] [stdout] 275 ~ block_sync_trigger_min_view_difference: val.block_sync_trigger_min_view_difference, [INFO] [stdout] 276 ~ block_sync_trigger_timeout: val.block_sync_trigger_timeout, [INFO] [stdout] 277 | }; [INFO] [stdout] 278 | let block_sync_server_config = BlockSyncServerConfiguration { [INFO] [stdout] 279 ~ chain_id: val.chain_id, [INFO] [stdout] 280 | keypair: keypair.clone(), [INFO] [stdout] 281 ~ request_limit: val.block_sync_request_limit, [INFO] [stdout] 282 ~ advertise_time: val.block_sync_server_advertise_time, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (28/7) [INFO] [stdout] --> src/event_bus.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 102 | / pub(crate) fn new( [INFO] [stdout] 103 | | log: bool, [INFO] [stdout] 104 | | insert_block_handler: Option>, [INFO] [stdout] 105 | | commit_block_handler: Option>, [INFO] [stdout] ... | [INFO] [stdout] 130 | | send_sync_response_handler: Option>, [INFO] [stdout] 131 | | ) -> EventHandlers { [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/event_bus.rs:491:13 [INFO] [stdout] | [INFO] [stdout] 491 | (&event_handlers).fire_handlers(event) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `event_handlers` [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/app.rs:258:23 [INFO] [stdout] | [INFO] [stdout] 258 | pub fn block_tree(&self) -> &AppBlockTreeView { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | || [INFO] [stdout] | | |the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 258 | pub fn block_tree(&self) -> &AppBlockTreeView<'_, K> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/types/update_sets.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn inserts(&self) -> hash_map::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 72 | pub fn inserts(&self) -> hash_map::Iter<'_, K, V> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/types/update_sets.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn deletes(&self) -> hash_set::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 77 | pub fn deletes(&self) -> hash_set::Iter<'_, K> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/types/validator_set.rs:121:23 [INFO] [stdout] | [INFO] [stdout] 121 | pub fn validators(&self) -> slice::Iter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 121 | pub fn validators(&self) -> slice::Iter<'_, VerifyingKey> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/block_tree/pluggables.rs:29:49 [INFO] [stdout] | [INFO] [stdout] 29 | fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] | -- ^^ the same lifetime is elided here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'b` [INFO] [stdout] | [INFO] [stdout] 29 - fn snapshot<'b>(&'b self) -> Self::Snapshot<'_>; [INFO] [stdout] 29 + fn snapshot<'b>(&'b self) -> Self::Snapshot<'b>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `highest_view_entered` is never used [INFO] [stdout] --> tests/common/node.rs:125:19 [INFO] [stdout] | [INFO] [stdout] 44 | impl Node { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 125 | pub(crate) fn highest_view_entered(&self) -> ViewNumber { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> tests/common/network.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | for (_, peer) in &self.all_peers { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 46 - for (_, peer) in &self.all_peers { [INFO] [stdout] 46 + for peer in self.all_peers.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> tests/common/node.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/node.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | &mut &*receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] | __________________^ [INFO] [stdout] 161 | | .bytes() [INFO] [stdout] 162 | | .as_slice(), [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 160 ~ &mut receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] 161 + .bytes() [INFO] [stdout] 162 ~ .as_slice(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 132 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/number_app.rs:150:22 [INFO] [stdout] | [INFO] [stdout] 150 | &mut &*request.proposed_block().data.vec()[0].bytes().as_slice(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `request.proposed_block().data.vec()[0].bytes().as_slice()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `verifying_key` is never read [INFO] [stdout] --> tests/common/node.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 38 | pub(crate) struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 39 | verifying_key: VerifyingKeyBytes, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `committed_validator_set` and `verifying_key` are never used [INFO] [stdout] --> tests/common/node.rs:116:19 [INFO] [stdout] | [INFO] [stdout] 44 | impl Node { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 116 | pub(crate) fn committed_validator_set(&self) -> ValidatorSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 134 | pub(crate) fn verifying_key(&self) -> VerifyingKeyBytes { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `number` and `highest_view_entered` are never used [INFO] [stdout] --> tests/common/node.rs:111:19 [INFO] [stdout] | [INFO] [stdout] 44 | impl Node { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 111 | pub(crate) fn number(&self) -> u32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 125 | pub(crate) fn highest_view_entered(&self) -> ViewNumber { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `number` is never used [INFO] [stdout] --> tests/common/number_app.rs:80:19 [INFO] [stdout] | [INFO] [stdout] 61 | impl NumberApp { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 80 | pub(crate) fn number(block_tree: BlockTreeSnapshot) -> u32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `verifying_key` is never read [INFO] [stdout] --> tests/common/node.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 38 | pub(crate) struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 39 | verifying_key: VerifyingKeyBytes, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `committed_validator_set`, `highest_view_entered`, and `verifying_key` are never used [INFO] [stdout] --> tests/common/node.rs:116:19 [INFO] [stdout] | [INFO] [stdout] 44 | impl Node { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 116 | pub(crate) fn committed_validator_set(&self) -> ValidatorSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 125 | pub(crate) fn highest_view_entered(&self) -> ViewNumber { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 134 | pub(crate) fn verifying_key(&self) -> VerifyingKeyBytes { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> tests/common/network.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | for (_, peer) in &self.all_peers { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 46 - for (_, peer) in &self.all_peers { [INFO] [stdout] 46 + for peer in self.all_peers.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> tests/common/network.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | for (_, peer) in &self.all_peers { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 46 - for (_, peer) in &self.all_peers { [INFO] [stdout] 46 + for peer in self.all_peers.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> tests/common/node.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> tests/common/node.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> tests/common/network.rs:46:26 [INFO] [stdout] | [INFO] [stdout] 46 | for (_, peer) in &self.all_peers { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 46 - for (_, peer) in &self.all_peers { [INFO] [stdout] 46 + for peer in self.all_peers.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/node.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | &mut &*receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] | __________________^ [INFO] [stdout] 161 | | .bytes() [INFO] [stdout] 162 | | .as_slice(), [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 160 ~ &mut receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] 161 + .bytes() [INFO] [stdout] 162 ~ .as_slice(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> tests/common/node.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 37 | /// [`verifying_key`](Self::verifying_key), [`committed_validator_set`](Self::committed_validator_set)). [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/node.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | &mut &*receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] | __________________^ [INFO] [stdout] 161 | | .bytes() [INFO] [stdout] 162 | | .as_slice(), [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 160 ~ &mut receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] 161 + .bytes() [INFO] [stdout] 162 ~ .as_slice(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/node.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | &mut &*receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] | __________________^ [INFO] [stdout] 161 | | .bytes() [INFO] [stdout] 162 | | .as_slice(), [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 160 ~ &mut receive_proposal_event.proposal.block.data.vec()[0] [INFO] [stdout] 161 + .bytes() [INFO] [stdout] 162 ~ .as_slice(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 132 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 132 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/number_app.rs:150:22 [INFO] [stdout] | [INFO] [stdout] 150 | &mut &*request.proposed_block().data.vec()[0].bytes().as_slice(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `request.proposed_block().data.vec()[0].bytes().as_slice()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/number_app.rs:150:22 [INFO] [stdout] | [INFO] [stdout] 150 | &mut &*request.proposed_block().data.vec()[0].bytes().as_slice(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `request.proposed_block().data.vec()[0].bytes().as_slice()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:104:27 [INFO] [stdout] | [INFO] [stdout] 104 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/common/number_app.rs:132:27 [INFO] [stdout] | [INFO] [stdout] 132 | hasher.update(&data.vec()[0].bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data.vec()[0].bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> tests/common/number_app.rs:150:22 [INFO] [stdout] | [INFO] [stdout] 150 | &mut &*request.proposed_block().data.vec()[0].bytes().as_slice(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `request.proposed_block().data.vec()[0].bytes().as_slice()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 25.66s [INFO] running `Command { std: "docker" "inspect" "b7a3c6e186bd859e6deb0829b95113f99ea20655761feab83887e7936c78d137", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b7a3c6e186bd859e6deb0829b95113f99ea20655761feab83887e7936c78d137", kill_on_drop: false }` [INFO] [stdout] b7a3c6e186bd859e6deb0829b95113f99ea20655761feab83887e7936c78d137