Skip to content

Omit autonat and kad features from the web-client #14391

Omit autonat and kad features from the web-client

Omit autonat and kad features from the web-client #14391

GitHub Actions / Clippy Report succeeded Jan 16, 2025 in 0s

Clippy Report

6 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 6
Note 0
Help 0

Versions

  • rustc 1.84.0 (9fc6b4312 2025-01-07)
  • cargo 1.84.0 (66221abde 2024-11-19)
  • clippy 0.1.84 (9fc6b43126 2025-01-07)

Annotations

Check warning on line 727 in consensus/src/sync/live/block_queue/queue.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

this `map_or` is redundant

warning: this `map_or` is redundant
   --> consensus/src/sync/live/block_queue/queue.rs:724:12
    |
724 |           if self
    |  ____________^
725 | |             .buffer
726 | |             .get(&block_number)
727 | |             .map_or(false, |blocks| blocks.contains_key(&block_hash))
    | |_____________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
    |
724 ~         if self
725 +             .buffer
726 +             .get(&block_number).is_some_and(|blocks| blocks.contains_key(&block_hash))
    |

Check warning on line 254 in consensus/src/sync/light/validity_window.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

this `map_or` is redundant

warning: this `map_or` is redundant
   --> consensus/src/sync/light/validity_window.rs:252:39
    |
252 |                       let valid_chunk = chunk
    |  _______________________________________^
253 | |                         .verify(&expected_root, leaf_index as usize)
254 | |                         .map_or(false, |result| result);
    | |_______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
252 ~                     let valid_chunk = chunk
253 ~                         .verify(&expected_root, leaf_index as usize).is_some_and(|result| result);
    |

Check warning on line 262 in primitives/account/src/accounts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

this `map_or` is redundant

warning: this `map_or` is redundant
   --> primitives/account/src/accounts.rs:259:23
    |
259 |           let missing = self
    |  _______________________^
260 | |             .tree
261 | |             .get_missing_range(txn)
262 | |             .map_or(false, |range| range.contains(&rightmost_key));
    | |__________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
259 ~         let missing = self
260 +             .tree
261 ~             .get_missing_range(txn).is_some_and(|range| range.contains(&rightmost_key));
    |

Check warning on line 262 in primitives/account/src/accounts.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

this `map_or` is redundant

warning: this `map_or` is redundant
   --> primitives/account/src/accounts.rs:259:23
    |
259 |           let missing = self
    |  _______________________^
260 | |             .tree
261 | |             .get_missing_range(txn)
262 | |             .map_or(false, |range| range.contains(&rightmost_key));
    | |__________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
259 ~         let missing = self
260 +             .tree
261 ~             .get_missing_range(txn).is_some_and(|range| range.contains(&rightmost_key));
    |

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

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

this `map_or` is redundant

warning: this `map_or` is redundant
   --> network-libp2p/src/discovery/peer_contacts.rs:276:9
    |
276 | /         unix_time
277 | |             .checked_sub(Duration::from_secs(self.contact.inner.timestamp()))
278 | |             .map_or(false, |age| age > max_age)
    | |_______________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
276 ~         unix_time
277 +             .checked_sub(Duration::from_secs(self.contact.inner.timestamp())).is_some_and(|age| age > max_age)
    |

Check warning on line 380 in mnemonic/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Report

large array defined as const

warning: large array defined as const
   --> mnemonic/src/lib.rs:168:1
    |
168 |   pub const WORDLIST_EN: Wordlist<'static> = [
    |   ^   ----- help: make this a static item: `static`
    |  _|
    | |
169 | |     "abandon", "ability", "able", "about", "above", "absent", "absorb", "abstract", "absurd",
170 | |     "abuse", "access", "accident", "account", "accuse", "achieve", "acid", "acoustic", "acquire",
171 | |     "across", "act", "action", "actor", "actress", "actual", "adapt", "add", "addict", "address",
...   |
379 | |     "zoo",
380 | | ];
    | |__^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays
    = note: `#[warn(clippy::large_const_arrays)]` on by default