Skip to content

Commit 4250c33

Browse files
mattsseshekhirin
andauthored
chore: clippy happy (#8362)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
1 parent 155876d commit 4250c33

28 files changed

Lines changed: 70 additions & 76 deletions

File tree

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ rust.missing_debug_implementations = "warn"
105105
rust.missing_docs = "warn"
106106
rust.unreachable_pub = "warn"
107107
rust.unused_must_use = "deny"
108-
rust.rust_2018_idioms = "deny"
108+
rust.rust_2018_idioms = { level = "deny", priority = -1 }
109109
rustdoc.all = "warn"
110110

111111
[workspace.lints.clippy]

‎Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,9 @@ fix-lint-other-targets:
413413
-- -D warnings
414414

415415
fix-lint:
416-
make lint-reth && \
417-
make lint-op-reth && \
418-
make lint-other-targets && \
416+
make fix-lint-reth && \
417+
make fix-lint-op-reth && \
418+
make fix-lint-other-targets && \
419419
make fmt
420420

421421
.PHONY: rustdocs

‎bin/reth/src/commands/db/stats.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl Command {
377377
let max_widths = table.column_max_content_widths();
378378
let mut separator = Row::new();
379379
for width in max_widths {
380-
separator.add_cell(Cell::new(&"-".repeat(width as usize)));
380+
separator.add_cell(Cell::new("-".repeat(width as usize)));
381381
}
382382
table.add_row(separator);
383383

‎crates/blockchain-tree/src/blockchain_tree.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ where
307307
*key_value.0
308308
} else {
309309
debug!(target: "blockchain_tree", ?chain_id, "No blockhashes stored");
310-
return None;
310+
return None
311311
};
312312
let canonical_chain = canonical_chain
313313
.iter()

‎crates/consensus/beacon/src/engine/hooks/prune.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ impl<DB: Database + 'static> PruneHook<DB> {
7878

7979
/// This will try to spawn the pruner if it is idle:
8080
/// 1. Check if pruning is needed through [Pruner::is_pruning_needed].
81-
/// 2.
82-
/// 1. If pruning is needed, pass tip block number to the [Pruner::run] and spawn it in a
83-
/// separate task. Set pruner state to [PrunerState::Running].
84-
/// 2. If pruning is not needed, set pruner state back to [PrunerState::Idle].
81+
///
82+
/// 2.1. If pruning is needed, pass tip block number to the [Pruner::run] and spawn it in a
83+
/// separate task. Set pruner state to [PrunerState::Running].
84+
/// 2.2. If pruning is not needed, set pruner state back to [PrunerState::Idle].
8585
///
8686
/// If pruner is already running, do nothing.
8787
fn try_spawn_pruner(&mut self, tip_block_number: BlockNumber) -> Option<EngineHookEvent> {

‎crates/consensus/beacon/src/engine/hooks/static_file.rs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ impl<DB: Database + 'static> StaticFileHook<DB> {
7171
/// 1. Check if producing static files is needed through
7272
/// [StaticFileProducer::get_static_file_targets](reth_static_file::StaticFileProducerInner::get_static_file_targets)
7373
/// and then [StaticFileTargets::any](reth_static_file::StaticFileTargets::any).
74-
/// 2.
75-
/// 1. If producing static files is needed, pass static file request to the
76-
/// [StaticFileProducer::run](reth_static_file::StaticFileProducerInner::run) and spawn
77-
/// it in a separate task. Set static file producer state to
78-
/// [StaticFileProducerState::Running].
79-
/// 2. If producing static files is not needed, set static file producer state back to
80-
/// [StaticFileProducerState::Idle].
74+
///
75+
/// 2.1. If producing static files is needed, pass static file request to the
76+
/// [StaticFileProducer::run](reth_static_file::StaticFileProducerInner::run) and
77+
/// spawn it in a separate task. Set static file producer state to
78+
/// [StaticFileProducerState::Running].
79+
/// 2.2. If producing static files is not needed, set static file producer state back to
80+
/// [StaticFileProducerState::Idle].
8181
///
8282
/// If static_file_producer is already running, do nothing.
8383
fn try_spawn_static_file_producer(

‎crates/consensus/beacon/src/engine/mod.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,13 @@ where
703703
/// If validation fails, the response MUST contain the latest valid hash:
704704
///
705705
/// - The block hash of the ancestor of the invalid payload satisfying the following two
706-
/// conditions:
706+
/// conditions:
707707
/// - It is fully validated and deemed VALID
708708
/// - Any other ancestor of the invalid payload with a higher blockNumber is INVALID
709709
/// - 0x0000000000000000000000000000000000000000000000000000000000000000 if the above
710-
/// conditions are satisfied by a PoW block.
710+
/// conditions are satisfied by a PoW block.
711711
/// - null if client software cannot determine the ancestor of the invalid payload satisfying
712-
/// the above conditions.
712+
/// the above conditions.
713713
fn latest_valid_hash_for_invalid_payload(
714714
&mut self,
715715
parent_hash: B256,
@@ -1103,8 +1103,8 @@ where
11031103
/// - invalid extra data
11041104
/// - invalid transactions
11051105
/// - incorrect hash
1106-
/// - the versioned hashes passed with the payload do not exactly match transaction
1107-
/// versioned hashes
1106+
/// - the versioned hashes passed with the payload do not exactly match transaction versioned
1107+
/// hashes
11081108
/// - the block does not contain blob transactions if it is pre-cancun
11091109
///
11101110
/// This validates the following engine API rule:

‎crates/exex/src/manager.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub struct ExExManagerMetrics {
160160
/// The manager is responsible for:
161161
///
162162
/// - Receiving relevant events from the rest of the node, and sending these to the execution
163-
/// extensions
163+
/// extensions
164164
/// - Backpressure
165165
/// - Error handling
166166
/// - Monitoring

‎crates/interfaces/src/blockchain_tree/mod.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ pub enum BlockStatus {
210210
/// This is required to:
211211
/// - differentiate whether trie state updates should be cached.
212212
/// - inform other
213+
///
213214
/// This is required because the state root check can only be performed if the targeted block can be
214215
/// traced back to the canonical __head__.
215216
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

‎crates/net/ecies/src/algorithm.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn ecdh_x(public_key: &PublicKey, secret_key: &SecretKey) -> B256 {
4545
/// # Panics
4646
/// * If the `dest` is empty
4747
/// * If the `dest` len is greater than or equal to the hash output len * the max counter value. In
48-
/// this case, the hash output len is 32 bytes, and the max counter value is 2^32 - 1. So the dest
49-
/// cannot have a len greater than 32 * 2^32 - 1.
48+
/// this case, the hash output len is 32 bytes, and the max counter value is 2^32 - 1. So the dest
49+
/// cannot have a len greater than 32 * 2^32 - 1.
5050
fn kdf(secret: B256, s1: &[u8], dest: &mut [u8]) {
5151
concat_kdf::derive_key_into::<Sha256>(secret.as_slice(), s1, dest).unwrap();
5252
}

0 commit comments

Comments
 (0)