Skip to content

Add ValidatorInfo to the PeerContacts. Do basic verification

Sign in for the full log view
GitHub Actions / Clippy Report failed Nov 25, 2024 in 0s

Clippy Report

4 errors, 2 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 4
Warning 2
Note 0
Help 0

Versions

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check warning on line 140 in network-libp2p/src/discovery/peer_contacts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

unreachable pattern

warning: unreachable pattern
   --> network-libp2p/src/discovery/peer_contacts.rs:140:5
    |
133 |     pub validator_info: Option<ValidatorInfo>,
    |         -------------- matches all the relevant values
...
140 |     validator_info: Option<ValidatorInfo>,
    |     ^^^^^^^^^^^^^^ no value can reach this
    |
    = note: `#[warn(unreachable_patterns)]` on by default

Check failure on line 168 in network-libp2p/src/discovery/peer_contacts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

field `validator_info` specified more than once

error[E0062]: field `validator_info` specified more than once
   --> network-libp2p/src/discovery/peer_contacts.rs:168:13
    |
166 |             validator_info: None,
    |             -------------------- first use of `validator_info`
167 |             services,
168 |             validator_info: None,
    |             ^^^^^^^^^^^^^^ used more than once

Check failure on line 140 in network-libp2p/src/discovery/peer_contacts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

field `validator_info` specified more than once

error[E0062]: field `validator_info` specified more than once
   --> network-libp2p/src/discovery/peer_contacts.rs:140:5
    |
123 | #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
    |                                   ----------- first use of `validator_info`
...
140 |     validator_info: Option<ValidatorInfo>,
    |     ^^^^^^^^^^^^^^ used more than once

Check failure on line 140 in network-libp2p/src/discovery/peer_contacts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

field `validator_info` specified more than once

error[E0062]: field `validator_info` specified more than once
   --> network-libp2p/src/discovery/peer_contacts.rs:140:5
    |
133 |     pub validator_info: Option<ValidatorInfo>,
    |     ----------------------------------------- first use of `validator_info`
...
140 |     validator_info: Option<ValidatorInfo>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ used more than once

Check failure on line 140 in network-libp2p/src/discovery/peer_contacts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

field `validator_info` is already declared

error[E0124]: field `validator_info` is already declared
   --> network-libp2p/src/discovery/peer_contacts.rs:140:5
    |
133 |     pub validator_info: Option<ValidatorInfo>,
    |     ----------------------------------------- `validator_info` first declared here
...
140 |     validator_info: Option<ValidatorInfo>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared

Check warning on line 8 in network-libp2p/src/dht.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

unused import: `discovery::peer_contacts::ValidatorInfoError`

warning: unused import: `discovery::peer_contacts::ValidatorInfoError`
 --> network-libp2p/src/dht.rs:8:13
  |
8 | use crate::{discovery::peer_contacts::ValidatorInfoError, Network};
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default